rxjs-rails 2.4.1 → 2.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rxjs/rails/version.rb +1 -1
  3. data/vendor/assets/javascripts/rx.aggregates.js +15 -19
  4. data/vendor/assets/javascripts/rx.aggregates.map +1 -1
  5. data/vendor/assets/javascripts/rx.aggregates.min.js +1 -1
  6. data/vendor/assets/javascripts/rx.all.compat.js +1014 -566
  7. data/vendor/assets/javascripts/rx.all.compat.map +1 -1
  8. data/vendor/assets/javascripts/rx.all.compat.min.js +4 -4
  9. data/vendor/assets/javascripts/rx.all.js +1009 -563
  10. data/vendor/assets/javascripts/rx.all.map +1 -1
  11. data/vendor/assets/javascripts/rx.all.min.js +4 -4
  12. data/vendor/assets/javascripts/rx.async.compat.js +17 -15
  13. data/vendor/assets/javascripts/rx.async.compat.map +1 -1
  14. data/vendor/assets/javascripts/rx.async.compat.min.js +1 -1
  15. data/vendor/assets/javascripts/rx.async.js +17 -15
  16. data/vendor/assets/javascripts/rx.async.map +1 -1
  17. data/vendor/assets/javascripts/rx.async.min.js +1 -1
  18. data/vendor/assets/javascripts/rx.backpressure.js +53 -43
  19. data/vendor/assets/javascripts/rx.backpressure.map +1 -1
  20. data/vendor/assets/javascripts/rx.backpressure.min.js +1 -1
  21. data/vendor/assets/javascripts/rx.binding.js +31 -12
  22. data/vendor/assets/javascripts/rx.binding.map +1 -1
  23. data/vendor/assets/javascripts/rx.binding.min.js +1 -1
  24. data/vendor/assets/javascripts/rx.coincidence.js +3 -2
  25. data/vendor/assets/javascripts/rx.coincidence.map +1 -1
  26. data/vendor/assets/javascripts/rx.coincidence.min.js +1 -1
  27. data/vendor/assets/javascripts/rx.compat.js +821 -444
  28. data/vendor/assets/javascripts/rx.compat.map +1 -1
  29. data/vendor/assets/javascripts/rx.compat.min.js +2 -2
  30. data/vendor/assets/javascripts/rx.experimental.js +2 -9
  31. data/vendor/assets/javascripts/rx.experimental.map +1 -1
  32. data/vendor/assets/javascripts/rx.experimental.min.js +1 -1
  33. data/vendor/assets/javascripts/rx.joinpatterns.js +14 -22
  34. data/vendor/assets/javascripts/rx.joinpatterns.map +1 -1
  35. data/vendor/assets/javascripts/rx.joinpatterns.min.js +1 -1
  36. data/vendor/assets/javascripts/rx.js +817 -442
  37. data/vendor/assets/javascripts/rx.lite.compat.js +897 -443
  38. data/vendor/assets/javascripts/rx.lite.compat.map +1 -1
  39. data/vendor/assets/javascripts/rx.lite.compat.min.js +3 -2
  40. data/vendor/assets/javascripts/rx.lite.extras.compat.js +621 -0
  41. data/vendor/assets/javascripts/rx.lite.extras.compat.map +1 -0
  42. data/vendor/assets/javascripts/rx.lite.extras.compat.min.js +3 -0
  43. data/vendor/assets/javascripts/rx.lite.extras.js +53 -76
  44. data/vendor/assets/javascripts/rx.lite.extras.map +1 -1
  45. data/vendor/assets/javascripts/rx.lite.extras.min.js +1 -1
  46. data/vendor/assets/javascripts/rx.lite.js +898 -444
  47. data/vendor/assets/javascripts/rx.lite.map +1 -1
  48. data/vendor/assets/javascripts/rx.lite.min.js +3 -2
  49. data/vendor/assets/javascripts/rx.map +1 -1
  50. data/vendor/assets/javascripts/rx.min.js +2 -2
  51. data/vendor/assets/javascripts/rx.testing.js +10 -11
  52. data/vendor/assets/javascripts/rx.testing.map +1 -1
  53. data/vendor/assets/javascripts/rx.testing.min.js +1 -1
  54. data/vendor/assets/javascripts/rx.time.js +80 -40
  55. data/vendor/assets/javascripts/rx.time.map +1 -1
  56. data/vendor/assets/javascripts/rx.time.min.js +1 -1
  57. data/vendor/assets/javascripts/rx.virtualtime.js +6 -13
  58. data/vendor/assets/javascripts/rx.virtualtime.map +1 -1
  59. data/vendor/assets/javascripts/rx.virtualtime.min.js +1 -1
  60. metadata +6 -3
@@ -1 +1 @@
1
- {"version":3,"file":"rx.lite.min.js","sources":["rx.lite.js"],"names":["undefined","checkDisposed","self","isDisposed","Error","objectDisposed","cloneArray","arr","a","i","len","length","push","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","e","firstLine","attempt1","exec","Number","attempt2","attempt3","keysIn","object","result","isObject","support","nonEnumArgs","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","nonEnumShadows","objectProto","ctor","constructor","index","dontEnumsLength","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","dontEnums","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","value","deepEquals","b","stackA","stackB","type","otherType","otherClass","argsClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","thrower","arrayInitialize","count","factory","Array","IndexedItem","id","this","ToArrayObserver","observer","isStopped","StringIterable","_s","s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","TypeError","sign","number","isNaN","Math","floor","abs","maxSafeInteger","FromArraySink","parent","observableOf","scheduler","array","FromArrayObservable","observableCatchHandler","handler","AnonymousObservable","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","x","onNext","ex","onError","isPromise","observableFromPromise","d","onCompleted","zipArray","second","resultSelector","first","left","right","falseFactory","emptyArrayFactory","concatMap","selector","thisArg","selectorFunc","bindCallback","map","isArrayLike","isIterable","observableFrom","concatAll","MapObserver","flatMap","mergeAll","FilterObserver","predicate","createListener","element","name","addEventListener","disposableCreate","removeEventListener","createEventListener","el","eventName","disposables","CompositeDisposable","add","item","observableTimerDate","dueTime","scheduleWithAbsolute","observableTimerDateAndPeriod","period","p","normalizeTime","scheduleRecursiveWithAbsoluteAndState","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","exception","q","running","materialize","timestamp","notification","shouldRun","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","hasValue","atEnd","newValue","bind","combineLatestSource","subject","next","values","res","hasValueAll","every","identity","err","apply","isDone","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","isScheduler","notDefined","Scheduler","defaultNow","pluck","property","just","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","then","asArray","arguments","not","isFn","argumentOutOfRange","longStackSupport","Symbol","iterator","Set","doneEnumerator","done","supportNodeClass","func","argCount","arg","collection","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","__","addProperties","obj","sources","idx","ln","prop","addRef","xs","r","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","args","isArray","CompositeDisposablePrototype","dispose","shouldDispose","splice","currentDisposables","Disposable","action","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","ScheduledItem","RefCountDisposable","InnerDisposable","disposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","state","comparer","invoke","invokeCore","isCancelled","schedule","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursive","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsolute","schedulePeriodic","setInterval","clearInterval","scheduleMethod","immediateScheduler","immediate","scheduleNow","notSupported","currentThreadScheduler","currentThread","runTrampoline","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","localTimer","localSetTimeout","localClearTimeout","fn","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","MSG_PREFIX","random","tasks","taskId","onGlobalPostMessage","event","data","substring","handleId","attachEvent","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeoutScheduler","timeout","Notification","observerOrOnNext","_acceptObservable","_accept","toObservable","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Enumerator","_next","Enumerable","_iterator","concat","currentItem","currentValue","catchError","lastException","catchErrorWhen","notificationHandler","exceptions","Subject","notifier","handled","notificationDisposable","outer","inner","exn","observableProto","enumerableRepeat","repeat","repeatCount","enumerableOf","of","selectorFn","Observer","observerCreate","AnonymousObserver","AbstractObserver","__super__","notImplemented","completed","fail","_onNext","_onError","_onCompleted","Observable","_subscribe","oldOnError","forEach","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","ObservableBase","fixSubscriber","subscriber","ado","subscribeCore","AutoDetachObserver","ToArrayObservable","toArray","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","FromObservable","iterable","mapper","sink","FromSink","run","loopRecursive","list","pow","charAt","from","mapFn","observableFromArray","fromArray","never","ofWithScheduler","pairs","keys","RangeObservable","RangeSink","range","observableReturn","returnValue","throwError","throwException","catchException","handlerOrSecond","observableCatch","combineLatest","filter","j","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","mergeObservable","m","innerSubscription","skipUntil","isOpen","rightSubscription","switchLatest","hasLatest","latest","takeUntil","withLatestFrom","n","allValues","zip","queuedValues","queues","asObservable","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","tap","doAction","tapObserver","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","retry","retryCount","retryWhen","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","selectConcat","selectorResult","i2","MapObservable","internalMap","select","currentProp","selectMany","selectSwitch","flatMapLatest","switchMap","skip","remaining","skipWhile","take","RangeError","takeWhile","FilterObservable","internalFilter","shouldYield","where","fromCallback","context","results","publishLast","refCount","fromNodeCallback","useNativeEvents","fromEvent","addListener","fromEventPattern","h","removeListener","on","off","publish","addHandler","removeHandler","innerHandler","fromPromise","promise","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","startAsync","functionAsync","multicast","subjectOrSubjectSelector","connectable","connect","ConnectableObservable","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","observableinterval","interval","timer","periodOrScheduler","getTime","delay","debounce","throttleWithTimeout","hasvalue","throttle","sample","throttleLatest","intervalOrSampler","schedulerMethod","createTimer","myId","original","switched","throttleFirst","windowDuration","duration","lastOnNext","PausableObservable","conn","connection","pausable","pauser","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","ControlledObservable","enableQueue","ControlledSubject","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","controlled","transduce","transducer","transformForObserver","init","step","obs","input","xform","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasError","hasObservers","os","AnonymousSubject","createRemovableDisposable","so","_trim","windowSize","MAX_VALUE","Pauser","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,GAAcC,GAAQ,GAAIA,EAAKC,WAAc,KAAM,IAAI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BAkM,IAAS6c,EAAQjQ,GASjBiQ,EAAO/rB,UAAUspB,MAAQ,WAActmB,KAAK4C,QAAO,IAKnDmmB,EAAO/rB,UAAUupB,OAAS,WAAcvmB,KAAK4C,QAAO,IAE7CmmB,GACPnR,IAEmB,kBAAVoR,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACzEloB,EAAKuI,GAAKA,EAEV0f,OAAO,WACL,MAAO1f,MAEAR,GAAeG,EAEpBE,GACDF,EAAWF,QAAUO,GAAIA,GAAKA,EAE/BR,EAAYQ,GAAKA,EAInBvI,EAAKuI,GAAKA,CAIZ,IAAIpO,IAAcC,MAElBgB,KAAK6D"}
1
+ {"version":3,"file":"rx.lite.min.js","sources":["rx.lite.js"],"names":["undefined","cloneArray","arr","len","length","a","Array","i","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","push","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","Error","e","firstLine","attempt1","exec","Number","attempt2","attempt3","keysIn","object","result","isObject","support","nonEnumArgs","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","nonEnumShadows","objectProto","ctor","constructor","index","dontEnumsLength","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","dontEnums","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","value","deepEquals","b","stackA","stackB","type","otherType","otherClass","argsClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","tryCatcher","tryCatchTarget","apply","this","arguments","errorObj","tryCatch","fn","TypeError","thrower","arrayInitialize","count","factory","IndexedItem","id","ToArrayObserver","observer","isStopped","StringIterable","_s","s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","sign","number","isNaN","Math","floor","abs","maxSafeInteger","FromArraySink","parent","observableOf","scheduler","array","isScheduler","currentThreadScheduler","FromArrayObservable","PairsSink","RepeatSink","observableCatchHandler","handler","AnonymousObservable","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","x","onNext","ex","onError","isPromise","observableFromPromise","d","onCompleted","zipArray","second","resultSelector","first","left","right","falseFactory","emptyArrayFactory","concatMap","selector","thisArg","selectorFunc","bindCallback","map","isArrayLike","isIterable","observableFrom","concatAll","MapObserver","flatMap","mergeAll","FilterObserver","predicate","createListener","element","name","addEventListener","disposableCreate","removeEventListener","createEventListener","el","eventName","disposables","CompositeDisposable","add","item","observableTimerDate","dueTime","scheduleWithAbsolute","observableTimerDateAndPeriod","period","p","normalizeTime","scheduleRecursiveWithAbsoluteAndState","self","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","exception","q","running","materialize","timestamp","notification","shouldRun","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","hasValue","atEnd","newValue","bind","combineLatestSource","subject","next","values","res","hasValueAll","every","identity","err","isDone","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","notDefined","defaultNow","pluck","property","just","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","then","asArray","not","isFn","longStackSupport","EmptyError","message","ObjectDisposedError","ArgumentOutOfRangeError","NotSupportedError","NotImplementedError","notImplemented","notSupported","Symbol","iterator","Set","doneEnumerator","done","supportNodeClass","func","argCount","arg","collection","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","__","addProperties","obj","sources","idx","ln","prop","addRef","xs","r","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","args","isArray","isDisposable","isDisposed","CompositeDisposablePrototype","dispose","shouldDispose","splice","currentDisposables","Disposable","action","create","disposableEmpty","empty","checkDisposed","disposable","current","old","ScheduledItem","RefCountDisposable","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","state","comparer","invoke","invokeCore","isCancelled","Scheduler","schedule","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithState","scheduleWithRelativeAndState","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","recursiveAction","state1","state2","isAdded","scheduler1","state3","group","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursive","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsolute","schedulePeriodic","setInterval","clearInterval","scheduleMethod","clearMethod","immediateScheduler","immediate","scheduleNow","currentThread","runTrampoline","queue","si","currentScheduler","scheduleRequired","localTimer","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","localSetTimeout","localClearTimeout","setTimeout","clearTimeout","WScript","time","Sleep","runTask","handle","currentlyRunning","task","tasksByHandle","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","event","data","substring","MSG_PREFIX","nextHandle","reNative","RegExp","replace","setImmediate","process","nextTick","random","attachEvent","currentId","MessageChannel","channel","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeoutScheduler","timeout","Notification","acceptObservable","_accept","_acceptObservable","observerOrOnNext","toObservable","_","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Enumerator","_next","Enumerable","_iterator","concat","currentItem","currentValue","catchError","lastException","catchErrorWhen","notificationHandler","exceptions","Subject","notifier","handled","notificationDisposable","outer","inner","exn","observableProto","enumerableRepeat","repeat","repeatCount","enumerableOf","of","selectorFn","Observer","observerCreate","AnonymousObserver","AbstractObserver","__super__","completed","fail","_onNext","_onError","_onCompleted","Observable","_subscribe","oldOnError","forEach","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","ObservableBase","fixSubscriber","subscriber","ado","sub","subscribeCore","AutoDetachObserver","ToArrayObservable","toArray","createWithDisposable","defer","observableFactory","observableThrow","EmptyObservable","EmptySink","scheduleItem","sink","run","observableEmpty","FromObservable","iterable","mapper","FromSink","loopRecursive","list","pow","charAt","from","mapFn","observableFromArray","fromArray","NeverObservable","never","ofWithScheduler","PairsObservable","keys","pairs","RangeObservable","RangeSink","range","RepeatObservable","JustObservable","JustSink","ThrowObservable","returnValue","ThrowSink","throwError","throwException","catchException","handlerOrSecond","observableCatch","combineLatest","filter","j","n","subscriptions","sad","observableConcat","concatObservable","merge","MergeObservable","maxConcurrent","g","MergeObserver","activeCount","InnerObserver","handleSubscribe","innerSource","maxConcurrentOrOther","observableMerge","CompositeError","errors","innerErrors","mergeDelayError","setCompletion","m","innerSubscription","MergeAllObservable","MergeAllObserver","mergeObservable","skipUntil","isOpen","rightSubscription","switchLatest","hasLatest","latest","takeUntil","withLatestFrom","allValues","zip","queuedValues","queues","asObservable","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","tap","doAction","tapObserver","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","retry","retryCount","retryWhen","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","selectConcat","selectorResult","i2","MapObservable","internalMap","select","currentProp","selectMany","selectSwitch","flatMapLatest","switchMap","skip","remaining","skipWhile","take","takeWhile","FilterObservable","internalFilter","shouldYield","where","fromCallback","context","results","publishLast","refCount","fromNodeCallback","useNativeEvents","fromEvent","addListener","fromEventPattern","h","removeListener","on","off","publish","addHandler","removeHandler","innerHandler","fromPromise","promise","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","startAsync","functionAsync","multicast","subjectOrSubjectSelector","connectable","connect","ConnectableObservable","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","windowSize","ReplaySubject","shareReplay","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","observableinterval","interval","timer","periodOrScheduler","getTime","delay","debounce","throttleWithTimeout","hasvalue","throttle","sample","throttleLatest","intervalOrSampler","schedulerMethod","createTimer","myId","original","switched","throttleFirst","windowDuration","duration","RangeError","lastOnNext","PausableObservable","conn","connection","pausable","pauser","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","ControlledObservable","enableQueue","ControlledSubject","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","hasRequested","disposeCurrentRequest","_processRequest","controlled","pipe","dest","onDrain","write","emit","_isStdio","end","transduce","transducer","transformForObserver","@@transducer/init","@@transducer/step","obs","input","@@transducer/result","xform","AutoDetachObserverPrototype","InnerSubscription","observers","hasError","hasObservers","os","AnonymousSubject","getValue","createRemovableDisposable","so","_trim","Pauser","define","amd"],"mappings":";CAEE,SAAUA,GA2DR,QAASC,GAAWC,GAElB,IAAI,GADAC,GAAMD,EAAIE,OAAQC,EAAI,GAAIC,OAAMH,GAC5BI,EAAI,EAAOJ,EAAJI,EAASA,IAAOF,EAAEE,GAAKL,EAAIK,EAC1C,OAAOF,GAgBX,QAASG,GAAmBC,EAAOC,GAG/B,GAAIC,IACAD,EAAWE,OACM,gBAAVH,IACG,OAAVA,GACAA,EAAMG,OACwC,KAA9CH,EAAMG,MAAMC,QAAQC,IACtB,CAEA,IAAK,GADDC,MACKC,EAAIN,EAAcM,EAAGA,EAAIA,EAAEC,OAC9BD,EAAEJ,OACJG,EAAOG,QAAQF,EAAEJ,MAGrBG,GAAOG,QAAQT,EAAMG,MAErB,IAAIO,GAAiBJ,EAAOK,KAAK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,IAEmB,kBAAVgT,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACzErqB,EAAK0I,GAAKA,GAEV0hB,OAAO,WACL,MAAO1hB,OAEAR,GAAeG,EAEpBE,IACDF,EAAWF,QAAUO,IAAIA,GAAKA,GAE/BR,EAAYQ,GAAKA,GAInB1I,EAAK0I,GAAKA,EAIZ,IAAI/O,IAAcC,MAElBiB,KAAKyD"}
@@ -1,4 +1,5 @@
1
1
  /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
2
- (function(a){function b(a){if(a.isDisposed)throw new Error(kb)}function c(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c]);return b}function d(a,b){if(lb&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(pb)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var f=c.join("\n"+pb+"\n");a.stack=e(f)}}function e(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var h=b[d];f(h)||g(h)||!h||c.push(h)}return c.join("\n")}function f(a){var b=i(a);if(!b)return!1;var c=b[0],d=b[1];return c===nb&&d>=ob&&md>=d}function g(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function h(){if(lb)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=i(c);if(!d)return;return nb=d[0],d[1]}}function i(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function j(a){var b=[];if(!Rb(a))return b;Qb.nonEnumArgs&&a.length&&Sb(a)&&(a=Ub.call(a));var c=Qb.enumPrototypes&&"function"==typeof a,d=Qb.enumErrorProps&&(a===Lb||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(Qb.nonEnumShadows&&a!==Mb){var f=a.constructor,g=-1,h=xb;if(a===(f&&f.prototype))var i=a===Nb?Hb:a===Lb?Cb:Ib.call(a),j=Pb[i];for(;++g<h;)e=wb[g],j&&j[e]||!Jb.call(a,e)||b.push(e)}return b}function k(a,b,c){for(var d=-1,e=c(a),f=e.length;++d<f;){var g=e[d];if(b(a[g],g,a)===!1)break}return a}function l(a,b){return k(a,b,j)}function m(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}function n(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;var e=typeof a,f=typeof b;if(a===a&&(null==a||null==b||"function"!=e&&"object"!=e&&"function"!=f&&"object"!=f))return!1;var g=Ib.call(a),h=Ib.call(b);if(g==yb&&(g=Fb),h==yb&&(h=Fb),g!=h)return!1;switch(g){case Ab:case Bb:return+a==+b;case Eb:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case Gb:case Hb:return a==String(b)}var i=g==zb;if(!i){if(g!=Fb||!Qb.nodeClass&&(m(a)||m(b)))return!1;var j=!Qb.argsObject&&Sb(a)?Object:a.constructor,k=!Qb.argsObject&&Sb(b)?Object:b.constructor;if(!(j==k||Jb.call(a,"constructor")&&Jb.call(b,"constructor")||ib(j)&&j instanceof j&&ib(k)&&k instanceof k||!("constructor"in a&&"constructor"in b)))return!1}c||(c=[]),d||(d=[]);for(var o=c.length;o--;)if(c[o]==a)return d[o]==b;var p=0,q=!0;if(c.push(a),d.push(b),i){if(o=a.length,p=b.length,q=p==o)for(;p--;){var r=b[p];if(!(q=n(a[p],r,c,d)))break}}else l(b,function(b,e,f){return Jb.call(f,e)?(p++,q=Jb.call(a,e)&&n(a[e],b,c,d)):void 0}),q&&l(a,function(a,b,c){return Jb.call(c,b)?q=--p>-1:void 0});return c.pop(),d.pop(),q}function o(a){throw a}function p(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function q(a,b){this.id=a,this.value=b}function r(a){this.observer=a,this.a=[],this.isStopped=!1}function t(){this._s=s}function u(){this._s=s,this._l=s.length,this._i=0}function v(a){this._a=a}function w(a){this._a=a,this._l=A(a),this._i=0}function x(a){return"number"==typeof a&&W.isFinite(a)}function y(b){var c,d=b[qb];if(!d&&"string"==typeof b)return c=new t(b),c[qb]();if(!d&&b.length!==a)return c=new v(b),c[qb]();if(!d)throw new TypeError("Object is not iterable");return b[qb]()}function z(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function A(a){var b=+a.length;return isNaN(b)?0:0!==b&&x(b)?(b=z(b)*Math.floor(Math.abs(b)),0>=b?0:b>Kc?Kc:b):b}function B(a,b){this.observer=a,this.parent=b}function C(a,b){return new Mc(b,a)}function D(a,b){return new ed(function(c){var d=new cc,e=new dc;return e.setDisposable(d),d.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){try{var d=b(a)}catch(f){return c.onError(f)}hb(d)&&(d=Zc(d));var g=new cc;e.setDisposable(g),g.setDisposable(d.subscribe(c))},function(a){c.onCompleted(a)})),e},a)}function E(a,b){var c=this;return new ed(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return d.onError(i)}d.onNext(g)}else d.onCompleted()},function(a){d.onError(a)},function(){d.onCompleted()})},c)}function F(){return!1}function G(){return[]}function H(a,b,c){var d=vb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return hb(e)&&(e=Zc(e)),(tb(e)||sb(e))&&(e=Lc(e)),e}).concatAll()}function I(a,b,c){this.observer=a,this.selector=b,this.source=c,this.i=0,this.isStopped=!1}function J(a,b,c){var d=vb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return hb(e)&&(e=Zc(e)),(tb(e)||sb(e))&&(e=Lc(e)),e}).mergeAll()}function K(a,b,c){this.observer=a,this.predicate=b,this.source=c,this.i=0,this.isStopped=!1}function L(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),ac(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function M(a,b,c){var d=new Zb;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(M(a.item(e),b,c));else a&&d.add(L(a,b,c));return d}function N(a,b){return new ed(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function O(a,b,c){return new ed(function(d){var e=a,f=gc(b);return c.scheduleRecursiveWithAbsoluteAndState(0,e,function(a,b){if(f>0){var g=c.now();e+=f,g>=e&&(e=g+f)}d.onNext(a),b(a+1,e)})})}function P(a,b){return new ed(function(c){return b.scheduleWithRelative(gc(a),function(){c.onNext(0),c.onCompleted()})})}function Q(a,b,c){return a===b?new ed(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):Gc(function(){return O(c.now()+a,b,c)})}function R(a,b,c){return new ed(function(d){var e,f=!1,g=new dc,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new cc,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new Zb(e,g)},a)}function S(a,b,c){return Gc(function(){return R(a,b-c.now(),c)})}function T(a,b){return new ed(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new Zb(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))},a)}function U(a,b,c){return new ed(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(cb))){if(f)return void d.onError(f);try{e=c.apply(null,j)}catch(k){return void d.onError(k)}d.onNext(e)}i&&j[1]&&d.onCompleted()}var f,g=[!1,!1],h=!1,i=!1,j=new Array(2);return new Zb(a.subscribe(function(a){e(a,0)},function(a){j[1]?d.onError(a):f=a},function(){i=!0,j[1]&&d.onCompleted()}),b.subscribe(function(a){e(a,1)},function(a){d.onError(a)},function(){i=!0,e(!0,1)}))},a)}var V={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},W=V[typeof window]&&window||this,X=V[typeof exports]&&exports&&!exports.nodeType&&exports,Y=V[typeof module]&&module&&!module.nodeType&&module,Z=Y&&Y.exports===X&&X,$=V[typeof global]&&global;!$||$.global!==$&&$.window!==$||(W=$);var _={internals:{},config:{Promise:W.Promise},helpers:{}},ab=_.helpers.noop=function(){},bb=(_.helpers.notDefined=function(a){return"undefined"==typeof a},_.helpers.isScheduler=function(a){return a instanceof _.Scheduler}),cb=_.helpers.identity=function(a){return a},db=(_.helpers.pluck=function(a){return function(b){return b[a]}},_.helpers.just=function(a){return function(){return a}},_.helpers.defaultNow=Date.now),eb=_.helpers.defaultComparer=function(a,b){return Tb(a,b)},fb=_.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},gb=(_.helpers.defaultKeySerializer=function(a){return a.toString()},_.helpers.defaultError=function(a){throw a}),hb=_.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},ib=(_.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},_.helpers.not=function(a){return!a},_.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==Ib.call(a)}),a}()),jb="Argument out of range",kb="Object has been disposed";_.config.longStackSupport=!1;var lb=!1;try{throw new Error}catch(mb){lb=!!mb.stack}var nb,ob=h(),pb="From previous event:",qb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";W.Set&&"function"==typeof(new W.Set)["@@iterator"]&&(qb="@@iterator");var rb=_.doneEnumerator={done:!0,value:a},sb=_.helpers.isIterable=function(b){return b[qb]!==a},tb=_.helpers.isArrayLike=function(b){return b&&b.length!==a};_.helpers.iterator=qb;var ub,vb=_.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},wb=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],xb=wb.length,yb="[object Arguments]",zb="[object Array]",Ab="[object Boolean]",Bb="[object Date]",Cb="[object Error]",Db="[object Function]",Eb="[object Number]",Fb="[object Object]",Gb="[object RegExp]",Hb="[object String]",Ib=Object.prototype.toString,Jb=Object.prototype.hasOwnProperty,Kb=Ib.call(arguments)==yb,Lb=Error.prototype,Mb=Object.prototype,Nb=String.prototype,Ob=Mb.propertyIsEnumerable;try{ub=!(Ib.call(document)==Fb&&!({toString:0}+""))}catch(mb){ub=!0}var Pb={};Pb[zb]=Pb[Bb]=Pb[Eb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Pb[Ab]=Pb[Hb]={constructor:!0,toString:!0,valueOf:!0},Pb[Cb]=Pb[Db]=Pb[Gb]={constructor:!0,toString:!0},Pb[Fb]={constructor:!0};var Qb={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);Qb.enumErrorProps=Ob.call(Lb,"message")||Ob.call(Lb,"name"),Qb.enumPrototypes=Ob.call(a,"prototype"),Qb.nonEnumArgs=0!=c,Qb.nonEnumShadows=!/valueOf/.test(b)}(1);var Rb=_.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},Sb=function(a){return a&&"object"==typeof a?Ib.call(a)==yb:!1};Kb||(Sb=function(a){return a&&"object"==typeof a?Jb.call(a,"callee"):!1});{var Tb=_.internals.isEqual=function(a,b){return n(a,b,[],[])},Ub=({}.hasOwnProperty,Array.prototype.slice),Vb=this.inherits=_.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},Wb=_.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}};_.internals.addRef=function(a,b){return new ed(function(c){return new Zb(b.getDisposable(),a.subscribe(c))})}}q.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Xb=_.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Yb=Xb.prototype;Yb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Yb.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},Yb.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(b<this.length&&this.isHigherPriority(b,d)&&(d=b),c<this.length&&this.isHigherPriority(c,d)&&(d=c),d!==a){var e=this.items[a];this.items[a]=this.items[d],this.items[d]=e,this.heapify(d)}}},Yb.peek=function(){return this.items[0].value},Yb.removeAt=function(b){this.items[b]=this.items[--this.length],this.items[this.length]=a,this.heapify()},Yb.dequeue=function(){var a=this.peek();return this.removeAt(0),a},Yb.enqueue=function(a){var b=this.length++;this.items[b]=new q(Xb.count++,a),this.percolate(b)},Yb.remove=function(a){for(var b=0;b<this.length;b++)if(this.items[b].value===a)return this.removeAt(b),!0;return!1},Xb.count=0;var Zb=_.CompositeDisposable=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}this.disposables=a,this.isDisposed=!1,this.length=a.length},$b=Zb.prototype;$b.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},$b.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},$b.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=this.disposables.length,b=new Array(a),c=0;a>c;c++)b[c]=this.disposables[c];for(this.disposables=[],this.length=0,c=0;a>c;c++)b[c].dispose()}};var _b=_.Disposable=function(a){this.isDisposed=!1,this.action=a||ab};_b.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var ac=_b.create=function(a){return new _b(a)},bc=_b.empty={dispose:ab},cc=_.SingleAssignmentDisposable=function(){function a(){this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},b.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()},a}(),dc=_.SerialDisposable=cc,ec=(_.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?bc:new a(this)},b}(),_.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||fb,this.disposable=new cc});ec.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},ec.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},ec.prototype.isCancelled=function(){return this.disposable.isDisposed},ec.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var fc=_.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),bc}var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=db,a.normalize=function(a){return 0>a&&(a=0),a},a}(),gc=fc.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new Zb,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),bc});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new Zb,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c](b,d,function(a,b){return e?f.remove(i):h=!0,g(b),bc});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(fc.prototype),function(){fc.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},fc.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof W.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=W.setInterval(function(){d=c(d)},b);return ac(function(){W.clearInterval(e)})}}(fc.prototype);var hc,ic=fc.immediate=function(){function a(a,b){return b(this,a)}function b(){throw new Error("Not supported")}return new fc(db,a,b,b)}(),jc=fc.currentThread=function(){function a(a){for(;a.length>0;){var b=a.dequeue();b.isCancelled()||!b.isCancelled()&&b.invoke()}}function b(b,c){var e=new ec(this,b,c,this.now());if(d)d.enqueue(e);else{d=new Xb(4),d.enqueue(e);try{a(d)}catch(f){throw f}finally{d=null}}return e.disposable}function c(){throw new Error("Not supported")}var d,e=new fc(db,b,c,c);return e.scheduleRequired=function(){return!d},e.ensureTrampoline=function(a){d?a():this.schedule(a)},e}(),kc=(_.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new cc;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),ab),lc=function(){var a,b=ab;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!W.setTimeout)throw new Error("No concurrency detected!");a=W.setTimeout,b=W.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),mc=lc.setTimeout,nc=lc.clearTimeout;!function(){function a(){if(!W.postMessage||W.importScripts)return!1;var a=!1,b=W.onmessage;return W.onmessage=function(){a=!0},W.postMessage("","*"),W.onmessage=b,a}var b=RegExp("^"+String(Ib).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),c="function"==typeof(c=$&&Z&&$.setImmediate)&&!b.test(c)&&c,d="function"==typeof(d=$&&Z&&$.clearImmediate)&&!b.test(d)&&d;if("function"==typeof c)hc=c,kc=d;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))hc=process.nextTick;else if(a()){var e="ms.rx.schedule"+Math.random(),f={},g=0,h=function(a){if("string"==typeof a.data&&a.data.substring(0,e.length)===e){var b=a.data.substring(e.length),c=f[b];c(),delete f[b]}};W.addEventListener?W.addEventListener("message",h,!1):W.attachEvent("onmessage",h,!1),hc=function(a){var b=g++;f[b]=a,W.postMessage(e+b,"*")}}else if(W.MessageChannel){var i=new W.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},hc=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in W&&"onreadystatechange"in W.document.createElement("script")?hc=function(a){var b=W.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},W.document.documentElement.appendChild(b)}:(hc=function(a){return mc(a,0)},kc=nc)}();var oc=fc.timeout=function(){function a(a,b){var c=this,d=new cc,e=hc(function(){d.isDisposed||d.setDisposable(b(c,a))});return new Zb(d,ac(function(){kc(e)}))}function b(a,b,c){var d=this,e=fc.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new cc,g=mc(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new Zb(f,ac(function(){nc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new fc(db,a,b,c)}(),pc=_.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return bb(a)||(a=ic),new ed(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),qc=pc.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){var e=new pc("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),rc=pc.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){var e=new pc("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),sc=pc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new pc("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),tc=_.internals.Enumerator=function(a){this._next=a};tc.prototype.next=function(){return this._next()},tc.prototype[qb]=function(){return this};var uc=_.internals.Enumerable=function(a){this._iterator=a};uc.prototype[qb]=function(){return this._iterator()},uc.prototype.concat=function(){var a=this;return new ed(function(b){var c,d=a[qb](),e=new dc,f=ic.scheduleRecursive(function(a){if(!c){try{var f=d.next()}catch(g){return b.onError(g)}if(f.done)return b.onCompleted();var h=f.value;hb(h)&&(h=Zc(h));var i=new cc;e.setDisposable(i),i.setDisposable(h.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},a))}});return new Zb(e,f,ac(function(){c=!0}))})},uc.prototype.catchError=function(){var a=this;return new ed(function(b){var c,d=a[qb](),e=new dc,f=ic.scheduleRecursiveWithState(null,function(a,f){if(!c){try{var g=d.next()}catch(h){return observer.onError(h)}if(g.done)return void(null!==a?b.onError(a):b.onCompleted());var i=g.value;hb(i)&&(i=Zc(i));var j=new cc;e.setDisposable(j),j.setDisposable(i.subscribe(function(a){b.onNext(a)},f,function(){b.onCompleted()}))}});return new Zb(e,f,ac(function(){c=!0}))})},uc.prototype.catchErrorWhen=function(a){var b=this;return new ed(function(c){var d,e,f=new hd,g=new hd,h=a(f),i=h.subscribe(g),j=b[qb](),k=new dc,l=ic.scheduleRecursive(function(a){if(!d){try{var b=j.next()}catch(h){return c.onError(h)}if(b.done)return void(e?c.onError(e):c.onCompleted());var i=b.value;hb(i)&&(i=Zc(i));var l=new cc,m=new cc;k.setDisposable(new Zb(m,l)),l.setDisposable(i.subscribe(function(a){c.onNext(a)},function(b){m.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new Zb(i,k,l,ac(function(){d=!0}))})};var vc,wc=uc.repeat=function(a,b){return null==b&&(b=-1),new uc(function(){var c=b;return new tc(function(){return 0===c?rb:(c>0&&c--,{done:!1,value:a})})})},xc=uc.of=function(a,b,c){if(b)var d=vb(b,c,3);return new uc(function(){var c=-1;return new tc(function(){return++c<a.length?{done:!1,value:b?d(a[c],c,a):a[c]}:rb})})},yc=_.Observer=function(){},zc=yc.create=function(a,b,c){return a||(a=ab),b||(b=gb),c||(c=ab),new Bc(a,b,c)},Ac=_.internals.AbstractObserver=function(a){function b(){this.isStopped=!1,a.call(this)}function c(){throw new Error("Method not implemented")}return Vb(b,a),b.prototype.next=c,b.prototype.error=c,b.prototype.completed=c,b.prototype.onNext=function(a){this.isStopped||this.next(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.error(a))},b.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.error(a),!0)},b}(yc),Bc=_.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return Vb(b,a),b.prototype.next=function(a){this._onNext(a)},b.prototype.error=function(a){this._onError(a)},b.prototype.completed=function(){this._onCompleted()},b}(Ac),Cc=_.Observable=function(){function a(a){if(_.config.longStackSupport&&lb){try{throw new Error}catch(b){this.stack=b.stack.substring(b.stack.indexOf("\n")+1)}var c=this;this._subscribe=function(b){var e=b.onError.bind(b);return b.onError=function(a){d(a,c),e(a)},a.call(c,b)}}else this._subscribe=a}return vc=a.prototype,vc.subscribe=vc.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:zc(a,b,c))},vc.subscribeOnNext=function(a,b){return this._subscribe(zc("undefined"!=typeof b?function(c){a.call(b,c)}:a))},vc.subscribeOnError=function(a,b){return this._subscribe(zc(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},vc.subscribeOnCompleted=function(a,b){return this._subscribe(zc(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},a}(),Dc=_.internals.ScheduledObserver=function(a){function b(b,c){a.call(this),this.scheduler=b,this.observer=c,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new dc}return Vb(b,a),b.prototype.next=function(a){var b=this;this.queue.push(function(){b.observer.onNext(a)})},b.prototype.error=function(a){var b=this;this.queue.push(function(){b.observer.onError(a)})},b.prototype.completed=function(){var a=this;this.queue.push(function(){a.observer.onCompleted()})},b.prototype.ensureActive=function(){var a=!1,b=this;!this.hasFaulted&&this.queue.length>0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(Ac),Ec=_.ObservableBase=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?ac(a):bc}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e.subscribeCore(d)))}catch(f){if(!d.fail(f))throw f}}function d(a){var b=new fd(a),d=[b,this];return jc.scheduleRequired()?jc.scheduleWithState(d,c):c(null,d),b}function e(){a.call(this,d)}return Vb(e,a),e.prototype.subscribeCore=function(){throw new Error("Not implemeneted")},e}(Cc),Fc=function(a){function b(b){this.source=b,a.call(this)}return Vb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new r(a))},b}(Ec);r.prototype.onNext=function(a){this.isStopped||this.a.push(a)},r.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},r.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onNext(this.a),this.observer.onCompleted())},r.prototype.dispose=function(){this.isStopped=!0},r.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},vc.toArray=function(){return new Fc(this)},Cc.create=Cc.createWithDisposable=function(a,b){return new ed(a,b)};var Gc=Cc.defer=function(a){return new ed(function(b){var c;try{c=a()}catch(d){return Rc(d).subscribe(b)}return hb(c)&&(c=Zc(c)),c.subscribe(b)})},Hc=Cc.empty=function(a){return bb(a)||(a=ic),new ed(function(b){return a.schedule(function(){b.onCompleted()})})},Ic=function(a){function b(b,c,d){this.iterable=b,this.mapper=c,this.scheduler=d,a.call(this)}return Vb(b,a),b.prototype.subscribeCore=function(a){var b=new Jc(a,this);return b.run()},b}(Ec),Jc=function(){function a(a,b){this.observer=a,this.parent=b}return a.prototype.run=function(){function a(a,b){try{var f=c.next()}catch(g){return d.onError(g)}if(f.done)return d.onCompleted();var h=f.value;if(e)try{h=e(h,a)}catch(g){return d.onError(g)}d.onNext(h),b(a+1)}var b=Object(this.parent.iterable),c=y(b),d=this.observer,e=this.parent.mapper;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}(),Kc=Math.pow(2,53)-1;t.prototype[qb]=function(){return new u(this._s)},u.prototype[qb]=function(){return this},u.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:rb},v.prototype[qb]=function(){return new w(this._a)},w.prototype[qb]=function(){return this},w.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:rb};var Lc=Cc.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!ib(b))throw new Error("mapFn when provided must be a function");if(b)var e=vb(b,c,2);return bb(d)||(d=jc),new Ic(a,e,d)},Mc=function(a){function b(b,c){this.args=b,this.scheduler=c||jc,a.call(this)}return Vb(b,a),b.prototype.subscribeCore=function(a){var b=new B(a,this);return b.run()},b}(Ec);B.prototype.run=function(){function a(a,e){d>a?(b.onNext(c[a]),e(a+1)):b.onCompleted()}var b=this.observer,c=this.parent.args,d=c.length;return this.parent.scheduler.scheduleRecursiveWithState(0,a)};{var Nc=Cc.fromArray=function(a,b){return new Mc(a,b)};Cc.never=function(){return new ed(function(){return bc})}}Cc.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return new Mc(b)},Cc.ofWithScheduler=function(a){for(var b=arguments.length,c=new Array(b-1),d=1;b>d;d++)c[d-1]=arguments[d];return new Mc(c,a)},Cc.pairs=function(a,b){return b||(b=_.Scheduler.currentThread),new ed(function(c){var d=Object.keys(a),e=d.length;return b.scheduleRecursiveWithState(0,function(b,f){if(e>b){var g=d[b];c.onNext([g,a[g]]),f(b+1)}else c.onCompleted()})})};var Oc=function(a){function b(b,c,d){this.start=b,this.count=c,this.scheduler=d,a.call(this)}return Vb(b,a),b.prototype.subscribeCore=function(a){var b=new Pc(a,this);return b.run()},b}(Ec),Pc=function(){function a(a,b){this.observer=a,this.parent=b}return a.prototype.run=function(){function a(a,e){c>a?(d.onNext(b+a),e(a+1)):d.onCompleted()}var b=this.parent.start,c=this.parent.count,d=this.observer;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}();Cc.range=function(a,b,c){return bb(c)||(c=jc),new Oc(a,b,c)},Cc.repeat=function(a,b,c){return bb(c)||(c=jc),Qc(a,c).repeat(null==b?-1:b)};var Qc=Cc["return"]=Cc.just=function(a,b){return bb(b)||(b=ic),new ed(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};Cc.returnValue=function(){return Qc.apply(null,arguments)};var Rc=Cc["throw"]=Cc.throwError=function(a,b){return bb(b)||(b=ic),new ed(function(c){return b.schedule(function(){c.onError(a)})})};Cc.throwException=function(){return Cc.throwError.apply(null,arguments)},vc["catch"]=vc.catchError=vc.catchException=function(a){return"function"==typeof a?D(this,a):Sc([this,a])};var Sc=Cc.catchError=Cc["catch"]=Cc.catchException=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return xc(a).catchError()};vc.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return Array.isArray(b[0])?b[0].unshift(this):b.unshift(this),Tc.apply(this,b)};var Tc=Cc.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.pop();return a--,Array.isArray(b[0])&&(b=b[0]),new ed(function(c){function e(a){if(h[a]=!0,i||(i=h.every(cb))){try{var b=d.apply(null,k)}catch(e){return void c.onError(e)}c.onNext(b)}else j.filter(function(b,c){return c!==a}).every(cb)&&c.onCompleted()}function f(a){j[a]=!0,j.every(cb)&&c.onCompleted()}for(var g=function(){return!1},h=p(a,g),i=!1,j=p(a,g),k=new Array(a),l=new Array(a),m=0;a>m;m++)!function(a){var d=b[a],g=new cc;hb(d)&&(d=Zc(d)),g.setDisposable(d.subscribe(function(b){k[a]=b,e(a)},function(a){c.onError(a)},function(){f(a)})),l[a]=g}(m);return new Zb(l)},this)};vc.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);
3
- return a.unshift(this),Uc.apply(null,a)};var Uc=Cc.concat=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(arguments.length);for(var b=0,c=arguments.length;c>b;b++)a[b]=arguments[b]}return xc(a).concat()};vc.concatAll=vc.concatObservable=function(){return this.merge(1)},vc.merge=function(a){if("number"!=typeof a)return Vc(this,a);var b=this;return new ed(function(c){function d(a){var b=new cc;f.add(b),hb(a)&&(a=Zc(a)),b.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){c.onError(a)},function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new Zb,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},function(a){c.onError(a)},function(){g=!0,0===e&&c.onCompleted()})),f},b)};var Vc=Cc.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(bb(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=ic,b=0;d>b;b++)c.push(arguments[b]);else for(a=ic,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),C(a,c).mergeAll()};vc.mergeAll=vc.mergeObservable=function(){var a=this;return new ed(function(b){var c=new Zb,d=!1,e=new cc;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new cc;c.add(e),hb(a)&&(a=Zc(a)),e.setDisposable(a.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},function(a){b.onError(a)},function(){d=!0,1===c.length&&b.onCompleted()})),c},a)},vc.skipUntil=function(a){var b=this;return new ed(function(c){var d=!1,e=new Zb(b.subscribe(function(a){d&&c.onNext(a)},function(a){c.onError(a)},function(){d&&c.onCompleted()}));hb(a)&&(a=Zc(a));var f=new cc;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},function(a){c.onError(a)},function(){f.dispose()})),e},b)},vc["switch"]=vc.switchLatest=function(){var a=this;return new ed(function(b){var c=!1,d=new dc,e=!1,f=0,g=a.subscribe(function(a){var g=new cc,h=++f;c=!0,d.setDisposable(g),hb(a)&&(a=Zc(a)),g.setDisposable(a.subscribe(function(a){f===h&&b.onNext(a)},function(a){f===h&&b.onError(a)},function(){f===h&&(c=!1,e&&b.onCompleted())}))},function(a){b.onError(a)},function(){e=!0,!c&&b.onCompleted()});return new Zb(g,d)},a)},vc.takeUntil=function(a){var b=this;return new ed(function(c){return hb(a)&&(a=Zc(a)),new Zb(b.subscribe(c),a.subscribe(function(){c.onCompleted()},function(a){c.onError(a)},ab))},b)},vc.withLatestFrom=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.pop(),e=this;if("undefined"==typeof e)throw new Error("Source observable not found for withLatestFrom().");if("function"!=typeof d)throw new Error("withLatestFrom() expects a resultSelector function.");return Array.isArray(a[0])&&(a=a[0]),new ed(function(b){for(var c=function(){return!1},f=a.length,g=p(f,c),h=!1,i=new Array(f),j=new Array(f+1),k=0;f>k;k++)!function(c){var d=a[c],e=new cc;hb(d)&&(d=Zc(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(cb)},b.onError.bind(b),function(){})),j[c]=e}(k);var l=new cc;return l.setDisposable(e.subscribe(function(a){var c,e=[a].concat(i);if(h){try{c=d.apply(null,e)}catch(f){return void b.onError(f)}b.onNext(c)}},b.onError.bind(b),function(){b.onCompleted()})),j[f]=l,new Zb(j)},this)},vc.zip=function(){if(Array.isArray(arguments[0]))return E.apply(this,arguments);for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=this,e=b.pop();return b.unshift(d),new ed(function(a){function c(b){var c,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),c=e.apply(d,f)}catch(g){return void a.onError(g)}a.onNext(c)}else i.filter(function(a,c){return c!==b}).every(cb)&&a.onCompleted()}function f(b){i[b]=!0,i.every(function(a){return a})&&a.onCompleted()}for(var g=b.length,h=p(g,G),i=p(g,F),j=new Array(g),k=0;g>k;k++)!function(d){var e=b[d],g=new cc;hb(e)&&(e=Zc(e)),g.setDisposable(e.subscribe(function(a){h[d].push(a),c(d)},function(b){a.onError(b)},function(){f(d)})),j[d]=g}(k);return new Zb(j)},d)},Cc.zip=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.shift();return d.zip.apply(d,b)},Cc.zipArray=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return new ed(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(cb))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(cb)?void b.onCompleted():void 0}for(var e=a.length,f=p(e,function(){return[]}),g=p(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new cc,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},function(a){b.onError(a)},function(){d(e)}))}(i);return new Zb(h)})},vc.asObservable=function(){var a=this;return new ed(function(b){return a.subscribe(b)},this)},vc.dematerialize=function(){var a=this;return new ed(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},vc.distinctUntilChanged=function(a,b){var c=this;return b||(b=eb),new ed(function(d){var e,f=!1;return c.subscribe(function(c){var g=c;if(a)try{g=a(c)}catch(h){return void d.onError(h)}if(f)try{var i=b(e,g)}catch(h){return void d.onError(h)}f&&i||(f=!0,e=g,d.onNext(c))},function(a){d.onError(a)},function(){d.onCompleted()})},this)},vc["do"]=vc.tap=vc.doAction=function(a,b,c){var d=this,e="function"==typeof a||"undefined"==typeof a?zc(a||ab,b||ab,c||ab):a;return new ed(function(a){return d.subscribe(function(b){try{e.onNext(b)}catch(c){a.onError(c)}a.onNext(b)},function(b){try{e.onError(b)}catch(c){a.onError(c)}a.onError(b)},function(){try{e.onCompleted()}catch(b){a.onError(b)}a.onCompleted()})},this)},vc.doOnNext=vc.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},vc.doOnError=vc.tapOnError=function(a,b){return this.tap(ab,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},vc.doOnCompleted=vc.tapOnCompleted=function(a,b){return this.tap(ab,null,"undefined"!=typeof b?function(){a.call(b)}:a)},vc["finally"]=vc.ensure=function(a){var b=this;return new ed(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return ac(function(){try{d.dispose()}catch(b){throw b}finally{a()}})},this)},vc.finallyAction=function(a){return this.ensure(a)},vc.ignoreElements=function(){var a=this;return new ed(function(b){return a.subscribe(ab,function(a){b.onError(a)},function(){b.onCompleted()})},a)},vc.materialize=function(){var a=this;return new ed(function(b){return a.subscribe(function(a){b.onNext(qc(a))},function(a){b.onNext(rc(a)),b.onCompleted()},function(){b.onNext(sc()),b.onCompleted()})},a)},vc.repeat=function(a){return wc(this,a).concat()},vc.retry=function(a){return wc(this,a).catchError()},vc.retryWhen=function(a){return wc(this).catchErrorWhen(a)},vc.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new ed(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},function(a){e.onError(a)},function(){!h&&c&&e.onNext(a),e.onCompleted()})},d)},vc.skipLast=function(a){var b=this;return new ed(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},function(a){c.onError(a)},function(){c.onCompleted()})},b)},vc.startWith=function(){var a,b=0;arguments.length&&bb(arguments[0])?(a=arguments[0],b=1):a=ic;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return xc([Nc(c,a),this]).concat()},vc.takeLast=function(a){var b=this;return new ed(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})},b)},vc.selectConcat=vc.concatMap=function(a,b,c){return ib(a)&&ib(b)?this.concatMap(function(c,d){var e=a(c,d);return hb(e)&&(e=Zc(e)),(tb(e)||sb(e))&&(e=Lc(e)),e.map(function(a,e){return b(c,a,d,e)})}):ib(a)?H(this,a,c):H(this,function(){return a})};var Wc=function(a){function b(b,c,d){this.source=b,this.selector=vb(c,d,3),a.call(this)}return Vb(b,a),b.prototype.internalMap=function(a,c){var d=this;return new b(this.source,function(b,c,e){return a(d.selector(b,c,e),c,e)},c)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new I(a,this.selector,this))},b}(Ec);I.prototype.onNext=function(a){if(!this.isStopped){try{var b=this.selector(a,this.i++,this.source)}catch(c){return this.observer.onError(c)}this.observer.onNext(b)}},I.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},I.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},I.prototype.dispose=function(){this.isStopped=!0},I.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},vc.map=vc.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof Wc?this.internalMap(c,b):new Wc(this,c,b)},vc.pluck=function(){var b=arguments,c=arguments.length;if(0===c)throw new Error("List of properties cannot be empty.");return this.map(function(d){for(var e=d,f=0;c>f;f++){var g=e[b[f]];if("undefined"==typeof g)return a;e=g}return e})},vc.selectMany=vc.flatMap=function(a,b,c){return ib(a)&&ib(b)?this.flatMap(function(c,d){var e=a(c,d);return hb(e)&&(e=Zc(e)),(tb(e)||sb(e))&&(e=Lc(e)),e.map(function(a,e){return b(c,a,d,e)})},c):ib(a)?J(this,a,c):J(this,function(){return a})},vc.selectSwitch=vc.flatMapLatest=vc.switchMap=function(a,b){return this.select(a,b).switchLatest()},vc.skip=function(a){if(0>a)throw new Error(jb);var b=this;return new ed(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},function(a){c.onError(a)},function(){c.onCompleted()})},b)},vc.skipWhile=function(a,b){var c=this,d=vb(a,b,3);return new ed(function(a){var b=0,e=!1;return c.subscribe(function(f){if(!e)try{e=!d(f,b++,c)}catch(g){return void a.onError(g)}e&&a.onNext(f)},function(b){a.onError(b)},function(){a.onCompleted()})},c)},vc.take=function(a,b){if(0>a)throw new RangeError(jb);if(0===a)return Hc(b);var c=this;return new ed(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},function(a){b.onError(a)},function(){b.onCompleted()})},c)},vc.takeWhile=function(a,b){var c=this,d=vb(a,b,3);return new ed(function(a){var b=0,e=!0;return c.subscribe(function(f){if(e){try{e=d(f,b++,c)}catch(g){return void a.onError(g)}e?a.onNext(f):a.onCompleted()}},function(b){a.onError(b)},function(){a.onCompleted()})},c)};var Xc=function(a){function b(b,c,d){this.source=b,this.predicate=vb(c,d,3),a.call(this)}return Vb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new K(a,this.predicate,this))},b.prototype.internalFilter=function(a,c){var d=this;return new b(this.source,function(b,c,e){return d.predicate(b,c,e)&&a(b,c,e)},c)},b}(Ec);K.prototype.onNext=function(a){if(!this.isStopped){try{var b=this.predicate(a,this.i++,this.source)}catch(c){return this.observer.onError(c)}b&&this.observer.onNext(a)}},K.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},K.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},K.prototype.dispose=function(){this.isStopped=!0},K.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},vc.filter=vc.where=function(a,b){return this instanceof Xc?this.internalFilter(a,b):new Xc(this,a,b)},Cc.fromCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new ed(function(e){function f(){var a=arguments;if(c){try{a=c(a)}catch(b){return e.onError(b)}e.onNext(a)}else a.length<=1?e.onNext.apply(e,a):e.onNext(a);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},Cc.fromNodeCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new ed(function(e){function f(a){if(a)return void e.onError(a);for(var b=[],d=1,f=arguments.length;f>d;d++)b.push(arguments[d]);if(c){try{b=c(b)}catch(g){return e.onError(g)}e.onNext(b)}else b.length<=1?e.onNext.apply(e,b):e.onNext(b);e.onCompleted()}d.push(f),a.apply(b,d)}).publishLast().refCount()}},_.config.useNativeEvents=!1,Cc.fromEvent=function(a,b,c){return a.addListener?Yc(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c):_.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new ed(function(d){return M(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)})}).publish().refCount():Yc(function(c){a.on(b,c)},function(c){a.off(b,c)},c)};var Yc=Cc.fromEventPattern=function(a,b,c){return new ed(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return void d.onError(e)}d.onNext(b)}var f=a(e);return ac(function(){b&&b(e,f)})}).publish().refCount()},Zc=Cc.fromPromise=function(a){return Gc(function(){var b=new _.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};vc.toPromise=function(a){if(a||(a=_.config.Promise),!a)throw new TypeError("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})},Cc.startAsync=function(a){var b;try{b=a()}catch(c){return Rc(c)}return Zc(b)},vc.multicast=function(a,b){var c=this;return"function"==typeof a?new ed(function(d){var e=c.multicast(a());return new Zb(b(e).subscribe(d),e.connect())},c):new $c(c,a)},vc.publish=function(a){return a&&ib(a)?this.multicast(function(){return new hd},a):this.multicast(new hd)},vc.share=function(){return this.publish().refCount()},vc.publishLast=function(a){return a&&ib(a)?this.multicast(function(){return new id},a):this.multicast(new id)},vc.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new kd(b)},a):this.multicast(new kd(a))},vc.shareValue=function(a){return this.publishValue(a).refCount()},vc.replay=function(a,b,c,d){return a&&ib(a)?this.multicast(function(){return new ld(b,c,d)},a):this.multicast(new ld(b,c,d))},vc.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};{var $c=_.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new Zb(f.subscribe(c),ac(function(){e=!1}))),d},a.call(this,function(a){return c.subscribe(a)})}return Vb(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new ed(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(Cc),_c=Cc.interval=function(a,b){return Q(a,a,bb(b)?b:oc)};Cc.timer=function(b,c,d){var e;return bb(d)||(d=oc),c!==a&&"number"==typeof c?e=c:bb(c)&&(d=c),b instanceof Date&&e===a?N(b.getTime(),d):b instanceof Date&&e!==a?(e=c,O(b.getTime(),e,d)):e===a?P(b,d):Q(b,e,d)}}vc.delay=function(a,b){return bb(b)||(b=oc),a instanceof Date?S(this,a.getTime(),b):R(this,a,b)},vc.debounce=vc.throttleWithTimeout=function(a,b){bb(b)||(b=oc);var c=this;return new ed(function(d){var e,f=new dc,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new cc;f.setDisposable(j),j.setDisposable(b.scheduleWithRelative(a,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new Zb(i,f)},this)},vc.throttle=function(a,b){return this.debounce(a,b)},vc.timestamp=function(a){return bb(a)||(a=oc),this.map(function(b){return{value:b,timestamp:a.now()}})},vc.sample=vc.throttleLatest=function(a,b){return bb(b)||(b=oc),"number"==typeof a?T(this,_c(a,b)):T(this,a)},vc.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=Rc(new Error(b||"Timeout"))),bb(c)||(c=oc);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new ed(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(hb(b)&&(b=Zc(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new cc,j=new dc,k=!1,l=new dc;return j.setDisposable(i),g(),i.setDisposable(d.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new Zb(j,l)},d)},vc.throttleFirst=function(a,b){bb(b)||(b=oc);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new ed(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)};var ad=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=bc,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=bc)});return new Zb(c,d,e)}function c(c,d){this.source=c,this.controller=new hd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b,c)}return Vb(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(Cc);vc.pausable=function(a){return new ad(this,a)};var bd=function(b){function c(b){var c,d=[],e=U(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(c!==a&&e.shouldFire!=c){if(c=e.shouldFire,e.shouldFire)for(;d.length>0;)b.onNext(d.shift())}else c=e.shouldFire,e.shouldFire?b.onNext(e.data):d.push(e.data)},function(a){for(;d.length>0;)b.onNext(d.shift());b.onError(a)},function(){for(;d.length>0;)b.onNext(d.shift());b.onCompleted()});return e}function d(a,d){this.source=a,this.controller=new hd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c,a)}return Vb(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(Cc);vc.pausableBuffered=function(a){return new bd(this,a)};var cd=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b,c),this.subject=new dd(d),this.source=c.multicast(this.subject).refCount()}return Vb(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(Cc),dd=function(a){function b(a){return this.subject.subscribe(a)}function c(c){null==c&&(c=!0),a.call(this,b),this.subject=new hd,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=bc,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=bc}return Vb(c,a),Wb(c.prototype,yc,{onCompleted:function(){this.hasCompleted=!0,(!this.enableQueue||0===this.queue.length)&&this.subject.onCompleted()},onError:function(a){this.hasFailed=!0,this.error=a,(!this.enableQueue||0===this.queue.length)&&this.subject.onError(a)},onNext:function(a){var b=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(a):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),b=!0),b&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0;)this.subject.onNext(this.queue.shift()),a--;return 0!==this.queue.length?{numberOfItems:a,returnValue:!0}:{numberOfItems:a,returnValue:!1}}return this.hasFailed?(this.subject.onError(this.error),this.controlledDisposable.dispose(),this.controlledDisposable=bc):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=bc),{numberOfItems:a,returnValue:!1}},request:function(a){this.disposeCurrentRequest();var b=this,c=this._processRequest(a),a=c.numberOfItems;return c.returnValue?bc:(this.requestedCount=a,this.requestedDisposable=ac(function(){b.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=bc}}),c}(Cc);vc.controlled=function(a){return null==a&&(a=!0),new cd(this,a)},vc.transduce=function(a){function b(a){return{init:function(){return a},step:function(a,b){return a.onNext(b)},result:function(a){return a.onCompleted()}}}var c=this;return new ed(function(d){var e=a(b(d));return c.subscribe(function(a){try{e.step(d,a)}catch(b){d.onError(b)}},d.onError.bind(d),function(){e.result(d)})},c)};var ed=_.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?ac(a):bc}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e(d)))}catch(f){if(!d.fail(f))throw f}}function d(b,d){function e(a){var d=new fd(a),e=[d,b];return jc.scheduleRequired()?jc.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return Vb(d,a),d}(Cc),fd=function(a){function b(b){a.call(this),this.observer=b,this.m=new cc}Vb(b,a);var c=b.prototype;return c.next=function(a){var b=!1;try{this.observer.onNext(a),b=!0}catch(c){return o(c)}finally{!b&&this.dispose()}},c.error=function(a){try{this.observer.onError(a)}catch(b){return o(b)}finally{this.dispose()}},c.completed=function(){try{this.observer.onCompleted()}catch(a){return o(a)}finally{this.dispose()}},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(Ac),gd=function(a,b){this.subject=a,this.observer=b};gd.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var hd=_.Subject=function(a){function d(a){return b(this),this.isStopped?this.hasError?(a.onError(this.error),bc):(a.onCompleted(),bc):(this.observers.push(a),new gd(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return Vb(e,a),Wb(e.prototype,yc.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped)for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),e.create=function(a,b){return new jd(a,b)},e}(Cc),id=_.AsyncSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),bc):(this.observers.push(a),new gd(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return Vb(e,a),Wb(e.prototype,yc,{hasObservers:function(){return b(this),this.observers.length>0},onCompleted:function(){var a,d;if(b(this),!this.isStopped){this.isStopped=!0;var e=c(this.observers),d=e.length;if(this.hasValue)for(a=0;d>a;a++){var f=e[a];f.onNext(this.value),f.onCompleted()}else for(a=0;d>a;a++)e[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){b(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),e}(Cc),jd=_.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return Vb(c,a),Wb(c.prototype,yc.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(Cc),kd=_.BehaviorSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),bc):(this.observers.push(a),a.onNext(this.value),new gd(this,a))}function e(b){a.call(this,d),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return Vb(e,a),Wb(e.prototype,yc,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped){this.value=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),e}(Cc),ld=_.ReplaySubject=function(a){function d(a,b){return ac(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function e(a){var c=new Dc(this.scheduler,a),e=d(this,c);b(this),this._trim(this.scheduler.now()),this.observers.push(c);for(var f=0,g=this.q.length;g>f;f++)c.onNext(this.q[f].value);return this.hasError?c.onError(this.error):this.isStopped&&c.onCompleted(),c.ensureActive(),e}function f(b,c,d){this.bufferSize=null==b?Number.MAX_VALUE:b,this.windowSize=null==c?Number.MAX_VALUE:c,this.scheduler=d||jc,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,e)}return Vb(f,a),Wb(f.prototype,yc.prototype,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(b(this),!this.isStopped){var d=this.scheduler.now();this.q.push({interval:d,value:a}),this._trim(d);for(var e=0,f=c(this.observers),g=f.length;g>e;e++){var h=f[e];h.onNext(a),h.ensureActive()}}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var d=this.scheduler.now();this._trim(d);for(var e=0,f=c(this.observers),g=f.length;g>e;e++){var h=f[e];h.onError(a),h.ensureActive()}this.observers.length=0}},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var d=0,e=c(this.observers),f=e.length;f>d;d++){var g=e[d];g.onCompleted(),g.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),f}(Cc);_.Pauser=function(a){function b(){a.call(this)}return Vb(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(hd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(W.Rx=_,define(function(){return _})):X&&Y?Z?(Y.exports=_).Rx=_:X.Rx=_:W.Rx=_;var md=h()}).call(this);
2
+ (function(a){function b(a){for(var b=a.length,c=new Array(b),d=0;b>d;d++)c[d]=a[d];return c}function c(a,b){if(lb&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(pb)){for(var c=[],e=b;e;e=e.source)e.stack&&c.unshift(e.stack);c.unshift(a.stack);var f=c.join("\n"+pb+"\n");a.stack=d(f)}}function d(a){for(var b=a.split("\n"),c=[],d=0,g=b.length;g>d;d++){var h=b[d];e(h)||f(h)||!h||c.push(h)}return c.join("\n")}function e(a){var b=h(a);if(!b)return!1;var c=b[0],d=b[1];return c===nb&&d>=ob&&Id>=d}function f(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function g(){if(lb)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=h(c);if(!d)return;return nb=d[0],d[1]}}function h(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function i(a){var b=[];if(!Yb(a))return b;Xb.nonEnumArgs&&a.length&&Zb(a)&&(a=bc.call(a));var c=Xb.enumPrototypes&&"function"==typeof a,d=Xb.enumErrorProps&&(a===Sb||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(Xb.nonEnumShadows&&a!==Tb){var f=a.constructor,g=-1,h=Eb;if(a===(f&&f.prototype))var i=a===Ub?Ob:a===Sb?Jb:Pb.call(a),j=Wb[i];for(;++g<h;)e=Db[g],j&&j[e]||!Qb.call(a,e)||b.push(e)}return b}function j(a,b,c){for(var d=-1,e=c(a),f=e.length;++d<f;){var g=e[d];if(b(a[g],g,a)===!1)break}return a}function k(a,b){return j(a,b,i)}function l(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}function m(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;var e=typeof a,f=typeof b;if(a===a&&(null==a||null==b||"function"!=e&&"object"!=e&&"function"!=f&&"object"!=f))return!1;var g=Pb.call(a),h=Pb.call(b);if(g==Fb&&(g=Mb),h==Fb&&(h=Mb),g!=h)return!1;switch(g){case Hb:case Ib:return+a==+b;case Lb:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case Nb:case Ob:return a==String(b)}var i=g==Gb;if(!i){if(g!=Mb||!Xb.nodeClass&&(l(a)||l(b)))return!1;var j=!Xb.argsObject&&Zb(a)?Object:a.constructor,n=!Xb.argsObject&&Zb(b)?Object:b.constructor;if(!(j==n||Qb.call(a,"constructor")&&Qb.call(b,"constructor")||kb(j)&&j instanceof j&&kb(n)&&n instanceof n||!("constructor"in a&&"constructor"in b)))return!1}c||(c=[]),d||(d=[]);for(var o=c.length;o--;)if(c[o]==a)return d[o]==b;var p=0,q=!0;if(c.push(a),d.push(b),i){if(o=a.length,p=b.length,q=p==o)for(;p--;){var r=b[p];if(!(q=m(a[p],r,c,d)))break}}else k(b,function(b,e,f){return Qb.call(f,e)?(p++,q=Qb.call(a,e)&&m(a[e],b,c,d)):void 0}),q&&k(a,function(a,b,c){return Qb.call(c,b)?q=--p>-1:void 0});return c.pop(),d.pop(),q}function n(){try{return $b.apply(this,arguments)}catch(a){return ac.e=a,ac}}function o(a){if(!kb(a))throw new TypeError("fn must be a function");return $b=a,n}function p(a){throw a}function q(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function r(a,b){this.id=a,this.value=b}function t(a){this.observer=a,this.a=[],this.isStopped=!1}function u(){this._s=s}function v(){this._s=s,this._l=s.length,this._i=0}function w(a){this._a=a}function x(a){this._a=a,this._l=B(a),this._i=0}function y(a){return"number"==typeof a&&Z.isFinite(a)}function z(b){var c,d=b[xb];if(!d&&"string"==typeof b)return c=new u(b),c[xb]();if(!d&&b.length!==a)return c=new w(b),c[xb]();if(!d)throw new TypeError("Object is not iterable");return b[xb]()}function A(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function B(a){var b=+a.length;return isNaN(b)?0:0!==b&&y(b)?(b=A(b)*Math.floor(Math.abs(b)),0>=b?0:b>Xc?Xc:b):b}function C(a,b){this.observer=a,this.parent=b}function D(a,b){return sc(a)||(a=wc),new Zc(b,a)}function E(a,b){this.observer=a,this.parent=b}function F(a,b){this.observer=a,this.parent=b}function G(a,b){return new Ad(function(c){var d=new nc,e=new oc;return e.setDisposable(d),d.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){try{var d=b(a)}catch(f){return c.onError(f)}jb(d)&&(d=td(d));var g=new nc;e.setDisposable(g),g.setDisposable(d.subscribe(c))},function(a){c.onCompleted(a)})),e},a)}function H(a,b){var c=this;return new Ad(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return d.onError(i)}d.onNext(g)}else d.onCompleted()},function(a){d.onError(a)},function(){d.onCompleted()})},c)}function I(){return!1}function J(){return[]}function K(a,b,c){var d=Cb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return jb(e)&&(e=td(e)),(Ab(e)||zb(e))&&(e=Yc(e)),e}).concatAll()}function L(a,b,c){this.observer=a,this.selector=b,this.source=c,this.i=0,this.isStopped=!1}function M(a,b,c){var d=Cb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return jb(e)&&(e=td(e)),(Ab(e)||zb(e))&&(e=Yc(e)),e}).mergeAll()}function N(a,b,c){this.observer=a,this.predicate=b,this.source=c,this.i=0,this.isStopped=!1}function O(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),jc(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function P(a,b,c){var d=new gc;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(P(a.item(e),b,c));else a&&d.add(O(a,b,c));return d}function Q(a,b){return new Ad(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function R(a,b,c){return new Ad(function(d){var e=a,f=rc(b);return c.scheduleRecursiveWithAbsoluteAndState(0,e,function(a,b){if(f>0){var g=c.now();e+=f,g>=e&&(e=g+f)}d.onNext(a),b(a+1,e)})})}function S(a,b){return new Ad(function(c){return b.scheduleWithRelative(rc(a),function(){c.onNext(0),c.onCompleted()})})}function T(a,b,c){return a===b?new Ad(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):Sc(function(){return R(c.now()+a,b,c)})}function U(a,b,c){return new Ad(function(d){var e,f=!1,g=new oc,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new nc,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new gc(e,g)},a)}function V(a,b,c){return Sc(function(){return U(a,b-c.now(),c)})}function W(a,b){return new Ad(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new gc(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))},a)}function X(a,b,c){return new Ad(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(eb))){if(f)return void d.onError(f);try{e=c.apply(null,j)}catch(k){return void d.onError(k)}d.onNext(e)}i&&j[1]&&d.onCompleted()}var f,g=[!1,!1],h=!1,i=!1,j=new Array(2);return new gc(a.subscribe(function(a){e(a,0)},function(a){j[1]?d.onError(a):f=a},function(){i=!0,j[1]&&d.onCompleted()}),b.subscribe(function(a){e(a,1)},function(a){d.onError(a)},function(){i=!0,e(!0,1)}))},a)}var Y={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},Z=Y[typeof window]&&window||this,$=Y[typeof exports]&&exports&&!exports.nodeType&&exports,_=Y[typeof module]&&module&&!module.nodeType&&module,ab=_&&_.exports===$&&$,bb=Y[typeof global]&&global;!bb||bb.global!==bb&&bb.window!==bb||(Z=bb);var cb={internals:{},config:{Promise:Z.Promise},helpers:{}},db=cb.helpers.noop=function(){},eb=(cb.helpers.notDefined=function(a){return"undefined"==typeof a},cb.helpers.identity=function(a){return a}),fb=(cb.helpers.pluck=function(a){return function(b){return b[a]}},cb.helpers.just=function(a){return function(){return a}},cb.helpers.defaultNow=Date.now),gb=cb.helpers.defaultComparer=function(a,b){return _b(a,b)},hb=cb.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},ib=(cb.helpers.defaultKeySerializer=function(a){return a.toString()},cb.helpers.defaultError=function(a){throw a}),jb=cb.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},kb=(cb.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},cb.helpers.not=function(a){return!a},cb.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==Pb.call(a)}),a}());cb.config.longStackSupport=!1;var lb=!1;try{throw new Error}catch(mb){lb=!!mb.stack}var nb,ob=g(),pb="From previous event:",qb=cb.EmptyError=function(){this.message="Sequence contains no elements.",Error.call(this)};qb.prototype=Error.prototype;var rb=cb.ObjectDisposedError=function(){this.message="Object has been disposed",Error.call(this)};rb.prototype=Error.prototype;var sb=cb.ArgumentOutOfRangeError=function(){this.message="Argument out of range",Error.call(this)};sb.prototype=Error.prototype;var tb=cb.NotSupportedError=function(a){this.message=a||"This operation is not supported",Error.call(this)};tb.prototype=Error.prototype;var ub=cb.NotImplementedError=function(a){this.message=a||"This operation is not implemented",Error.call(this)};ub.prototype=Error.prototype;var vb=cb.helpers.notImplemented=function(){throw new ub},wb=cb.helpers.notSupported=function(){throw new tb},xb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";Z.Set&&"function"==typeof(new Z.Set)["@@iterator"]&&(xb="@@iterator");var yb=cb.doneEnumerator={done:!0,value:a},zb=cb.helpers.isIterable=function(b){return b[xb]!==a},Ab=cb.helpers.isArrayLike=function(b){return b&&b.length!==a};cb.helpers.iterator=xb;var Bb,Cb=cb.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},Db=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Eb=Db.length,Fb="[object Arguments]",Gb="[object Array]",Hb="[object Boolean]",Ib="[object Date]",Jb="[object Error]",Kb="[object Function]",Lb="[object Number]",Mb="[object Object]",Nb="[object RegExp]",Ob="[object String]",Pb=Object.prototype.toString,Qb=Object.prototype.hasOwnProperty,Rb=Pb.call(arguments)==Fb,Sb=Error.prototype,Tb=Object.prototype,Ub=String.prototype,Vb=Tb.propertyIsEnumerable;try{Bb=!(Pb.call(document)==Mb&&!({toString:0}+""))}catch(mb){Bb=!0}var Wb={};Wb[Gb]=Wb[Ib]=Wb[Lb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Wb[Hb]=Wb[Ob]={constructor:!0,toString:!0,valueOf:!0},Wb[Jb]=Wb[Kb]=Wb[Nb]={constructor:!0,toString:!0},Wb[Mb]={constructor:!0};var Xb={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);Xb.enumErrorProps=Vb.call(Sb,"message")||Vb.call(Sb,"name"),Xb.enumPrototypes=Vb.call(a,"prototype"),Xb.nonEnumArgs=0!=c,Xb.nonEnumShadows=!/valueOf/.test(b)}(1);var Yb=cb.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},Zb=function(a){return a&&"object"==typeof a?Pb.call(a)==Fb:!1};Rb||(Zb=function(a){return a&&"object"==typeof a?Qb.call(a,"callee"):!1});{var $b,_b=cb.internals.isEqual=function(a,b){return m(a,b,[],[])},ac={e:{}},bc=({}.hasOwnProperty,Array.prototype.slice),cc=this.inherits=cb.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},dc=cb.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}};cb.internals.addRef=function(a,b){return new Ad(function(c){return new gc(b.getDisposable(),a.subscribe(c))})}}r.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var ec=cb.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},fc=ec.prototype;fc.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},fc.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},fc.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(b<this.length&&this.isHigherPriority(b,d)&&(d=b),c<this.length&&this.isHigherPriority(c,d)&&(d=c),d!==a){var e=this.items[a];this.items[a]=this.items[d],this.items[d]=e,this.heapify(d)}}},fc.peek=function(){return this.items[0].value},fc.removeAt=function(b){this.items[b]=this.items[--this.length],this.items[this.length]=a,this.heapify()},fc.dequeue=function(){var a=this.peek();return this.removeAt(0),a},fc.enqueue=function(a){var b=this.length++;this.items[b]=new r(ec.count++,a),this.percolate(b)},fc.remove=function(a){for(var b=0;b<this.length;b++)if(this.items[b].value===a)return this.removeAt(b),!0;return!1},ec.count=0;var gc=cb.CompositeDisposable=function(){var a,b,c=[];if(Array.isArray(arguments[0]))c=arguments[0],b=c.length;else for(b=arguments.length,c=new Array(b),a=0;b>a;a++)c[a]=arguments[a];for(a=0;b>a;a++)if(!lc(c[a]))throw new TypeError("Not a disposable");this.disposables=c,this.isDisposed=!1,this.length=c.length},hc=gc.prototype;hc.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},hc.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},hc.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=this.disposables.length,b=new Array(a),c=0;a>c;c++)b[c]=this.disposables[c];for(this.disposables=[],this.length=0,c=0;a>c;c++)b[c].dispose()}};var ic=cb.Disposable=function(a){this.isDisposed=!1,this.action=a||db};ic.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var jc=ic.create=function(a){return new ic(a)},kc=ic.empty={dispose:db},lc=ic.isDisposable=function(a){return a&&kb(a.dispose)},mc=ic.checkDisposed=function(a){if(a.isDisposed)throw new rb},nc=cb.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null};nc.prototype.getDisposable=function(){return this.current},nc.prototype.setDisposable=function(a){if(this.current)throw new Error("Disposable has already been assigned");var b=this.isDisposed;!b&&(this.current=a),b&&a&&a.dispose()},nc.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var oc=cb.SerialDisposable=function(){this.isDisposed=!1,this.current=null};oc.prototype.getDisposable=function(){return this.current},oc.prototype.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},oc.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var pc=(cb.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?kc:new a(this)},b}(),cb.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||hb,this.disposable=new nc});pc.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},pc.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},pc.prototype.isCancelled=function(){return this.disposable.isDisposed},pc.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var qc=cb.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),kc}a.isScheduler=function(b){return b instanceof a};var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=fb,a.normalize=function(a){return 0>a&&(a=0),a},a}(),rc=qc.normalize,sc=qc.isScheduler;!function(a){function b(a,b){function c(b){e(b,function(b){var d=!1,e=!1,g=a.scheduleWithState(b,function(a,b){return d?f.remove(g):e=!0,c(b),kc});e||(f.add(g),d=!0)})}var d=b[0],e=b[1],f=new gc;return c(d),f}function c(a,b,c){function d(b){f(b,function(b,e){var f=!1,h=!1,i=a[c](b,e,function(a,b){return f?g.remove(i):h=!0,d(b),kc});h||(g.add(i),f=!0)})}var e=b[0],f=b[1],g=new gc;return d(e),g}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState([a,c],b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative([a,d],b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute([a,d],b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(qc.prototype),function(){qc.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},qc.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof Z.setInterval)throw new tb;b=rc(b);var d=a,e=Z.setInterval(function(){d=c(d)},b);return jc(function(){Z.clearInterval(e)})}}(qc.prototype);var tc,uc,vc=qc.immediate=function(){function a(a,b){return b(this,a)}return new qc(fb,a,wb,wb)}(),wc=qc.currentThread=function(){function a(){for(;c.length>0;){var a=c.dequeue();!a.isCancelled()&&a.invoke()}}function b(b,d){var e=new pc(this,b,d,this.now());if(c)c.enqueue(e);else{c=new ec(4),c.enqueue(e);var f=o(a)();if(c=null,f===ac)return p(f.e)}return e.disposable}var c,d=new qc(fb,b,wb,wb);return d.scheduleRequired=function(){return!c},d}(),xc=(cb.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new nc;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),function(){var a,b=db;if(Z.setTimeout)a=Z.setTimeout,b=Z.clearTimeout;else{if(!Z.WScript)throw new tb;a=function(a,b){Z.WScript.Sleep(b),a()}}return{setTimeout:a,clearTimeout:b}}()),yc=xc.setTimeout,zc=xc.clearTimeout;!function(){function a(b){if(f)yc(function(){a(b)},0);else{var c=e[b];if(c){f=!0;var d=o(c)();if(uc(b),f=!1,d===ac)return p(d.e)}}}function b(){if(!Z.postMessage||Z.importScripts)return!1;var a=!1,b=Z.onmessage;return Z.onmessage=function(){a=!0},Z.postMessage("","*"),Z.onmessage=b,a}function c(b){"string"==typeof b.data&&b.data.substring(0,i.length)===i&&a(b.data.substring(i.length))}var d=1,e={},f=!1;uc=function(a){delete e[a]};var g=RegExp("^"+String(Pb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),h="function"==typeof(h=bb&&ab&&bb.setImmediate)&&!g.test(h)&&h;if(kb(h))tc=function(b){var c=d++;return e[c]=b,h(function(){a(c)}),c};else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))tc=function(b){var c=d++;return e[c]=b,process.nextTick(function(){a(c)}),c};else if(b()){var i="ms.rx.schedule"+Math.random();Z.addEventListener?Z.addEventListener("message",c,!1):Z.attachEvent?Z.attachEvent("onmessage",c):Z.onmessage=c,tc=function(a){var b=d++;return e[b]=a,Z.postMessage(i+currentId,"*"),b}}else if(Z.MessageChannel){var j=new Z.MessageChannel;j.port1.onmessage=function(b){a(b.data)},tc=function(a){var b=d++;return e[b]=a,j.port2.postMessage(b),b}}else tc="document"in Z&&"onreadystatechange"in Z.document.createElement("script")?function(b){var c=Z.document.createElement("script"),f=d++;return e[f]=b,c.onreadystatechange=function(){a(f),c.onreadystatechange=null,c.parentNode.removeChild(c),c=null},Z.document.documentElement.appendChild(c),f}:function(b){var c=d++;return e[c]=b,yc(function(){a(c)},0),c}}();var Ac=qc.timeout=qc["default"]=function(){function a(a,b){var c=this,d=new nc,e=tc(function(){!d.isDisposed&&d.setDisposable(b(c,a))});return new gc(d,jc(function(){uc(e)}))}function b(a,b,c){var d=this,e=qc.normalize(b),f=new nc;if(0===e)return d.scheduleWithState(a,c);var g=yc(function(){!f.isDisposed&&f.setDisposable(c(d,a))},e);return new gc(f,jc(function(){zc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new qc(fb,a,b,c)}(),Bc=cb.Notification=function(){function a(a,b,c,d,e,f){this.kind=a,this.value=b,this.exception=c,this._accept=d,this._acceptObservable=e,this.toString=f}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return sc(a)||(a=vc),new Ad(function(c){return a.scheduleWithState(b,function(a,b){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Cc=Bc.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){return new Bc("N",d,null,a,b,c)}}(),Dc=Bc.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){return new Bc("E",null,d,a,b,c)}}(),Ec=Bc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){return new Bc("C",null,null,a,b,c)}}(),Fc=cb.internals.Enumerator=function(a){this._next=a};Fc.prototype.next=function(){return this._next()},Fc.prototype[xb]=function(){return this};var Gc=cb.internals.Enumerable=function(a){this._iterator=a};Gc.prototype[xb]=function(){return this._iterator()},Gc.prototype.concat=function(){var a=this;return new Ad(function(b){var c,d=a[xb](),e=new oc,f=vc.scheduleRecursive(function(a){if(!c){try{var f=d.next()}catch(g){return b.onError(g)}if(f.done)return b.onCompleted();var h=f.value;jb(h)&&(h=td(h));var i=new nc;e.setDisposable(i),i.setDisposable(h.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},a))}});return new gc(e,f,jc(function(){c=!0}))})},Gc.prototype.catchError=function(){var a=this;return new Ad(function(b){var c,d=a[xb](),e=new oc,f=vc.scheduleRecursiveWithState(null,function(a,f){if(!c){try{var g=d.next()}catch(h){return observer.onError(h)}if(g.done)return void(null!==a?b.onError(a):b.onCompleted());var i=g.value;jb(i)&&(i=td(i));var j=new nc;e.setDisposable(j),j.setDisposable(i.subscribe(function(a){b.onNext(a)},f,function(){b.onCompleted()}))}});return new gc(e,f,jc(function(){c=!0}))})},Gc.prototype.catchErrorWhen=function(a){var b=this;return new Ad(function(c){var d,e,f=new Dd,g=new Dd,h=a(f),i=h.subscribe(g),j=b[xb](),k=new oc,l=vc.scheduleRecursive(function(a){if(!d){try{var b=j.next()}catch(h){return c.onError(h)}if(b.done)return void(e?c.onError(e):c.onCompleted());var i=b.value;jb(i)&&(i=td(i));var l=new nc,m=new nc;k.setDisposable(new gc(m,l)),l.setDisposable(i.subscribe(function(a){c.onNext(a)},function(b){m.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new gc(i,k,l,jc(function(){d=!0}))})};var Hc,Ic=Gc.repeat=function(a,b){return null==b&&(b=-1),new Gc(function(){var c=b;return new Fc(function(){return 0===c?yb:(c>0&&c--,{done:!1,value:a})})})},Jc=Gc.of=function(a,b,c){if(b)var d=Cb(b,c,3);return new Gc(function(){var c=-1;return new Fc(function(){return++c<a.length?{done:!1,value:b?d(a[c],c,a):a[c]}:yb})})},Kc=cb.Observer=function(){},Lc=Kc.create=function(a,b,c){return a||(a=db),b||(b=ib),c||(c=db),new Nc(a,b,c)},Mc=cb.internals.AbstractObserver=function(a){function b(){this.isStopped=!1,a.call(this)}return cc(b,a),b.prototype.next=vb,b.prototype.error=vb,b.prototype.completed=vb,b.prototype.onNext=function(a){this.isStopped||this.next(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.error(a))},b.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.error(a),!0)},b}(Kc),Nc=cb.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return cc(b,a),b.prototype.next=function(a){this._onNext(a)},b.prototype.error=function(a){this._onError(a)},b.prototype.completed=function(){this._onCompleted()},b}(Mc),Oc=cb.Observable=function(){function a(a){if(cb.config.longStackSupport&&lb){try{throw new Error}catch(b){this.stack=b.stack.substring(b.stack.indexOf("\n")+1)}var d=this;this._subscribe=function(b){var e=b.onError.bind(b);return b.onError=function(a){c(a,d),e(a)},a.call(d,b)}}else this._subscribe=a}return Hc=a.prototype,Hc.subscribe=Hc.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:Lc(a,b,c))},Hc.subscribeOnNext=function(a,b){return this._subscribe(Lc("undefined"!=typeof b?function(c){a.call(b,c)}:a))},Hc.subscribeOnError=function(a,b){return this._subscribe(Lc(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},Hc.subscribeOnCompleted=function(a,b){return this._subscribe(Lc(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},a}(),Pc=cb.internals.ScheduledObserver=function(a){function b(b,c){a.call(this),this.scheduler=b,this.observer=c,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new oc}return cc(b,a),b.prototype.next=function(a){var b=this;this.queue.push(function(){b.observer.onNext(a)})},b.prototype.error=function(a){var b=this;this.queue.push(function(){b.observer.onError(a)})},b.prototype.completed=function(){var a=this;this.queue.push(function(){a.observer.onCompleted()})},b.prototype.ensureActive=function(){var a=!1,b=this;!this.hasFaulted&&this.queue.length>0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(Mc),Qc=cb.ObservableBase=function(a){function b(a){return a&&kb(a.dispose)?a:kb(a)?jc(a):kc}function c(a,c){var d=c[0],e=c[1],f=o(e.subscribeCore).call(e,d);return f!==ac||d.fail(ac.e)?void d.setDisposable(b(f)):p(ac.e)}function d(a){var b=new Bd(a),d=[b,this];return wc.scheduleRequired()?wc.scheduleWithState(d,c):c(null,d),b}function e(){a.call(this,d)}return cc(e,a),e.prototype.subscribeCore=vb,e}(Oc),Rc=function(a){function b(b){this.source=b,a.call(this)}return cc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new t(a))},b}(Qc);t.prototype.onNext=function(a){this.isStopped||this.a.push(a)},t.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},t.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onNext(this.a),this.observer.onCompleted())},t.prototype.dispose=function(){this.isStopped=!0},t.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},Hc.toArray=function(){return new Rc(this)},Oc.create=Oc.createWithDisposable=function(a,b){return new Ad(a,b)};var Sc=Oc.defer=function(a){return new Ad(function(b){var c;try{c=a()}catch(d){return gd(d).subscribe(b)}return jb(c)&&(c=td(c)),c.subscribe(b)})},Tc=function(a){function b(b){this.scheduler=b,a.call(this)}function c(a,b){this.observer=a,this.parent=b}function d(a,b){b.onCompleted()}return cc(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this);return b.run()},c.prototype.run=function(){return this.parent.scheduler.scheduleWithState(this.observer,d)},b}(Qc),Uc=Oc.empty=function(a){return sc(a)||(a=vc),new Tc(a)},Vc=function(a){function b(b,c,d){this.iterable=b,this.mapper=c,this.scheduler=d,a.call(this)}return cc(b,a),b.prototype.subscribeCore=function(a){var b=new Wc(a,this);return b.run()},b}(Qc),Wc=function(){function a(a,b){this.observer=a,this.parent=b}return a.prototype.run=function(){function a(a,b){try{var f=c.next()}catch(g){return d.onError(g)}if(f.done)return d.onCompleted();var h=f.value;if(e)try{h=e(h,a)}catch(g){return d.onError(g)}d.onNext(h),b(a+1)}var b=Object(this.parent.iterable),c=z(b),d=this.observer,e=this.parent.mapper;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}(),Xc=Math.pow(2,53)-1;u.prototype[xb]=function(){return new v(this._s)},v.prototype[xb]=function(){return this},v.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:yb},w.prototype[xb]=function(){return new x(this._a)},x.prototype[xb]=function(){return this},x.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:yb};var Yc=Oc.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!kb(b))throw new Error("mapFn when provided must be a function");if(b)var e=Cb(b,c,2);return sc(d)||(d=wc),new Vc(a,e,d)},Zc=function(a){function b(b,c){this.args=b,this.scheduler=c,a.call(this)}return cc(b,a),b.prototype.subscribeCore=function(a){var b=new C(a,this);return b.run()},b}(Qc);C.prototype.run=function(){function a(a,e){d>a?(b.onNext(c[a]),e(a+1)):b.onCompleted()}var b=this.observer,c=this.parent.args,d=c.length;return this.parent.scheduler.scheduleRecursiveWithState(0,a)};{var $c=Oc.fromArray=function(a,b){return sc(b)||(b=wc),new Zc(a,b)},_c=function(a){function b(){a.call(this)}return cc(b,a),b.prototype.subscribeCore=function(){return kc},b}(Qc);Oc.never=function(){return new _c}}Oc.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return new Zc(b,wc)},Oc.ofWithScheduler=function(a){for(var b=arguments.length,c=new Array(b-1),d=1;b>d;d++)c[d-1]=arguments[d];return new Zc(c,a)};var ad=function(a){function b(b,c){this.obj=b,this.keys=Object.keys(b),this.scheduler=c,a.call(this)}return cc(b,a),b.prototype.subscribeCore=function(a){var b=new E(a,this);return b.run()},b}(Qc);E.prototype.run=function(){function a(a,f){if(e>a){var g=d[a];b.onNext([g,c[g]]),f(a+1)}else b.onCompleted()}var b=this.observer,c=this.parent.obj,d=this.parent.keys,e=d.length;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},Oc.pairs=function(a,b){return b||(b=wc),new ad(a,b)};var bd=function(a){function b(b,c,d){this.start=b,this.count=c,this.scheduler=d,a.call(this)}return cc(b,a),b.prototype.subscribeCore=function(a){var b=new cd(a,this);return b.run()},b}(Qc),cd=function(){function a(a,b){this.observer=a,this.parent=b}return a.prototype.run=function(){function a(a,e){c>a?(d.onNext(b+a),e(a+1)):d.onCompleted()
3
+ }var b=this.parent.start,c=this.parent.count,d=this.observer;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}();Oc.range=function(a,b,c){return sc(c)||(c=wc),new bd(a,b,c)};var dd=function(a){function b(b,c,d){this.value=b,this.repeatCount=null==c?-1:c,this.scheduler=d,a.call(this)}return cc(b,a),b.prototype.subscribeCore=function(a){var b=new F(a,this);return b.run()},b}(Qc);F.prototype.run=function(){function a(a,d){return(-1===a||a>0)&&(b.onNext(c),a>0&&a--),0===a?b.onCompleted():void d(a)}var b=this.observer,c=this.parent.value;return this.parent.scheduler.scheduleRecursiveWithState(this.parent.repeatCount,a)},Oc.repeat=function(a,b,c){return sc(c)||(c=wc),new dd(a,b,c)};var ed=function(a){function b(b,c){this.value=b,this.scheduler=c,a.call(this)}function c(a,b){this.observer=a,this.parent=b}function d(a,b){var c=b[0],d=b[1];d.onNext(c),d.onCompleted()}return cc(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this);return b.run()},c.prototype.run=function(){return this.parent.scheduler.scheduleWithState([this.parent.value,this.observer],d)},b}(Qc),fd=(Oc["return"]=Oc.just=Oc.returnValue=function(a,b){return sc(b)||(b=vc),new ed(a,b)},function(a){function b(b,c){this.error=b,this.scheduler=c,a.call(this)}function c(a,b){this.observer=a,this.parent=b}function d(a,b){var c=b[0],d=b[1];d.onError(c)}return cc(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this);return b.run()},c.prototype.run=function(){return this.parent.scheduler.scheduleWithState([this.parent.error,this.observer],d)},b}(Qc)),gd=Oc["throw"]=Oc.throwError=Oc.throwException=function(a,b){return sc(b)||(b=vc),new fd(a,b)};Hc["catch"]=Hc.catchError=Hc.catchException=function(a){return"function"==typeof a?G(this,a):hd([this,a])};var hd=Oc.catchError=Oc["catch"]=Oc.catchException=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return Jc(a).catchError()};Hc.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return Array.isArray(b[0])?b[0].unshift(this):b.unshift(this),id.apply(this,b)};var id=Oc.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.pop();return Array.isArray(b[0])&&(b=b[0]),new Ad(function(a){function c(b){if(h[b]=!0,i||(i=h.every(eb))){try{var c=d.apply(null,k)}catch(e){return a.onError(e)}a.onNext(c)}else j.filter(function(a,c){return c!==b}).every(eb)&&a.onCompleted()}function e(b){j[b]=!0,j.every(eb)&&a.onCompleted()}for(var f=b.length,g=function(){return!1},h=q(f,g),i=!1,j=q(f,g),k=new Array(f),l=new Array(f),m=0;f>m;m++)!function(d){var f=b[d],g=new nc;jb(f)&&(f=td(f)),g.setDisposable(f.subscribe(function(a){k[d]=a,c(d)},function(b){a.onError(b)},function(){e(d)})),l[d]=g}(m);return new gc(l)},this)};Hc.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),jd.apply(null,a)};var jd=Oc.concat=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(arguments.length);for(var b=0,c=arguments.length;c>b;b++)a[b]=arguments[b]}return Jc(a).concat()};Hc.concatAll=Hc.concatObservable=function(){return this.merge(1)};var kd=function(a){function b(b,c){this.source=b,this.maxConcurrent=c,a.call(this)}return cc(b,a),b.prototype.subscribeCore=function(a){var b=new gc;return b.add(this.source.subscribe(new ld(a,this.maxConcurrent,b))),b},b}(Qc),ld=function(){function a(a,b,c){this.o=a,this.max=b,this.g=c,this.done=!1,this.q=[],this.activeCount=0,this.isStopped=!1}function b(a,b){this.parent=a,this.sad=b,this.isStopped=!1}return a.prototype.handleSubscribe=function(a){var c=new nc;this.g.add(c),jb(a)&&(a=td(a)),c.setDisposable(a.subscribe(new b(this,c)))},a.prototype.onNext=function(a){this.isStopped||(this.activeCount<this.max?(this.activeCount++,this.handleSubscribe(a)):this.q.push(a))},a.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},a.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.done=!0,0===this.activeCount&&this.o.onCompleted())},a.prototype.dispose=function(){this.isStopped=!0},a.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b.prototype.onNext=function(a){this.isStopped||this.parent.o.onNext(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.parent.o.onError(a))},b.prototype.onCompleted=function(){if(!this.isStopped){this.isStopped=!0;var a=this.parent;a.g.remove(this.sad),a.q.length>0?a.handleSubscribe(a.q.shift()):(a.activeCount--,a.done&&0===a.activeCount&&a.o.onCompleted())}},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},a}();Hc.merge=function(a){return"number"!=typeof a?md(this,a):new kd(this,a)};var md=Oc.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(sc(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=vc,b=0;d>b;b++)c.push(arguments[b]);else for(a=vc,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),D(a,c).mergeAll()},nd=cb.CompositeError=function(a){this.name="NotImplementedError",this.innerErrors=a,this.message="This contains multiple errors. Check the innerErrors",Error.call(this)};nd.prototype=Error.prototype,Oc.mergeDelayError=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}var d=D(null,a);return new Ad(function(a){function b(){0===g.length?a.onCompleted():a.onError(1===g.length?g[0]:new nd(g))}var c=new gc,e=new nc,f=!1,g=[];return c.add(e),e.setDisposable(d.subscribe(function(d){var e=new nc;c.add(e),jb(d)&&(d=td(d)),e.setDisposable(d.subscribe(function(b){a.onNext(b)},function(a){g.push(a),c.remove(e),f&&1===c.length&&b()},function(){c.remove(e),f&&1===c.length&&b()}))},function(a){g.push(a),f=!0,1===c.length&&b()},function(){f=!0,1===c.length&&b()})),c})};var od=function(a){function b(b){this.source=b,a.call(this)}return cc(b,a),b.prototype.subscribeCore=function(a){var b=new gc,c=new nc;return b.add(c),c.setDisposable(this.source.subscribe(new pd(a,b))),b},b}(Qc),pd=function(){function a(a,b){this.o=a,this.g=b,this.isStopped=!1,this.done=!1}function b(a,b,c){this.parent=a,this.g=b,this.sad=c,this.isStopped=!1}return a.prototype.onNext=function(a){if(!this.isStopped){var c=new nc;this.g.add(c),jb(a)&&(a=td(a)),c.setDisposable(a.subscribe(new b(this,this.g,c)))}},a.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},a.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.done=!0,1===this.g.length&&this.o.onCompleted())},a.prototype.dispose=function(){this.isStopped=!0},a.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b.prototype.onNext=function(a){this.isStopped||this.parent.o.onNext(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.parent.o.onError(a))},b.prototype.onCompleted=function(){if(!this.isStopped){var a=this.parent;this.isStopped=!0,a.g.remove(this.sad),a.done&&1===a.g.length&&a.o.onCompleted()}},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},a}();Hc.mergeAll=Hc.mergeObservable=function(){return new od(this)},Hc.skipUntil=function(a){var b=this;return new Ad(function(c){var d=!1,e=new gc(b.subscribe(function(a){d&&c.onNext(a)},function(a){c.onError(a)},function(){d&&c.onCompleted()}));jb(a)&&(a=td(a));var f=new nc;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},function(a){c.onError(a)},function(){f.dispose()})),e},b)},Hc["switch"]=Hc.switchLatest=function(){var a=this;return new Ad(function(b){var c=!1,d=new oc,e=!1,f=0,g=a.subscribe(function(a){var g=new nc,h=++f;c=!0,d.setDisposable(g),jb(a)&&(a=td(a)),g.setDisposable(a.subscribe(function(a){f===h&&b.onNext(a)},function(a){f===h&&b.onError(a)},function(){f===h&&(c=!1,e&&b.onCompleted())}))},function(a){b.onError(a)},function(){e=!0,!c&&b.onCompleted()});return new gc(g,d)},a)},Hc.takeUntil=function(a){var b=this;return new Ad(function(c){return jb(a)&&(a=td(a)),new gc(b.subscribe(c),a.subscribe(function(){c.onCompleted()},function(a){c.onError(a)},db))},b)},Hc.withLatestFrom=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.pop(),e=this;if("undefined"==typeof e)throw new Error("Source observable not found for withLatestFrom().");if("function"!=typeof d)throw new Error("withLatestFrom() expects a resultSelector function.");return Array.isArray(b[0])&&(b=b[0]),new Ad(function(a){for(var c=function(){return!1},f=b.length,g=q(f,c),h=!1,i=new Array(f),j=new Array(f+1),k=0;f>k;k++)!function(c){var d=b[c],e=new nc;jb(d)&&(d=td(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(eb)},a.onError.bind(a),function(){})),j[c]=e}(k);var l=new nc;return l.setDisposable(e.subscribe(function(b){var c,e=[b].concat(i);if(h){try{c=d.apply(null,e)}catch(f){return void a.onError(f)}a.onNext(c)}},a.onError.bind(a),function(){a.onCompleted()})),j[f]=l,new gc(j)},this)},Hc.zip=function(){if(Array.isArray(arguments[0]))return H.apply(this,arguments);for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=this,e=b.pop();return b.unshift(d),new Ad(function(a){function c(b){var c,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),c=e.apply(d,f)}catch(g){return void a.onError(g)}a.onNext(c)}else i.filter(function(a,c){return c!==b}).every(eb)&&a.onCompleted()}function f(b){i[b]=!0,i.every(function(a){return a})&&a.onCompleted()}for(var g=b.length,h=q(g,J),i=q(g,I),j=new Array(g),k=0;g>k;k++)!function(d){var e=b[d],g=new nc;jb(e)&&(e=td(e)),g.setDisposable(e.subscribe(function(a){h[d].push(a),c(d)},function(b){a.onError(b)},function(){f(d)})),j[d]=g}(k);return new gc(j)},d)},Oc.zip=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.shift();return d.zip.apply(d,b)},Oc.zipArray=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return new Ad(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(eb))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(eb)?void b.onCompleted():void 0}for(var e=a.length,f=q(e,function(){return[]}),g=q(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new nc,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},function(a){b.onError(a)},function(){d(e)}))}(i);return new gc(h)})},Hc.asObservable=function(){var a=this;return new Ad(function(b){return a.subscribe(b)},this)},Hc.dematerialize=function(){var a=this;return new Ad(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},Hc.distinctUntilChanged=function(a,b){var c=this;return b||(b=gb),new Ad(function(d){var e,f=!1;return c.subscribe(function(c){var g=c;if(a)try{g=a(c)}catch(h){return void d.onError(h)}if(f)try{var i=b(e,g)}catch(h){return void d.onError(h)}f&&i||(f=!0,e=g,d.onNext(c))},function(a){d.onError(a)},function(){d.onCompleted()})},this)},Hc["do"]=Hc.tap=Hc.doAction=function(a,b,c){var d=this;return new Ad(function(e){var f=!a||kb(a)?Lc(a||db,b||db,c||db):a;return d.subscribe(function(a){try{f.onNext(a)}catch(b){e.onError(b)}e.onNext(a)},function(a){try{f.onError(a)}catch(b){e.onError(b)}e.onError(a)},function(){try{f.onCompleted()}catch(a){e.onError(a)}e.onCompleted()})},this)},Hc.doOnNext=Hc.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},Hc.doOnError=Hc.tapOnError=function(a,b){return this.tap(db,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},Hc.doOnCompleted=Hc.tapOnCompleted=function(a,b){return this.tap(db,null,"undefined"!=typeof b?function(){a.call(b)}:a)},Hc["finally"]=Hc.ensure=function(a){var b=this;return new Ad(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return jc(function(){try{d.dispose()}catch(b){throw b}finally{a()}})},this)},Hc.finallyAction=function(a){return this.ensure(a)},Hc.ignoreElements=function(){var a=this;return new Ad(function(b){return a.subscribe(db,function(a){b.onError(a)},function(){b.onCompleted()})},a)},Hc.materialize=function(){var a=this;return new Ad(function(b){return a.subscribe(function(a){b.onNext(Cc(a))},function(a){b.onNext(Dc(a)),b.onCompleted()},function(){b.onNext(Ec()),b.onCompleted()})},a)},Hc.repeat=function(a){return Ic(this,a).concat()},Hc.retry=function(a){return Ic(this,a).catchError()},Hc.retryWhen=function(a){return Ic(this).catchErrorWhen(a)},Hc.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new Ad(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},function(a){e.onError(a)},function(){!h&&c&&e.onNext(a),e.onCompleted()})},d)},Hc.skipLast=function(a){if(0>a)throw new sb;var b=this;return new Ad(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},function(a){c.onError(a)},function(){c.onCompleted()})},b)},Hc.startWith=function(){var a,b=0;arguments.length&&sc(arguments[0])?(a=arguments[0],b=1):a=vc;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return Jc([$c(c,a),this]).concat()},Hc.takeLast=function(a){if(0>a)throw new sb;var b=this;return new Ad(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})},b)},Hc.selectConcat=Hc.concatMap=function(a,b,c){return kb(a)&&kb(b)?this.concatMap(function(c,d){var e=a(c,d);return jb(e)&&(e=td(e)),(Ab(e)||zb(e))&&(e=Yc(e)),e.map(function(a,e){return b(c,a,d,e)})}):kb(a)?K(this,a,c):K(this,function(){return a})};var qd=function(a){function b(b,c,d){this.source=b,this.selector=Cb(c,d,3),a.call(this)}return cc(b,a),b.prototype.internalMap=function(a,c){var d=this;return new b(this.source,function(b,c,e){return a.call(this,d.selector(b,c,e),c,e)},c)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new L(a,this.selector,this))},b}(Qc);L.prototype.onNext=function(a){if(!this.isStopped){var b=o(this.selector).call(this,a,this.i++,this.source);return b===ac?this.observer.onError(b.e):void this.observer.onNext(b)}},L.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},L.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},L.prototype.dispose=function(){this.isStopped=!0},L.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},Hc.map=Hc.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof qd?this.internalMap(c,b):new qd(this,c,b)},Hc.pluck=function(){var b=arguments,c=arguments.length;if(0===c)throw new Error("List of properties cannot be empty.");return this.map(function(d){for(var e=d,f=0;c>f;f++){var g=e[b[f]];if("undefined"==typeof g)return a;e=g}return e})},Hc.selectMany=Hc.flatMap=function(a,b,c){return kb(a)&&kb(b)?this.flatMap(function(c,d){var e=a(c,d);return jb(e)&&(e=td(e)),(Ab(e)||zb(e))&&(e=Yc(e)),e.map(function(a,e){return b(c,a,d,e)})},c):kb(a)?M(this,a,c):M(this,function(){return a})},Hc.selectSwitch=Hc.flatMapLatest=Hc.switchMap=function(a,b){return this.select(a,b).switchLatest()},Hc.skip=function(a){if(0>a)throw new sb;var b=this;return new Ad(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},function(a){c.onError(a)},function(){c.onCompleted()})},b)},Hc.skipWhile=function(a,b){var c=this,d=Cb(a,b,3);return new Ad(function(a){var b=0,e=!1;return c.subscribe(function(f){if(!e)try{e=!d(f,b++,c)}catch(g){return void a.onError(g)}e&&a.onNext(f)},function(b){a.onError(b)},function(){a.onCompleted()})},c)},Hc.take=function(a,b){if(0>a)throw new sb;if(0===a)return Uc(b);var c=this;return new Ad(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},function(a){b.onError(a)},function(){b.onCompleted()})},c)},Hc.takeWhile=function(a,b){var c=this,d=Cb(a,b,3);return new Ad(function(a){var b=0,e=!0;return c.subscribe(function(f){if(e){try{e=d(f,b++,c)}catch(g){return void a.onError(g)}e?a.onNext(f):a.onCompleted()}},function(b){a.onError(b)},function(){a.onCompleted()})},c)};var rd=function(a){function b(b,c,d){this.source=b,this.predicate=Cb(c,d,3),a.call(this)}return cc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new N(a,this.predicate,this))},b.prototype.internalFilter=function(a,c){var d=this;return new b(this.source,function(b,c,e){return d.predicate(b,c,e)&&a.call(this,b,c,e)},c)},b}(Qc);N.prototype.onNext=function(a){if(!this.isStopped){var b=o(this.predicate).call(this,a,this.i++,this.source);return b===ac?this.observer.onError(b.e):void(b&&this.observer.onNext(a))}},N.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},N.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},N.prototype.dispose=function(){this.isStopped=!0},N.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},Hc.filter=Hc.where=function(a,b){return this instanceof rd?this.internalFilter(a,b):new rd(this,a,b)},Oc.fromCallback=function(a,b,c){return function(){for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return new Ad(function(d){function f(){for(var a=arguments.length,e=new Array(a),f=0;a>f;f++)e[f]=arguments[f];if(c){try{e=c.apply(b,e)}catch(g){return d.onError(g)}d.onNext(e)}else e.length<=1?d.onNext.apply(d,e):d.onNext(e);d.onCompleted()}e.push(f),a.apply(b,e)}).publishLast().refCount()}},Oc.fromNodeCallback=function(a,b,c){return function(){for(var d=arguments.length,e=new Array(d),f=0;d>f;f++)e[f]=arguments[f];return new Ad(function(d){function f(a){if(a)return void d.onError(a);for(var e=arguments.length,f=[],g=1;e>g;g++)f[g-1]=arguments[g];if(c){try{f=c.apply(b,f)}catch(h){return d.onError(h)}d.onNext(f)}else f.length<=1?d.onNext.apply(d,f):d.onNext(f);d.onCompleted()}e.push(f),a.apply(b,e)}).publishLast().refCount()}},cb.config.useNativeEvents=!1,Oc.fromEvent=function(a,b,c){return a.addListener?sd(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c):cb.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new Ad(function(d){return P(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return d.onError(e)}d.onNext(b)})}).publish().refCount():sd(function(c){a.on(b,c)},function(c){a.off(b,c)},c)};var sd=Oc.fromEventPattern=function(a,b,c){return new Ad(function(d){function e(a){var b=a;if(c)try{b=c(arguments)}catch(e){return d.onError(e)}d.onNext(b)}var f=a(e);return jc(function(){b&&b(e,f)})}).publish().refCount()},td=Oc.fromPromise=function(a){return Sc(function(){var b=new cb.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};Hc.toPromise=function(a){if(a||(a=cb.config.Promise),!a)throw new tb("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})},Oc.startAsync=function(a){var b;try{b=a()}catch(c){return gd(c)}return td(b)},Hc.multicast=function(a,b){var c=this;return"function"==typeof a?new Ad(function(d){var e=c.multicast(a());return new gc(b(e).subscribe(d),e.connect())},c):new ud(c,a)},Hc.publish=function(a){return a&&kb(a)?this.multicast(function(){return new Dd},a):this.multicast(new Dd)},Hc.share=function(){return this.publish().refCount()},Hc.publishLast=function(a){return a&&kb(a)?this.multicast(function(){return new Ed},a):this.multicast(new Ed)},Hc.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new Gd(b)},a):this.multicast(new Gd(a))},Hc.shareValue=function(a){return this.publishValue(a).refCount()},Hc.replay=function(a,b,c,d){return a&&kb(a)?this.multicast(function(){return new Hd(b,c,d)},a):this.multicast(new Hd(b,c,d))},Hc.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};{var ud=cb.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new gc(f.subscribe(c),jc(function(){e=!1}))),d},a.call(this,function(a){return c.subscribe(a)})}return cc(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new Ad(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(Oc),vd=Oc.interval=function(a,b){return T(a,a,sc(b)?b:Ac)};Oc.timer=function(b,c,d){var e;return sc(d)||(d=Ac),c!==a&&"number"==typeof c?e=c:sc(c)&&(d=c),b instanceof Date&&e===a?Q(b.getTime(),d):b instanceof Date&&e!==a?(e=c,R(b.getTime(),e,d)):e===a?S(b,d):T(b,e,d)}}Hc.delay=function(a,b){return sc(b)||(b=Ac),a instanceof Date?V(this,a.getTime(),b):U(this,a,b)},Hc.debounce=Hc.throttleWithTimeout=function(a,b){sc(b)||(b=Ac);var c=this;return new Ad(function(d){var e,f=new oc,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new nc;f.setDisposable(j),j.setDisposable(b.scheduleWithRelative(a,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new gc(i,f)},this)},Hc.throttle=function(a,b){return this.debounce(a,b)},Hc.timestamp=function(a){return sc(a)||(a=Ac),this.map(function(b){return{value:b,timestamp:a.now()}})},Hc.sample=Hc.throttleLatest=function(a,b){return sc(b)||(b=Ac),"number"==typeof a?W(this,vd(a,b)):W(this,a)},Hc.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=gd(new Error(b||"Timeout"))),sc(c)||(c=Ac);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new Ad(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(jb(b)&&(b=td(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new nc,j=new oc,k=!1,l=new oc;return j.setDisposable(i),g(),i.setDisposable(d.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new gc(j,l)},d)},Hc.throttleFirst=function(a,b){sc(b)||(b=Ac);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new Ad(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)};var wd=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=kc,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=kc)});return new gc(c,d,e)}function c(c,d){this.source=c,this.controller=new Dd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b,c)}return cc(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(Oc);Hc.pausable=function(a){return new wd(this,a)};var xd=function(b){function c(b){var c,d=[],e=X(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(c!==a&&e.shouldFire!=c){if(c=e.shouldFire,e.shouldFire)for(;d.length>0;)b.onNext(d.shift())}else c=e.shouldFire,e.shouldFire?b.onNext(e.data):d.push(e.data)},function(a){for(;d.length>0;)b.onNext(d.shift());b.onError(a)},function(){for(;d.length>0;)b.onNext(d.shift());b.onCompleted()});return e}function d(a,d){this.source=a,this.controller=new Dd,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c,a)}return cc(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(Oc);Hc.pausableBuffered=function(a){return new xd(this,a)};var yd=function(a){function b(a){return this.source.subscribe(a)}function c(c,d,e){a.call(this,b,c),this.subject=new zd(d,e),this.source=c.multicast(this.subject).refCount()}return cc(c,a),c.prototype.request=function(a){return this.subject.request(null==a?-1:a)},c}(Oc),zd=function(a){function b(a){return this.subject.subscribe(a)}function c(c,d){null==c&&(c=!0),a.call(this,b),this.subject=new Dd,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=kc,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.scheduler=d||wc}return cc(c,a),dc(c.prototype,Kc,{onCompleted:function(){this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length?this.queue.push(Bc.createOnCompleted()):this.subject.onCompleted()},onError:function(a){this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length?this.queue.push(Bc.createOnError(a)):this.subject.onError(a)},onNext:function(a){var b=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(Bc.createOnNext(a)):(-1!==this.requestedCount&&0===this.requestedCount--&&this.disposeCurrentRequest(),b=!0),b&&this.subject.onNext(a)},_processRequest:function(a){if(this.enableQueue){for(;this.queue.length>=a&&a>0||this.queue.length>0&&"N"!==this.queue[0].kind;){var b=this.queue.shift();b.accept(this.subject),"N"===b.kind?a--:(this.disposeCurrentRequest(),this.queue=[])}return{numberOfItems:a,returnValue:0!==this.queue.length}}return{numberOfItems:a,returnValue:!1}},request:function(a){this.disposeCurrentRequest();var b=this;return this.requestedDisposable=this.scheduler.scheduleWithState(a,function(a,c){var d=b._processRequest(c),e=d.numberOfItems;d.returnValue||(b.requestedCount=e,b.requestedDisposable=jc(function(){b.requestedCount=0}))}),this.requestedDisposable},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=kc}}),c}(Oc);Hc.controlled=function(a,b){return a&&sc(a)&&(b=a,a=!0),null==a&&(a=!0),new yd(this,a,b)},Hc.pipe=function(a){function b(){c.resume()}var c=this.pausableBuffered();return a.addListener("drain",b),c.subscribe(function(b){!a.write(String(b))&&c.pause()},function(b){a.emit("error",b)},function(){!a._isStdio&&a.end(),a.removeListener("drain",b)}),c.resume(),a},Hc.transduce=function(a){function b(a){return{"@@transducer/init":function(){return a},"@@transducer/step":function(a,b){return a.onNext(b)},"@@transducer/result":function(a){return a.onCompleted()}}}var c=this;return new Ad(function(d){var e=a(b(d));return c.subscribe(function(a){try{e["@@transducer/step"](d,a)}catch(b){d.onError(b)}},function(a){d.onError(a)},function(){e["@@transducer/result"](d)})},c)};var Ad=cb.AnonymousObservable=function(a){function b(a){return a&&kb(a.dispose)?a:kb(a)?jc(a):kc}function c(a,c){var d=c[0],e=c[1],f=o(e)(d);return f!==ac||d.fail(ac.e)?void d.setDisposable(b(f)):p(ac.e)}function d(b,d){function e(a){var d=new Bd(a),e=[d,b];return wc.scheduleRequired()?wc.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return cc(d,a),d}(Oc),Bd=function(a){function b(b){a.call(this),this.observer=b,this.m=new nc}cc(b,a);var c=b.prototype;return c.next=function(a){var b=o(this.observer.onNext).call(this.observer,a);b===ac&&(this.dispose(),p(b.e))},c.error=function(a){var b=o(this.observer.onError).call(this.observer,a);this.dispose(),b===ac&&p(b.e)},c.completed=function(){var a=o(this.observer.onCompleted).call(this.observer);this.dispose(),a===ac&&p(a.e)},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(Mc),Cd=function(a,b){this.subject=a,this.observer=b};Cd.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var Dd=cb.Subject=function(a){function c(a){return mc(this),this.isStopped?this.hasError?(a.onError(this.error),kc):(a.onCompleted(),kc):(this.observers.push(a),new Cd(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return cc(d,a),dc(d.prototype,Kc.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(mc(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=b(this.observers),d=c.length;d>a;a++)c[a].onCompleted();this.observers.length=0}},onError:function(a){if(mc(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){if(mc(this),!this.isStopped)for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new Fd(a,b)},d}(Oc),Ed=cb.AsyncSubject=function(a){function c(a){return mc(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),kc):(this.observers.push(a),new Cd(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return cc(d,a),dc(d.prototype,Kc,{hasObservers:function(){return mc(this),this.observers.length>0},onCompleted:function(){var a,c;if(mc(this),!this.isStopped){this.isStopped=!0;var d=b(this.observers),c=d.length;if(this.hasValue)for(a=0;c>a;a++){var e=d[a];e.onNext(this.value),e.onCompleted()}else for(a=0;c>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(mc(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){mc(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(Oc),Fd=cb.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return cc(c,a),dc(c.prototype,Kc.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(Oc),Gd=cb.BehaviorSubject=function(a){function c(a){return mc(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),kc):(this.observers.push(a),a.onNext(this.value),new Cd(this,a))}function d(b){a.call(this,c),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return cc(d,a),dc(d.prototype,Kc,{getValue:function(){if(mc(this),this.hasError)throw this.error;return this.value},hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(mc(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=b(this.observers),d=c.length;d>a;a++)c[a].onCompleted();this.observers.length=0}},onError:function(a){if(mc(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){if(mc(this),!this.isStopped){this.value=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onNext(a)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.exception=null}}),d}(Oc),Hd=cb.ReplaySubject=function(a){function c(a,b){return jc(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function d(a){var b=new Pc(this.scheduler,a),d=c(this,b);mc(this),this._trim(this.scheduler.now()),this.observers.push(b);for(var e=0,f=this.q.length;f>e;e++)b.onNext(this.q[e].value);return this.hasError?b.onError(this.error):this.isStopped&&b.onCompleted(),b.ensureActive(),d}function e(b,c,e){this.bufferSize=null==b?f:b,this.windowSize=null==c?f:c,this.scheduler=e||wc,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,d)
4
+ }var f=Math.pow(2,53)-1;return cc(e,a),dc(e.prototype,Kc.prototype,{hasObservers:function(){return this.observers.length>0},_trim:function(a){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&a-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(a){if(mc(this),!this.isStopped){var c=this.scheduler.now();this.q.push({interval:c,value:a}),this._trim(c);for(var d=0,e=b(this.observers),f=e.length;f>d;d++){var g=e[d];g.onNext(a),g.ensureActive()}}},onError:function(a){if(mc(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;var c=this.scheduler.now();this._trim(c);for(var d=0,e=b(this.observers),f=e.length;f>d;d++){var g=e[d];g.onError(a),g.ensureActive()}this.observers.length=0}},onCompleted:function(){if(mc(this),!this.isStopped){this.isStopped=!0;var a=this.scheduler.now();this._trim(a);for(var c=0,d=b(this.observers),e=d.length;e>c;c++){var f=d[c];f.onCompleted(),f.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),e}(Oc);cb.Pauser=function(a){function b(){a.call(this)}return cc(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(Dd),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Z.Rx=cb,define(function(){return cb})):$&&_?ab?(_.exports=cb).Rx=cb:$.Rx=cb:Z.Rx=cb;var Id=g()}).call(this);
4
5
  //# sourceMappingURL=rx.lite.map
@@ -1 +1 @@
1
- {"version":3,"file":"rx.min.js","sources":["rx.js"],"names":["undefined","checkDisposed","self","isDisposed","Error","objectDisposed","cloneArray","arr","a","i","len","length","push","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","e","firstLine","attempt1","exec","Number","attempt2","attempt3","keysIn","object","result","isObject","support","nonEnumArgs","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","nonEnumShadows","objectProto","ctor","constructor","index","dontEnumsLength","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","dontEnums","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","value","deepEquals","b","stackA","stackB","type","otherType","otherClass","argsClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","arrayInitialize","count","factory","Array","thrower","IndexedItem","id","this","ScheduledDisposable","scheduler","disposable","scheduleItem","s","dispose","ToArrayObserver","observer","isStopped","StringIterable","_s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","TypeError","sign","number","isNaN","Math","floor","abs","maxSafeInteger","FromArraySink","parent","observableOf","array","FromArrayObservable","observableCatchHandler","handler","AnonymousObservable","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","x","onNext","ex","onError","isPromise","observableFromPromise","d","onCompleted","zipArray","second","resultSelector","first","left","right","falseFactory","emptyArrayFactory","concatMap","selector","thisArg","selectorFunc","bindCallback","map","isArrayLike","isIterable","observableFrom","concatAll","arrayIndexOfComparer","item","comparer","HashSet","set","MapObserver","flatMap","mergeAll","FilterObserver","predicate","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","isScheduler","notDefined","Scheduler","identity","defaultNow","pluck","property","just","Date","now","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","err","p","then","asArray","arguments","not","isFn","argumentOutOfRange","longStackSupport","Symbol","iterator","Set","doneEnumerator","done","supportNodeClass","func","argCount","arg","collection","apply","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","__","addProperties","obj","sources","idx","ln","prop","addRef","xs","r","CompositeDisposable","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","args","isArray","disposables","CompositeDisposablePrototype","add","shouldDispose","splice","currentDisposables","Disposable","action","disposableCreate","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","RefCountDisposable","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","scheduleWithState","ScheduledItem","state","dueTime","invoke","invokeCore","isCancelled","schedule","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithRelative","scheduleWithRelativeAndState","scheduleWithAbsolute","scheduleWithAbsoluteAndState","normalize","timeSpan","invokeRecImmediate","pair","group","recursiveAction","state1","state2","isAdded","isDone","scheduler1","state3","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursive","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelative","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsolute","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","period","schedulePeriodicWithState","setInterval","clearInterval","catchError","CatchScheduler","scheduleMethod","immediateScheduler","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","bind","immediate","scheduleNow","notSupported","currentThreadScheduler","currentThread","runTrampoline","q","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","localTimer","localSetTimeout","localClearTimeout","fn","time","WScript","Sleep","setTimeout","clearTimeout","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","reNative","RegExp","replace","setImmediate","clearImmediate","process","nextTick","MSG_PREFIX","random","tasks","taskId","onGlobalPostMessage","event","data","substring","handleId","addEventListener","attachEvent","currentId","MessageChannel","channel","channelTasks","channelTaskId","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeout","__super__","_wrap","_handler","_recursiveOriginal","_recursiveWrapper","_clone","_getRecursiveWrapper","wrapper","failed","Notification","kind","hasValue","accept","observerOrOnNext","_acceptObservable","_accept","toObservable","notification","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","exception","notificationCreateOnCompleted","createOnCompleted","Enumerator","next","_next","Enumerable","_iterator","concat","cancelable","currentItem","currentValue","lastException","catchErrorWhen","notificationHandler","exceptions","Subject","notifier","handled","notificationDisposable","outer","inner","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","selectorFn","Observer","toNotifier","n","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","makeSafe","AnonymousSafeObserver","_onNext","_onError","_onCompleted","observableProto","AbstractObserver","notImplemented","completed","fail","_super","_observer","CheckedObserverPrototype","checkAccess","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","shift","cancel","Observable","_subscribe","oldOnError","forEach","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ObservableBase","fixSubscriber","subscriber","ado","subscribeCore","AutoDetachObserver","observeOn","subscribeOn","m","fromPromise","promise","observableDefer","subject","AsyncSubject","toPromise","promiseCtor","resolve","reject","v","ToArrayObservable","toArray","createWithDisposable","defer","observableFactory","observableThrow","observableEmpty","FromObservable","iterable","mapper","sink","FromSink","run","loopRecursive","list","pow","charAt","from","mapFn","observableFromArray","fromArray","generate","initialState","condition","iterate","hasResult","observableNever","never","ofWithScheduler","pairs","keys","RangeObservable","RangeSink","range","observableReturn","returnValue","throwError","throwException","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","previous","acc","catchException","handlerOrSecond","observableCatch","combineLatest","hasValueAll","every","res","values","filter","j","subscriptions","sad","observableConcat","concatObservable","merge","maxConcurrentOrOther","observableMerge","activeCount","innerSource","mergeObservable","innerSubscription","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","withLatestFrom","allValues","zip","queuedValues","queues","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","tap","doAction","tapObserver","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","materialize","retry","retryCount","retryWhen","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","Infinity","createWindow","refCountDisposable","selectConcat","selectorResult","i2","concatMapObserver","selectConcatObserver","onNextFunc","onErrorFunc","onCompletedFunc","defaultIfEmpty","defaultValue","found","retValue","distinct","hashSet","MapObservable","internalMap","select","currentProp","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","running","take","RangeError","takeWhile","FilterObservable","internalFilter","shouldYield","transduce","transducer","transformForObserver","init","step","obs","input","xform","AutoDetachObserverPrototype","noError","InnerSubscription","observers","hasError","hasObservers","os","AnonymousS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K4U,UAAW,IAKlBtU,QAAS,WACPN,KAAKpH,YAAa,EAClBoH,KAAK0lB,UAAY,KACjB1lB,KAAKuV,UAAY,KACjBvV,KAAKhC,MAAQ,QAIVyc,GACPpB,IAEqBrT,EAAG8f,iBAAoB,SAAU7R,GAGtD,QAASnR,GAAUtC,GACjB,MAAOR,MAAKxG,WAAWsJ,UAAUtC,GAGnC,QAASslB,GAAiBtlB,EAAUhH,GAClCwG,KAAKQ,SAAWA,EAChBR,KAAKxG,WAAaA,EAClBya,EAAU9X,KAAK6D,KAAM8C,GAevB,MAxBAmG,IAAS6c,EAAkB7R,GAY3B7K,GAAc0c,EAAiB9oB,UAAWoa,GAASpa,WACjDsG,YAAa,WACXtD,KAAKQ,SAAS8C,eAEhBJ,QAAS,SAAU3J,GACjByG,KAAKQ,SAAS0C,QAAQ3J,IAExByJ,OAAQ,SAAUhF,GAChBgC,KAAKQ,SAASwC,OAAOhF,MAIlB8nB,GACPzM,IAEmB,mBAAV0M,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACzE5kB,EAAK4E,GAAKA,EAEV+f,OAAO,WACL,MAAO/f,MAEAR,GAAeG,EAEpBE,GACDF,EAAWF,QAAUO,GAAIA,GAAKA,EAE/BR,EAAYQ,GAAKA,EAInB5E,EAAK4E,GAAKA,CAIZ,IAAI9K,IAAcC,MAElBgB,KAAK6D"}
1
+ {"version":3,"file":"rx.min.js","sources":["rx.js"],"names":["undefined","cloneArray","arr","a","i","len","length","push","makeStackTraceLong","error","observable","hasStacks","stack","indexOf","STACK_JUMP_SEPARATOR","stacks","o","source","unshift","concatedStacks","join","filterStackString","stackString","lines","split","desiredLines","line","isInternalFrame","isNodeFrame","stackLine","fileNameAndLineNumber","getFileNameAndLineNumber","fileName","lineNumber","rFileName","rStartingLine","rEndingLine","captureLine","Error","e","firstLine","attempt1","exec","Number","attempt2","attempt3","keysIn","object","result","isObject","support","nonEnumArgs","isArguments","slice","call","skipProto","enumPrototypes","skipErrorProps","enumErrorProps","errorProto","key","nonEnumShadows","objectProto","ctor","constructor","index","dontEnumsLength","prototype","className","stringProto","stringClass","errorClass","toString","nonEnum","nonEnumProps","dontEnums","hasOwnProperty","internalFor","callback","keysFunc","props","internalForIn","isNode","value","deepEquals","b","stackA","stackB","type","otherType","otherClass","argsClass","objectClass","boolClass","dateClass","numberClass","regexpClass","String","isArr","arrayClass","nodeClass","ctorA","argsObject","Object","ctorB","isFunction","size","pop","arrayInitialize","count","factory","Array","tryCatcher","tryCatchTarget","apply","this","arguments","errorObj","tryCatch","fn","TypeError","thrower","IndexedItem","id","ScheduledDisposable","scheduler","disposable","isDisposed","scheduleItem","s","self","dispose","ToArrayObserver","observer","isStopped","StringIterable","_s","StringIterator","_l","_i","ArrayIterable","_a","ArrayIterator","toLength","numberIsFinite","root","isFinite","getIterable","it","$iterator$","sign","number","isNaN","Math","floor","abs","maxSafeInteger","FromArraySink","parent","observableOf","array","isScheduler","currentThreadScheduler","FromArrayObservable","PairsSink","RepeatSink","observableCatchHandler","handler","AnonymousObservable","d1","SingleAssignmentDisposable","subscription","SerialDisposable","setDisposable","subscribe","x","onNext","ex","onError","isPromise","observableFromPromise","d","onCompleted","zipArray","second","resultSelector","first","left","right","falseFactory","emptyArrayFactory","concatMap","selector","thisArg","selectorFunc","bindCallback","map","isArrayLike","isIterable","observableFrom","concatAll","arrayIndexOfComparer","item","comparer","HashSet","set","MapObserver","flatMap","mergeAll","FilterObserver","predicate","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","noop","identity","notDefined","defaultNow","pluck","property","just","Date","now","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","err","p","then","asArray","not","isFn","longStackSupport","EmptyError","message","ObjectDisposedError","ArgumentOutOfRangeError","NotSupportedError","NotImplementedError","notImplemented","notSupported","Symbol","iterator","Set","doneEnumerator","done","supportNodeClass","func","argCount","arg","collection","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","__","addProperties","obj","sources","idx","ln","prop","addRef","xs","r","CompositeDisposable","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","args","isArray","isDisposable","disposables","CompositeDisposablePrototype","add","shouldDispose","splice","currentDisposables","Disposable","action","disposableCreate","create","disposableEmpty","empty","checkDisposed","current","old","RefCountDisposable","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","scheduleWithState","ScheduledItem","state","dueTime","invoke","invokeCore","isCancelled","Scheduler","schedule","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","scheduleWithRelative","scheduleWithRelativeAndState","scheduleWithAbsolute","scheduleWithAbsoluteAndState","normalize","timeSpan","normalizeTime","invokeRecImmediate","pair","recursiveAction","state1","state2","isAdded","isDone","scheduler1","state3","group","invokeRecDate","method","dueTime1","scheduleInnerRecursive","dt","scheduleRecursive","scheduleRecursiveWithState","_action","scheduleRecursiveWithRelative","scheduleRecursiveWithRelativeAndState","scheduleRecursiveWithAbsolute","scheduleRecursiveWithAbsoluteAndState","schedulePeriodic","period","schedulePeriodicWithState","setInterval","clearInterval","catchError","CatchScheduler","scheduleMethod","clearMethod","immediateScheduler","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","bind","immediate","scheduleNow","currentThread","runTrampoline","queue","si","currentScheduler","scheduleRequired","localTimer","localSetTimeout","localClearTimeout","setTimeout","clearTimeout","WScript","time","Sleep","runTask","handle","currentlyRunning","task","tasksByHandle","postMessageSupported","postMessage","importScripts","isAsync","oldHandler","onmessage","onGlobalPostMessage","event","data","substring","MSG_PREFIX","nextHandle","reNative","RegExp","replace","setImmediate","process","nextTick","random","addEventListener","attachEvent","currentId","MessageChannel","channel","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeout","__super__","_wrap","_handler","_recursiveOriginal","_recursiveWrapper","_clone","_getRecursiveWrapper","wrapper","failed","Notification","kind","exception","accept","acceptObservable","_accept","_acceptObservable","observerOrOnNext","toObservable","_","notification","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","Enumerator","next","_next","Enumerable","_iterator","concat","cancelable","currentItem","currentValue","lastException","catchErrorWhen","notificationHandler","exceptions","Subject","notifier","handled","notificationDisposable","outer","inner","exn","enumerableRepeat","repeat","repeatCount","enumerableOf","of","selectorFn","Observer","toNotifier","n","asObserver","AnonymousObserver","checked","CheckedObserver","observerCreate","fromNotifier","notifyOn","ObserveOnObserver","makeSafe","AnonymousSafeObserver","_onNext","_onError","_onCompleted","observableProto","AbstractObserver","completed","fail","_observer","CheckedObserverPrototype","checkAccess","res","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","shift","cancel","Observable","_subscribe","oldOnError","forEach","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ObservableBase","fixSubscriber","subscriber","ado","sub","subscribeCore","AutoDetachObserver","observeOn","subscribeOn","m","fromPromise","promise","observableDefer","subject","AsyncSubject","toPromise","promiseCtor","resolve","reject","hasValue","v","ToArrayObservable","toArray","createWithDisposable","defer","observableFactory","observableThrow","EmptyObservable","EmptySink","sink","run","observableEmpty","FromObservable","iterable","mapper","FromSink","loopRecursive","list","pow","charAt","from","mapFn","observableFromArray","fromArray","generate","initialState","condition","iterate","hasResult","NeverObservable","observableNever","never","ofWithScheduler","PairsObservable","keys","pairs","RangeObservable","RangeSink","range","RepeatObservable","JustObservable","JustSink","ThrowObservable","returnValue","ThrowSink","throwError","throwException","using","resourceFactory","resource","amb","rightSource","leftSource","choiceL","choice","leftChoice","rightSubscription","choiceR","rightChoice","leftSubscription","previous","acc","catchException","handlerOrSecond","observableCatch","combineLatest","hasValueAll","every","values","filter","j","subscriptions","sad","observableConcat","concatObservable","merge","MergeObservable","maxConcurrent","g","MergeObserver","max","q","activeCount","InnerObserver","handleSubscribe","innerSource","maxConcurrentOrOther","observableMerge","CompositeError","errors","name","innerErrors","mergeDelayError","setCompletion","innerSubscription","MergeAllObservable","MergeAllObserver","mergeObservable","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","withLatestFrom","allValues","zip","queuedValues","queues","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","keySelector","currentKey","hasCurrentKey","comparerEquals","tap","doAction","tapObserver","doOnNext","tapOnNext","doOnError","tapOnError","doOnCompleted","tapOnCompleted","ensure","finallyAction","ignoreElements","materialize","retry","retryCount","retryWhen","scan","seed","accumulator","hasSeed","hasAccumulation","accumulation","skipLast","startWith","takeLast","takeLastBuffer","Infinity","createWindow","refCountDisposable","selectConcat","selectorResult","i2","concatMapObserver","selectConcatObserver","onNextFunc","onErrorFunc","onCompletedFunc","defaultIfEmpty","defaultValue","found","retValue","distinct","hashSet","MapObservable","internalMap","select","currentProp","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","running","take","takeWhile","FilterObservable","internalFilter","shouldYield","transduce","transducer","transformForObserver","@@transducer/init","@@transducer/step","obs","input","@@transducer/result","xform","AutoDetachObserverPrototype","InnerSubscription","observers","hasError","hasObservers","os","AnonymousSubject","define","amd"],"mappings":";CAEE,SAAUA,GA2DV,QAASC,GAAWC,GAAO,IAAI,GAAIC,MAAQC,EAAI,EAAGC,EAAMH,EAAII,OAAYD,EAAJD,EAASA,IAAOD,EAAEI,KAAKL,EAAIE,GAAO,OAAOD,GAe7G,QAASK,GAAmBC,EAAOC,GAG/B,GAAIC,IACAD,EAAWE,OACM,gBAAVH,IACG,OAAVA,GACAA,EAAMG,OACwC,KAA9CH,EAAMG,MAAMC,QAAQC,IACtB,CAEA,IAAK,GADDC,MACKC,EAAIN,EAAcM,EAAGA,EAAIA,EAAEC,OAC9BD,EAAEJ,OACJG,EAAOG,QAAQF,EAAEJ,MAGrBG,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,EAInB/E,EAAK+E,GAAKA,CAIZ,IAAI5L,IAAcC,MAElBiB,KAAK6D"}
@@ -1,4 +1,4 @@
1
1
  /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
2
- (function(a){function b(a){if(a.isDisposed)throw new Error(eb)}function c(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c]);return b}function d(a,b){if(fb&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(jb)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var f=c.join("\n"+jb+"\n");a.stack=e(f)}}function e(a){for(var b=a.split("\n"),c=[],d=0,e=b.length;e>d;d++){var h=b[d];f(h)||g(h)||!h||c.push(h)}return c.join("\n")}function f(a){var b=i(a);if(!b)return!1;var c=b[0],d=b[1];return c===hb&&d>=ib&&bd>=d}function g(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function h(){if(fb)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=i(c);if(!d)return;return hb=d[0],d[1]}}function i(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function j(a){var b=[];if(!Lb(a))return b;Kb.nonEnumArgs&&a.length&&Mb(a)&&(a=Ob.call(a));var c=Kb.enumPrototypes&&"function"==typeof a,d=Kb.enumErrorProps&&(a===Fb||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(Kb.nonEnumShadows&&a!==Gb){var f=a.constructor,g=-1,h=rb;if(a===(f&&f.prototype))var i=a===Hb?Bb:a===Fb?wb:Cb.call(a),j=Jb[i];for(;++g<h;)e=qb[g],j&&j[e]||!Db.call(a,e)||b.push(e)}return b}function k(a,b,c){for(var d=-1,e=c(a),f=e.length;++d<f;){var g=e[d];if(b(a[g],g,a)===!1)break}return a}function l(a,b){return k(a,b,j)}function m(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}function n(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;var e=typeof a,f=typeof b;if(a===a&&(null==a||null==b||"function"!=e&&"object"!=e&&"function"!=f&&"object"!=f))return!1;var g=Cb.call(a),h=Cb.call(b);if(g==sb&&(g=zb),h==sb&&(h=zb),g!=h)return!1;switch(g){case ub:case vb:return+a==+b;case yb:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case Ab:case Bb:return a==String(b)}var i=g==tb;if(!i){if(g!=zb||!Kb.nodeClass&&(m(a)||m(b)))return!1;var j=!Kb.argsObject&&Mb(a)?Object:a.constructor,k=!Kb.argsObject&&Mb(b)?Object:b.constructor;if(!(j==k||Db.call(a,"constructor")&&Db.call(b,"constructor")||cb(j)&&j instanceof j&&cb(k)&&k instanceof k||!("constructor"in a&&"constructor"in b)))return!1}c||(c=[]),d||(d=[]);for(var o=c.length;o--;)if(c[o]==a)return d[o]==b;var p=0,q=!0;if(c.push(a),d.push(b),i){if(o=a.length,p=b.length,q=p==o)for(;p--;){var r=b[p];if(!(q=n(a[p],r,c,d)))break}}else l(b,function(b,e,f){return Db.call(f,e)?(p++,q=Db.call(a,e)&&n(a[e],b,c,d)):void 0}),q&&l(a,function(a,b,c){return Db.call(c,b)?q=--p>-1:void 0});return c.pop(),d.pop(),q}function o(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function p(a){throw a}function q(a,b){this.id=a,this.value=b}function r(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function t(a,b){b.isDisposed||(b.isDisposed=!0,b.disposable.dispose())}function u(a){this.observer=a,this.a=[],this.isStopped=!1}function v(){this._s=s}function w(){this._s=s,this._l=s.length,this._i=0}function x(a){this._a=a}function y(a){this._a=a,this._l=C(a),this._i=0}function z(a){return"number"==typeof a&&Q.isFinite(a)}function A(b){var c,d=b[kb];if(!d&&"string"==typeof b)return c=new v(b),c[kb]();if(!d&&b.length!==a)return c=new x(b),c[kb]();if(!d)throw new TypeError("Object is not iterable");return b[kb]()}function B(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function C(a){var b=+a.length;return isNaN(b)?0:0!==b&&z(b)?(b=B(b)*Math.floor(Math.abs(b)),0>=b?0:b>Ic?Ic:b):b}function D(a,b){this.observer=a,this.parent=b}function E(a,b){return new Kc(b,a)}function F(a,b){return new Yc(function(c){var d=new Zb,e=new $b;return e.setDisposable(d),d.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){try{var d=b(a)}catch(f){return c.onError(f)}bb(d)&&(d=Cc(d));var g=new Zb;e.setDisposable(g),g.setDisposable(d.subscribe(c))},function(a){c.onCompleted(a)})),e},a)}function G(a,b){var c=this;return new Yc(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return d.onError(i)}d.onNext(g)}else d.onCompleted()},function(a){d.onError(a)},function(){d.onCompleted()})},c)}function H(){return!1}function I(){return[]}function J(a,b,c){var d=pb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return bb(e)&&(e=Cc(e)),(nb(e)||mb(e))&&(e=Jc(e)),e}).concatAll()}function K(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function L(a){this.comparer=a,this.set=[]}function M(a,b,c){this.observer=a,this.selector=b,this.source=c,this.i=0,this.isStopped=!1}function N(a,b,c){var d=pb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return bb(e)&&(e=Cc(e)),(nb(e)||mb(e))&&(e=Jc(e)),e}).mergeAll()}function O(a,b,c){this.observer=a,this.predicate=b,this.source=c,this.i=0,this.isStopped=!1}var P={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},Q=P[typeof window]&&window||this,R=P[typeof exports]&&exports&&!exports.nodeType&&exports,S=P[typeof module]&&module&&!module.nodeType&&module,T=S&&S.exports===R&&R,U=P[typeof global]&&global;!U||U.global!==U&&U.window!==U||(Q=U);var V={internals:{},config:{Promise:Q.Promise},helpers:{}},W=V.helpers.noop=function(){},X=(V.helpers.notDefined=function(a){return"undefined"==typeof a},V.helpers.isScheduler=function(a){return a instanceof V.Scheduler}),Y=V.helpers.identity=function(a){return a},Z=(V.helpers.pluck=function(a){return function(b){return b[a]}},V.helpers.just=function(a){return function(){return a}},V.helpers.defaultNow=Date.now),$=V.helpers.defaultComparer=function(a,b){return Nb(a,b)},_=V.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},ab=(V.helpers.defaultKeySerializer=function(a){return a.toString()},V.helpers.defaultError=function(a){throw a}),bb=V.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},cb=(V.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},V.helpers.not=function(a){return!a},V.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==Cb.call(a)}),a}()),db="Argument out of range",eb="Object has been disposed";V.config.longStackSupport=!1;var fb=!1;try{throw new Error}catch(gb){fb=!!gb.stack}var hb,ib=h(),jb="From previous event:",kb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";Q.Set&&"function"==typeof(new Q.Set)["@@iterator"]&&(kb="@@iterator");var lb=V.doneEnumerator={done:!0,value:a},mb=V.helpers.isIterable=function(b){return b[kb]!==a},nb=V.helpers.isArrayLike=function(b){return b&&b.length!==a};V.helpers.iterator=kb;var ob,pb=V.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},qb=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],rb=qb.length,sb="[object Arguments]",tb="[object Array]",ub="[object Boolean]",vb="[object Date]",wb="[object Error]",xb="[object Function]",yb="[object Number]",zb="[object Object]",Ab="[object RegExp]",Bb="[object String]",Cb=Object.prototype.toString,Db=Object.prototype.hasOwnProperty,Eb=Cb.call(arguments)==sb,Fb=Error.prototype,Gb=Object.prototype,Hb=String.prototype,Ib=Gb.propertyIsEnumerable;try{ob=!(Cb.call(document)==zb&&!({toString:0}+""))}catch(gb){ob=!0}var Jb={};Jb[tb]=Jb[vb]=Jb[yb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Jb[ub]=Jb[Bb]={constructor:!0,toString:!0,valueOf:!0},Jb[wb]=Jb[xb]=Jb[Ab]={constructor:!0,toString:!0},Jb[zb]={constructor:!0};var Kb={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);Kb.enumErrorProps=Ib.call(Fb,"message")||Ib.call(Fb,"name"),Kb.enumPrototypes=Ib.call(a,"prototype"),Kb.nonEnumArgs=0!=c,Kb.nonEnumShadows=!/valueOf/.test(b)}(1);var Lb=V.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},Mb=function(a){return a&&"object"==typeof a?Cb.call(a)==sb:!1};Eb||(Mb=function(a){return a&&"object"==typeof a?Db.call(a,"callee"):!1});var Nb=V.internals.isEqual=function(a,b){return n(a,b,[],[])},Ob=({}.hasOwnProperty,Array.prototype.slice),Pb=this.inherits=V.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},Qb=V.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}},Rb=V.internals.addRef=function(a,b){return new Yc(function(c){return new Ub(b.getDisposable(),a.subscribe(c))})};q.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Sb=V.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Tb=Sb.prototype;Tb.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Tb.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},Tb.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(b<this.length&&this.isHigherPriority(b,d)&&(d=b),c<this.length&&this.isHigherPriority(c,d)&&(d=c),d!==a){var e=this.items[a];this.items[a]=this.items[d],this.items[d]=e,this.heapify(d)}}},Tb.peek=function(){return this.items[0].value},Tb.removeAt=function(b){this.items[b]=this.items[--this.length],this.items[this.length]=a,this.heapify()},Tb.dequeue=function(){var a=this.peek();return this.removeAt(0),a},Tb.enqueue=function(a){var b=this.length++;this.items[b]=new q(Sb.count++,a),this.percolate(b)},Tb.remove=function(a){for(var b=0;b<this.length;b++)if(this.items[b].value===a)return this.removeAt(b),!0;return!1},Sb.count=0;var Ub=V.CompositeDisposable=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}this.disposables=a,this.isDisposed=!1,this.length=a.length},Vb=Ub.prototype;Vb.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},Vb.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},Vb.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=this.disposables.length,b=new Array(a),c=0;a>c;c++)b[c]=this.disposables[c];for(this.disposables=[],this.length=0,c=0;a>c;c++)b[c].dispose()}};var Wb=V.Disposable=function(a){this.isDisposed=!1,this.action=a||W};Wb.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Xb=Wb.create=function(a){return new Wb(a)},Yb=Wb.empty={dispose:W},Zb=V.SingleAssignmentDisposable=function(){function a(){this.isDisposed=!1,this.current=null}var b=a.prototype;return b.getDisposable=function(){return this.current},b.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},b.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()},a}(),$b=V.SerialDisposable=Zb,_b=V.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?Yb:new a(this)},b}();r.prototype.dispose=function(){this.scheduler.scheduleWithState(this,t)};var ac=V.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||_,this.disposable=new Zb};ac.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},ac.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},ac.prototype.isCancelled=function(){return this.disposable.isDisposed},ac.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};{var bc=V.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),Yb}var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=Z,a.normalize=function(a){return 0>a&&(a=0),a},a}();bc.normalize}!function(a){function b(a,b){var c=b.first,d=b.second,e=new Ub,f=function(b){d(b,function(b){var c=!1,d=!1,g=a.scheduleWithState(b,function(a,b){return c?e.remove(g):d=!0,f(b),Yb});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new Ub,g=function(b){e(b,function(b,d){var e=!1,h=!1,i=a[c](b,d,function(a,b){return e?f.remove(i):h=!0,g(b),Yb});h||(f.add(i),e=!0)})};return g(d),f}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState({first:a,second:c},b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute({first:a,second:d},b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(bc.prototype),function(){bc.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},bc.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof Q.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=Q.setInterval(function(){d=c(d)},b);return Xb(function(){Q.clearInterval(e)})}}(bc.prototype),function(a){a.catchError=a["catch"]=function(a){return new jc(this,a)}}(bc.prototype);var cc,dc=(V.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new Zb;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),bc.immediate=function(){function a(a,b){return b(this,a)}function b(){throw new Error("Not supported")}return new bc(Z,a,b,b)}()),ec=bc.currentThread=function(){function a(a){for(;a.length>0;){var b=a.dequeue();b.isCancelled()||!b.isCancelled()&&b.invoke()}}function b(b,c){var e=new ac(this,b,c,this.now());if(d)d.enqueue(e);else{d=new Sb(4),d.enqueue(e);try{a(d)}catch(f){throw f}finally{d=null}}return e.disposable}function c(){throw new Error("Not supported")}var d,e=new bc(Z,b,c,c);return e.scheduleRequired=function(){return!d},e.ensureTrampoline=function(a){d?a():this.schedule(a)},e}(),fc=W,gc=function(){var a,b=W;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!Q.setTimeout)throw new Error("No concurrency detected!");a=Q.setTimeout,b=Q.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),hc=gc.setTimeout,ic=gc.clearTimeout;!function(){function a(){if(!Q.postMessage||Q.importScripts)return!1;var a=!1,b=Q.onmessage;return Q.onmessage=function(){a=!0},Q.postMessage("","*"),Q.onmessage=b,a}var b=RegExp("^"+String(Cb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),c="function"==typeof(c=U&&T&&U.setImmediate)&&!b.test(c)&&c,d="function"==typeof(d=U&&T&&U.clearImmediate)&&!b.test(d)&&d;if("function"==typeof c)cc=c,fc=d;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))cc=process.nextTick;else if(a()){var e="ms.rx.schedule"+Math.random(),f={},g=0,h=function(a){if("string"==typeof a.data&&a.data.substring(0,e.length)===e){var b=a.data.substring(e.length),c=f[b];c(),delete f[b]}};Q.addEventListener?Q.addEventListener("message",h,!1):Q.attachEvent("onmessage",h,!1),cc=function(a){var b=g++;f[b]=a,Q.postMessage(e+b,"*")}}else if(Q.MessageChannel){var i=new Q.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},cc=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in Q&&"onreadystatechange"in Q.document.createElement("script")?cc=function(a){var b=Q.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},Q.document.documentElement.appendChild(b)}:(cc=function(a){return hc(a,0)},fc=ic)}();var jc=(bc.timeout=function(){function a(a,b){var c=this,d=new Zb,e=cc(function(){d.isDisposed||d.setDisposable(b(c,a))});return new Ub(d,Xb(function(){fc(e)}))}function b(a,b,c){var d=this,e=bc.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new Zb,g=hc(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new Ub(f,Xb(function(){ic(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new bc(Z,a,b,c)}(),function(a){function b(a,b){return this._scheduler.scheduleWithState(a,this._wrap(b))}function c(a,b,c){return this._scheduler.scheduleWithRelativeAndState(a,b,this._wrap(c))}function d(a,b,c){return this._scheduler.scheduleWithAbsoluteAndState(a,b,this._wrap(c))}function e(e,f){this._scheduler=e,this._handler=f,this._recursiveOriginal=null,this._recursiveWrapper=null,a.call(this,this._scheduler.now.bind(this._scheduler),b,c,d)}return Pb(e,a),e.prototype._clone=function(a){return new e(a,this._handler)},e.prototype._wrap=function(a){var b=this;return function(c,d){try{return a(b._getRecursiveWrapper(c),d)}catch(e){if(!b._handler(e))throw e;return Yb}}},e.prototype._getRecursiveWrapper=function(a){if(this._recursiveOriginal!==a){this._recursiveOriginal=a;var b=this._clone(a);b._recursiveOriginal=a,b._recursiveWrapper=b,this._recursiveWrapper=b}return this._recursiveWrapper},e.prototype.schedulePeriodicWithState=function(a,b,c){var d=this,e=!1,f=new Zb;return f.setDisposable(this._scheduler.schedulePeriodicWithState(a,b,function(a){if(e)return null;try{return c(a)}catch(b){if(e=!0,!d._handler(b))throw b;return f.dispose(),null}})),f},e}(bc)),kc=V.Notification=function(){function a(a,b){this.hasValue=null==b?!1:b,this.kind=a}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return X(a)||(a=dc),new Yc(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),lc=kc.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){var e=new kc("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),mc=kc.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){var e=new kc("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),nc=kc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new kc("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),oc=V.internals.Enumerator=function(a){this._next=a};oc.prototype.next=function(){return this._next()},oc.prototype[kb]=function(){return this};var pc=V.internals.Enumerable=function(a){this._iterator=a};pc.prototype[kb]=function(){return this._iterator()},pc.prototype.concat=function(){var a=this;return new Yc(function(b){var c,d=a[kb](),e=new $b,f=dc.scheduleRecursive(function(a){if(!c){try{var f=d.next()}catch(g){return b.onError(g)}if(f.done)return b.onCompleted();var h=f.value;bb(h)&&(h=Cc(h));var i=new Zb;e.setDisposable(i),i.setDisposable(h.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},a))}});return new Ub(e,f,Xb(function(){c=!0}))})},pc.prototype.catchError=function(){var a=this;return new Yc(function(b){var c,d=a[kb](),e=new $b,f=dc.scheduleRecursiveWithState(null,function(a,f){if(!c){try{var g=d.next()}catch(h){return observer.onError(h)}if(g.done)return void(null!==a?b.onError(a):b.onCompleted());var i=g.value;bb(i)&&(i=Cc(i));var j=new Zb;e.setDisposable(j),j.setDisposable(i.subscribe(function(a){b.onNext(a)},f,function(){b.onCompleted()}))}});return new Ub(e,f,Xb(function(){c=!0}))})},pc.prototype.catchErrorWhen=function(a){var b=this;return new Yc(function(c){var d,e,f=new _c,g=new _c,h=a(f),i=h.subscribe(g),j=b[kb](),k=new $b,l=dc.scheduleRecursive(function(a){if(!d){try{var b=j.next()}catch(h){return c.onError(h)}if(b.done)return void(e?c.onError(e):c.onCompleted());var i=b.value;bb(i)&&(i=Cc(i));var l=new Zb,m=new Zb;k.setDisposable(new Ub(m,l)),l.setDisposable(i.subscribe(function(a){c.onNext(a)},function(b){m.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new Ub(i,k,l,Xb(function(){d=!0}))})};var qc=pc.repeat=function(a,b){return null==b&&(b=-1),new pc(function(){var c=b;return new oc(function(){return 0===c?lb:(c>0&&c--,{done:!1,value:a})})})},rc=pc.of=function(a,b,c){if(b)var d=pb(b,c,3);return new pc(function(){var c=-1;return new oc(function(){return++c<a.length?{done:!1,value:b?d(a[c],c,a):a[c]}:lb})})},sc=V.Observer=function(){};sc.prototype.toNotifier=function(){var a=this;return function(b){return b.accept(a)}},sc.prototype.asObserver=function(){return new wc(this.onNext.bind(this),this.onError.bind(this),this.onCompleted.bind(this))},sc.prototype.checked=function(){return new xc(this)};var tc=sc.create=function(a,b,c){return a||(a=W),b||(b=ab),c||(c=W),new wc(a,b,c)};sc.fromNotifier=function(a,b){return new wc(function(c){return a.call(b,lc(c))},function(c){return a.call(b,mc(c))},function(){return a.call(b,nc())})},sc.prototype.notifyOn=function(a){return new zc(a,this)},sc.prototype.makeSafe=function(a){return new AnonymousSafeObserver(this._onNext,this._onError,this._onCompleted,a)};var uc,vc=V.internals.AbstractObserver=function(a){function b(){this.isStopped=!1,a.call(this)}function c(){throw new Error("Method not implemented")}return Pb(b,a),b.prototype.next=c,b.prototype.error=c,b.prototype.completed=c,b.prototype.onNext=function(a){this.isStopped||this.next(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.error(a))},b.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.error(a),!0)},b}(sc),wc=V.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return Pb(b,a),b.prototype.next=function(a){this._onNext(a)},b.prototype.error=function(a){this._onError(a)},b.prototype.completed=function(){this._onCompleted()},b}(vc),xc=function(a){function b(b){a.call(this),this._observer=b,this._state=0}Pb(b,a);var c=b.prototype;return c.onNext=function(a){this.checkAccess();try{this._observer.onNext(a)}catch(b){throw b}finally{this._state=0}},c.onError=function(a){this.checkAccess();try{this._observer.onError(a)}catch(b){throw b}finally{this._state=2}},c.onCompleted=function(){this.checkAccess();try{this._observer.onCompleted()}catch(a){throw a}finally{this._state=2}},c.checkAccess=function(){if(1===this._state)throw new Error("Re-entrancy detected");if(2===this._state)throw new Error("Observer completed");0===this._state&&(this._state=1)},b}(sc),yc=V.internals.ScheduledObserver=function(a){function b(b,c){a.call(this),this.scheduler=b,this.observer=c,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new $b}return Pb(b,a),b.prototype.next=function(a){var b=this;this.queue.push(function(){b.observer.onNext(a)})},b.prototype.error=function(a){var b=this;this.queue.push(function(){b.observer.onError(a)})},b.prototype.completed=function(){var a=this;this.queue.push(function(){a.observer.onCompleted()})},b.prototype.ensureActive=function(){var a=!1,b=this;!this.hasFaulted&&this.queue.length>0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(vc),zc=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return Pb(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b.prototype.dispose=function(){a.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},b}(yc),Ac=V.Observable=function(){function a(a){if(V.config.longStackSupport&&fb){try{throw new Error}catch(b){this.stack=b.stack.substring(b.stack.indexOf("\n")+1)}var c=this;this._subscribe=function(b){var e=b.onError.bind(b);return b.onError=function(a){d(a,c),e(a)},a.call(c,b)}}else this._subscribe=a}return uc=a.prototype,uc.subscribe=uc.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:tc(a,b,c))},uc.subscribeOnNext=function(a,b){return this._subscribe(tc("undefined"!=typeof b?function(c){a.call(b,c)}:a))},uc.subscribeOnError=function(a,b){return this._subscribe(tc(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},uc.subscribeOnCompleted=function(a,b){return this._subscribe(tc(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},a}(),Bc=V.ObservableBase=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Xb(a):Yb}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e.subscribeCore(d)))}catch(f){if(!d.fail(f))throw f}}function d(a){var b=new Zc(a),d=[b,this];return ec.scheduleRequired()?ec.scheduleWithState(d,c):c(null,d),b}function e(){a.call(this,d)}return Pb(e,a),e.prototype.subscribeCore=function(){throw new Error("Not implemeneted")},e}(Ac);uc.observeOn=function(a){var b=this;return new Yc(function(c){return b.subscribe(new zc(a,c))},b)},uc.subscribeOn=function(a){var b=this;return new Yc(function(c){var d=new Zb,e=new $b;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new r(a,b.subscribe(c)))})),e},b)};var Cc=Ac.fromPromise=function(a){return Ec(function(){var b=new V.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};uc.toPromise=function(a){if(a||(a=V.config.Promise),!a)throw new TypeError("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})};var Dc=function(a){function b(b){this.source=b,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new u(a))},b}(Bc);u.prototype.onNext=function(a){this.isStopped||this.a.push(a)},u.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},u.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onNext(this.a),this.observer.onCompleted())},u.prototype.dispose=function(){this.isStopped=!0},u.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},uc.toArray=function(){return new Dc(this)},Ac.create=Ac.createWithDisposable=function(a,b){return new Yc(a,b)};var Ec=Ac.defer=function(a){return new Yc(function(b){var c;try{c=a()}catch(d){return Qc(d).subscribe(b)}return bb(c)&&(c=Cc(c)),c.subscribe(b)})},Fc=Ac.empty=function(a){return X(a)||(a=dc),new Yc(function(b){return a.schedule(function(){b.onCompleted()})})},Gc=function(a){function b(b,c,d){this.iterable=b,this.mapper=c,this.scheduler=d,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=new Hc(a,this);return b.run()},b}(Bc),Hc=function(){function a(a,b){this.observer=a,this.parent=b}return a.prototype.run=function(){function a(a,b){try{var f=c.next()}catch(g){return d.onError(g)}if(f.done)return d.onCompleted();var h=f.value;if(e)try{h=e(h,a)}catch(g){return d.onError(g)}d.onNext(h),b(a+1)}var b=Object(this.parent.iterable),c=A(b),d=this.observer,e=this.parent.mapper;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}(),Ic=Math.pow(2,53)-1;v.prototype[kb]=function(){return new w(this._s)},w.prototype[kb]=function(){return this},w.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:lb},x.prototype[kb]=function(){return new y(this._a)},y.prototype[kb]=function(){return this},y.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:lb};var Jc=Ac.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!cb(b))throw new Error("mapFn when provided must be a function");if(b)var e=pb(b,c,2);return X(d)||(d=ec),new Gc(a,e,d)},Kc=function(a){function b(b,c){this.args=b,this.scheduler=c||ec,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=new D(a,this);return b.run()},b}(Bc);D.prototype.run=function(){function a(a,e){d>a?(b.onNext(c[a]),e(a+1)):b.onCompleted()}var b=this.observer,c=this.parent.args,d=c.length;return this.parent.scheduler.scheduleRecursiveWithState(0,a)};var Lc=Ac.fromArray=function(a,b){return new Kc(a,b)};Ac.generate=function(a,b,c,d,e){return X(e)||(e=ec),new Yc(function(f){var g=!0,h=a;return e.scheduleRecursive(function(a){var e,i;try{g?g=!1:h=c(h),e=b(h),e&&(i=d(h))}catch(j){return void f.onError(j)}e?(f.onNext(i),a()):f.onCompleted()})})};var Mc=Ac.never=function(){return new Yc(function(){return Yb})};Ac.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return new Kc(b)},Ac.ofWithScheduler=function(a){for(var b=arguments.length,c=new Array(b-1),d=1;b>d;d++)c[d-1]=arguments[d];return new Kc(c,a)},Ac.pairs=function(a,b){return b||(b=V.Scheduler.currentThread),new Yc(function(c){var d=Object.keys(a),e=d.length;return b.scheduleRecursiveWithState(0,function(b,f){if(e>b){var g=d[b];c.onNext([g,a[g]]),f(b+1)}else c.onCompleted()})})};var Nc=function(a){function b(b,c,d){this.start=b,this.count=c,this.scheduler=d,a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){var b=new Oc(a,this);return b.run()},b}(Bc),Oc=function(){function a(a,b){this.observer=a,this.parent=b}return a.prototype.run=function(){function a(a,e){c>a?(d.onNext(b+a),e(a+1)):d.onCompleted()}var b=this.parent.start,c=this.parent.count,d=this.observer;return this.parent.scheduler.scheduleRecursiveWithState(0,a)
3
- },a}();Ac.range=function(a,b,c){return X(c)||(c=ec),new Nc(a,b,c)},Ac.repeat=function(a,b,c){return X(c)||(c=ec),Pc(a,c).repeat(null==b?-1:b)};var Pc=Ac["return"]=Ac.just=function(a,b){return X(b)||(b=dc),new Yc(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};Ac.returnValue=function(){return Pc.apply(null,arguments)};var Qc=Ac["throw"]=Ac.throwError=function(a,b){return X(b)||(b=dc),new Yc(function(c){return b.schedule(function(){c.onError(a)})})};Ac.throwException=function(){return Ac.throwError.apply(null,arguments)},Ac.using=function(a,b){return new Yc(function(c){var d,e,f=Yb;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new Ub(Qc(g).subscribe(c),f)}return new Ub(e.subscribe(c),f)})},uc.amb=function(a){var b=this;return new Yc(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new Zb,j=new Zb;return bb(a)&&(a=Cc(a)),i.setDisposable(b.subscribe(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()})),j.setDisposable(a.subscribe(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()})),new Ub(i,j)})},Ac.amb=function(){function a(a,b){return a.amb(b)}var b=Mc(),c=[];if(Array.isArray(arguments[0]))c=arguments[0];else for(var d=0,e=arguments.length;e>d;d++)c.push(arguments[d]);for(var d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},uc["catch"]=uc.catchError=uc.catchException=function(a){return"function"==typeof a?F(this,a):Rc([this,a])};var Rc=Ac.catchError=Ac["catch"]=Ac.catchException=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return rc(a).catchError()};uc.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return Array.isArray(b[0])?b[0].unshift(this):b.unshift(this),Sc.apply(this,b)};var Sc=Ac.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.pop();return a--,Array.isArray(b[0])&&(b=b[0]),new Yc(function(c){function e(a){if(h[a]=!0,i||(i=h.every(Y))){try{var b=d.apply(null,k)}catch(e){return void c.onError(e)}c.onNext(b)}else j.filter(function(b,c){return c!==a}).every(Y)&&c.onCompleted()}function f(a){j[a]=!0,j.every(Y)&&c.onCompleted()}for(var g=function(){return!1},h=o(a,g),i=!1,j=o(a,g),k=new Array(a),l=new Array(a),m=0;a>m;m++)!function(a){var d=b[a],g=new Zb;bb(d)&&(d=Cc(d)),g.setDisposable(d.subscribe(function(b){k[a]=b,e(a)},function(a){c.onError(a)},function(){f(a)})),l[a]=g}(m);return new Ub(l)},this)};uc.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),Tc.apply(null,a)};var Tc=Ac.concat=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(arguments.length);for(var b=0,c=arguments.length;c>b;b++)a[b]=arguments[b]}return rc(a).concat()};uc.concatAll=uc.concatObservable=function(){return this.merge(1)},uc.merge=function(a){if("number"!=typeof a)return Uc(this,a);var b=this;return new Yc(function(c){function d(a){var b=new Zb;f.add(b),bb(a)&&(a=Cc(a)),b.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){c.onError(a)},function(){f.remove(b),h.length>0?d(h.shift()):(e--,g&&0===e&&c.onCompleted())}))}var e=0,f=new Ub,g=!1,h=[];return f.add(b.subscribe(function(b){a>e?(e++,d(b)):h.push(b)},function(a){c.onError(a)},function(){g=!0,0===e&&c.onCompleted()})),f},b)};var Uc=Ac.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(X(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=dc,b=0;d>b;b++)c.push(arguments[b]);else for(a=dc,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),E(a,c).mergeAll()};uc.mergeAll=uc.mergeObservable=function(){var a=this;return new Yc(function(b){var c=new Ub,d=!1,e=new Zb;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new Zb;c.add(e),bb(a)&&(a=Cc(a)),e.setDisposable(a.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},function(){c.remove(e),d&&1===c.length&&b.onCompleted()}))},function(a){b.onError(a)},function(){d=!0,1===c.length&&b.onCompleted()})),c},a)},uc.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return Vc([this,a])};var Vc=Ac.onErrorResumeNext=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new Yc(function(b){var c=0,d=new $b,e=dc.scheduleRecursive(function(e){var f,g;c<a.length?(f=a[c++],bb(f)&&(f=Cc(f)),g=new Zb,d.setDisposable(g),g.setDisposable(f.subscribe(b.onNext.bind(b),e,e))):b.onCompleted()});return new Ub(d,e)})};uc.skipUntil=function(a){var b=this;return new Yc(function(c){var d=!1,e=new Ub(b.subscribe(function(a){d&&c.onNext(a)},function(a){c.onError(a)},function(){d&&c.onCompleted()}));bb(a)&&(a=Cc(a));var f=new Zb;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},function(a){c.onError(a)},function(){f.dispose()})),e},b)},uc["switch"]=uc.switchLatest=function(){var a=this;return new Yc(function(b){var c=!1,d=new $b,e=!1,f=0,g=a.subscribe(function(a){var g=new Zb,h=++f;c=!0,d.setDisposable(g),bb(a)&&(a=Cc(a)),g.setDisposable(a.subscribe(function(a){f===h&&b.onNext(a)},function(a){f===h&&b.onError(a)},function(){f===h&&(c=!1,e&&b.onCompleted())}))},function(a){b.onError(a)},function(){e=!0,!c&&b.onCompleted()});return new Ub(g,d)},a)},uc.takeUntil=function(a){var b=this;return new Yc(function(c){return bb(a)&&(a=Cc(a)),new Ub(b.subscribe(c),a.subscribe(function(){c.onCompleted()},function(a){c.onError(a)},W))},b)},uc.withLatestFrom=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);var d=a.pop(),e=this;if("undefined"==typeof e)throw new Error("Source observable not found for withLatestFrom().");if("function"!=typeof d)throw new Error("withLatestFrom() expects a resultSelector function.");return Array.isArray(a[0])&&(a=a[0]),new Yc(function(b){for(var c=function(){return!1},f=a.length,g=o(f,c),h=!1,i=new Array(f),j=new Array(f+1),k=0;f>k;k++)!function(c){var d=a[c],e=new Zb;bb(d)&&(d=Cc(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(Y)},b.onError.bind(b),function(){})),j[c]=e}(k);var l=new Zb;return l.setDisposable(e.subscribe(function(a){var c,e=[a].concat(i);if(h){try{c=d.apply(null,e)}catch(f){return void b.onError(f)}b.onNext(c)}},b.onError.bind(b),function(){b.onCompleted()})),j[f]=l,new Ub(j)},this)},uc.zip=function(){if(Array.isArray(arguments[0]))return G.apply(this,arguments);for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=this,e=b.pop();return b.unshift(d),new Yc(function(a){function c(b){var c,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),c=e.apply(d,f)}catch(g){return void a.onError(g)}a.onNext(c)}else i.filter(function(a,c){return c!==b}).every(Y)&&a.onCompleted()}function f(b){i[b]=!0,i.every(function(a){return a})&&a.onCompleted()}for(var g=b.length,h=o(g,I),i=o(g,H),j=new Array(g),k=0;g>k;k++)!function(d){var e=b[d],g=new Zb;bb(e)&&(e=Cc(e)),g.setDisposable(e.subscribe(function(a){h[d].push(a),c(d)},function(b){a.onError(b)},function(){f(d)})),j[d]=g}(k);return new Ub(j)},d)},Ac.zip=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.shift();return d.zip.apply(d,b)},Ac.zipArray=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return new Yc(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every(Y))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(Y)?void b.onCompleted():void 0}for(var e=a.length,f=o(e,function(){return[]}),g=o(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new Zb,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},function(a){b.onError(a)},function(){d(e)}))}(i);return new Ub(h)})},uc.asObservable=function(){var a=this;return new Yc(function(b){return a.subscribe(b)},this)},uc.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).selectMany(function(a){return a.toArray()}).where(function(a){return a.length>0})},uc.dematerialize=function(){var a=this;return new Yc(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},uc.distinctUntilChanged=function(a,b){var c=this;return b||(b=$),new Yc(function(d){var e,f=!1;return c.subscribe(function(c){var g=c;if(a)try{g=a(c)}catch(h){return void d.onError(h)}if(f)try{var i=b(e,g)}catch(h){return void d.onError(h)}f&&i||(f=!0,e=g,d.onNext(c))},function(a){d.onError(a)},function(){d.onCompleted()})},this)},uc["do"]=uc.tap=uc.doAction=function(a,b,c){var d=this,e="function"==typeof a||"undefined"==typeof a?tc(a||W,b||W,c||W):a;return new Yc(function(a){return d.subscribe(function(b){try{e.onNext(b)}catch(c){a.onError(c)}a.onNext(b)},function(b){try{e.onError(b)}catch(c){a.onError(c)}a.onError(b)},function(){try{e.onCompleted()}catch(b){a.onError(b)}a.onCompleted()})},this)},uc.doOnNext=uc.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},uc.doOnError=uc.tapOnError=function(a,b){return this.tap(W,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},uc.doOnCompleted=uc.tapOnCompleted=function(a,b){return this.tap(W,null,"undefined"!=typeof b?function(){a.call(b)}:a)},uc["finally"]=uc.ensure=function(a){var b=this;return new Yc(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return Xb(function(){try{d.dispose()}catch(b){throw b}finally{a()}})},this)},uc.finallyAction=function(a){return this.ensure(a)},uc.ignoreElements=function(){var a=this;return new Yc(function(b){return a.subscribe(W,function(a){b.onError(a)},function(){b.onCompleted()})},a)},uc.materialize=function(){var a=this;return new Yc(function(b){return a.subscribe(function(a){b.onNext(lc(a))},function(a){b.onNext(mc(a)),b.onCompleted()},function(){b.onNext(nc()),b.onCompleted()})},a)},uc.repeat=function(a){return qc(this,a).concat()},uc.retry=function(a){return qc(this,a).catchError()},uc.retryWhen=function(a){return qc(this).catchErrorWhen(a)},uc.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new Yc(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},function(a){e.onError(a)},function(){!h&&c&&e.onNext(a),e.onCompleted()})},d)},uc.skipLast=function(a){var b=this;return new Yc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},function(a){c.onError(a)},function(){c.onCompleted()})},b)},uc.startWith=function(){var a,b=0;arguments.length&&X(arguments[0])?(a=arguments[0],b=1):a=dc;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return rc([Lc(c,a),this]).concat()},uc.takeLast=function(a){var b=this;return new Yc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})},b)},uc.takeLastBuffer=function(a){var b=this;return new Yc(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){c.onNext(d),c.onCompleted()})},b)},uc.windowWithCount=function(a,b){var c=this;if(+a||(a=0),1/0===Math.abs(a)&&(a=0),0>=a)throw new Error(db);if(null==b&&(b=a),+b||(b=0),1/0===Math.abs(b)&&(b=0),0>=b)throw new Error(db);return new Yc(function(d){function e(){var a=new _c;i.push(a),d.onNext(Rb(a,g))}var f=new Zb,g=new _b(f),h=0,i=[];return e(),f.setDisposable(c.subscribe(function(c){for(var d=0,f=i.length;f>d;d++)i[d].onNext(c);var g=h-a+1;g>=0&&g%b===0&&i.shift().onCompleted(),++h%b===0&&e()},function(a){for(;i.length>0;)i.shift().onError(a);d.onError(a)},function(){for(;i.length>0;)i.shift().onCompleted();d.onCompleted()})),g},c)},uc.selectConcat=uc.concatMap=function(a,b,c){return cb(a)&&cb(b)?this.concatMap(function(c,d){var e=a(c,d);return bb(e)&&(e=Cc(e)),(nb(e)||mb(e))&&(e=Jc(e)),e.map(function(a,e){return b(c,a,d,e)})}):cb(a)?J(this,a,c):J(this,function(){return a})},uc.concatMapObserver=uc.selectConcatObserver=function(a,b,c,d){var e=this,f=pb(a,d,2),g=pb(b,d,1),h=pb(c,d,0);return new Yc(function(a){var b=0;return e.subscribe(function(c){var d;try{d=f(c,b++)}catch(e){return void a.onError(e)}bb(d)&&(d=Cc(d)),a.onNext(d)},function(b){var c;try{c=g(b)}catch(d){return void a.onError(d)}bb(c)&&(c=Cc(c)),a.onNext(c),a.onCompleted()},function(){var b;try{b=h()}catch(c){return void a.onError(c)}bb(b)&&(b=Cc(b)),a.onNext(b),a.onCompleted()})},this).concatAll()},uc.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new Yc(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},function(b){a.onError(b)},function(){!d&&a.onNext(b),a.onCompleted()})},c)},L.prototype.push=function(a){var b=-1===K(this.set,a,this.comparer);return b&&this.set.push(a),b},uc.distinct=function(a,b){var c=this;return b||(b=$),new Yc(function(d){var e=new L(b);return c.subscribe(function(b){var c=b;if(a)try{c=a(b)}catch(f){return void d.onError(f)}e.push(c)&&d.onNext(b)},function(a){d.onError(a)},function(){d.onCompleted()})},this)};var Wc=function(a){function b(b,c,d){this.source=b,this.selector=pb(c,d,3),a.call(this)}return Pb(b,a),b.prototype.internalMap=function(a,c){var d=this;return new b(this.source,function(b,c,e){return a(d.selector(b,c,e),c,e)},c)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new M(a,this.selector,this))},b}(Bc);M.prototype.onNext=function(a){if(!this.isStopped){try{var b=this.selector(a,this.i++,this.source)}catch(c){return this.observer.onError(c)}this.observer.onNext(b)}},M.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},M.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},M.prototype.dispose=function(){this.isStopped=!0},M.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},uc.map=uc.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof Wc?this.internalMap(c,b):new Wc(this,c,b)},uc.pluck=function(){var b=arguments,c=arguments.length;if(0===c)throw new Error("List of properties cannot be empty.");return this.map(function(d){for(var e=d,f=0;c>f;f++){var g=e[b[f]];if("undefined"==typeof g)return a;e=g}return e})},uc.flatMapObserver=uc.selectManyObserver=function(a,b,c,d){var e=this;return new Yc(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}bb(c)&&(c=Cc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}bb(c)&&(c=Cc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}bb(a)&&(a=Cc(a)),f.onNext(a),f.onCompleted()})},e).mergeAll()},uc.selectMany=uc.flatMap=function(a,b,c){return cb(a)&&cb(b)?this.flatMap(function(c,d){var e=a(c,d);return bb(e)&&(e=Cc(e)),(nb(e)||mb(e))&&(e=Jc(e)),e.map(function(a,e){return b(c,a,d,e)})},c):cb(a)?N(this,a,c):N(this,function(){return a})},uc.selectSwitch=uc.flatMapLatest=uc.switchMap=function(a,b){return this.select(a,b).switchLatest()},uc.skip=function(a){if(0>a)throw new Error(db);var b=this;return new Yc(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},function(a){c.onError(a)},function(){c.onCompleted()})},b)},uc.skipWhile=function(a,b){var c=this,d=pb(a,b,3);return new Yc(function(a){var b=0,e=!1;return c.subscribe(function(f){if(!e)try{e=!d(f,b++,c)}catch(g){return void a.onError(g)}e&&a.onNext(f)},function(b){a.onError(b)},function(){a.onCompleted()})},c)},uc.take=function(a,b){if(0>a)throw new RangeError(db);if(0===a)return Fc(b);var c=this;return new Yc(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},function(a){b.onError(a)},function(){b.onCompleted()})},c)},uc.takeWhile=function(a,b){var c=this,d=pb(a,b,3);return new Yc(function(a){var b=0,e=!0;return c.subscribe(function(f){if(e){try{e=d(f,b++,c)}catch(g){return void a.onError(g)}e?a.onNext(f):a.onCompleted()}},function(b){a.onError(b)},function(){a.onCompleted()})},c)};var Xc=function(a){function b(b,c,d){this.source=b,this.predicate=pb(c,d,3),a.call(this)}return Pb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new O(a,this.predicate,this))},b.prototype.internalFilter=function(a,c){var d=this;return new b(this.source,function(b,c,e){return d.predicate(b,c,e)&&a(b,c,e)},c)},b}(Bc);O.prototype.onNext=function(a){if(!this.isStopped){try{var b=this.predicate(a,this.i++,this.source)}catch(c){return this.observer.onError(c)}b&&this.observer.onNext(a)}},O.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},O.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},O.prototype.dispose=function(){this.isStopped=!0},O.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},uc.filter=uc.where=function(a,b){return this instanceof Xc?this.internalFilter(a,b):new Xc(this,a,b)},uc.transduce=function(a){function b(a){return{init:function(){return a},step:function(a,b){return a.onNext(b)},result:function(a){return a.onCompleted()}}}var c=this;return new Yc(function(d){var e=a(b(d));return c.subscribe(function(a){try{e.step(d,a)}catch(b){d.onError(b)}},d.onError.bind(d),function(){e.result(d)})},c)};var Yc=V.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Xb(a):Yb}function c(a,c){var d=c[0],e=c[1];try{d.setDisposable(b(e(d)))}catch(f){if(!d.fail(f))throw f}}function d(b,d){function e(a){var d=new Zc(a),e=[d,b];return ec.scheduleRequired()?ec.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return Pb(d,a),d}(Ac),Zc=function(a){function b(b){a.call(this),this.observer=b,this.m=new Zb}Pb(b,a);var c=b.prototype;return c.next=function(a){var b=!1;try{this.observer.onNext(a),b=!0}catch(c){return p(c)}finally{!b&&this.dispose()}},c.error=function(a){try{this.observer.onError(a)}catch(b){return p(b)}finally{this.dispose()}},c.completed=function(){try{this.observer.onCompleted()}catch(a){return p(a)}finally{this.dispose()}},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(vc),$c=function(a,b){this.subject=a,this.observer=b};$c.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var _c=V.Subject=function(a){function d(a){return b(this),this.isStopped?this.hasError?(a.onError(this.error),Yb):(a.onCompleted(),Yb):(this.observers.push(a),new $c(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return Pb(e,a),Qb(e.prototype,sc.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(b(this),!this.isStopped){this.isStopped=!0;for(var a=0,d=c(this.observers),e=d.length;e>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){if(b(this),!this.isStopped)for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),e.create=function(a,b){return new ad(a,b)},e}(Ac),ad=(V.AsyncSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),Yb):(this.observers.push(a),new $c(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return Pb(e,a),Qb(e.prototype,sc,{hasObservers:function(){return b(this),this.observers.length>0},onCompleted:function(){var a,d;if(b(this),!this.isStopped){this.isStopped=!0;var e=c(this.observers),d=e.length;if(this.hasValue)for(a=0;d>a;a++){var f=e[a];f.onNext(this.value),f.onCompleted()}else for(a=0;d>a;a++)e[a].onCompleted();this.observers.length=0}},onError:function(a){if(b(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var d=0,e=c(this.observers),f=e.length;f>d;d++)e[d].onError(a);this.observers.length=0}},onNext:function(a){b(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),e}(Ac),V.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return Pb(c,a),Qb(c.prototype,sc.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(Ac));"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Q.Rx=V,define(function(){return V})):R&&S?T?(S.exports=V).Rx=V:R.Rx=V:Q.Rx=V;var bd=h()}).call(this);
2
+ (function(a){function b(a){for(var b=[],c=0,d=a.length;d>c;c++)b.push(a[c]);return b}function c(a,b){if(fb&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(jb)){for(var c=[],e=b;e;e=e.source)e.stack&&c.unshift(e.stack);c.unshift(a.stack);var f=c.join("\n"+jb+"\n");a.stack=d(f)}}function d(a){for(var b=a.split("\n"),c=[],d=0,g=b.length;g>d;d++){var h=b[d];e(h)||f(h)||!h||c.push(h)}return c.join("\n")}function e(a){var b=h(a);if(!b)return!1;var c=b[0],d=b[1];return c===hb&&d>=ib&&yd>=d}function f(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function g(){if(fb)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=h(c);if(!d)return;return hb=d[0],d[1]}}function h(a){var b=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(a);if(b)return[b[1],Number(b[2])];var c=/at ([^ ]+):(\d+):(?:\d+)$/.exec(a);if(c)return[c[1],Number(c[2])];var d=/.*@(.+):(\d+)$/.exec(a);return d?[d[1],Number(d[2])]:void 0}function i(a){var b=[];if(!Sb(a))return b;Rb.nonEnumArgs&&a.length&&Tb(a)&&(a=Wb.call(a));var c=Rb.enumPrototypes&&"function"==typeof a,d=Rb.enumErrorProps&&(a===Mb||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(Rb.nonEnumShadows&&a!==Nb){var f=a.constructor,g=-1,h=yb;if(a===(f&&f.prototype))var i=a===Ob?Ib:a===Mb?Db:Jb.call(a),j=Qb[i];for(;++g<h;)e=xb[g],j&&j[e]||!Kb.call(a,e)||b.push(e)}return b}function j(a,b,c){for(var d=-1,e=c(a),f=e.length;++d<f;){var g=e[d];if(b(a[g],g,a)===!1)break}return a}function k(a,b){return j(a,b,i)}function l(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}function m(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;var e=typeof a,f=typeof b;if(a===a&&(null==a||null==b||"function"!=e&&"object"!=e&&"function"!=f&&"object"!=f))return!1;var g=Jb.call(a),h=Jb.call(b);if(g==zb&&(g=Gb),h==zb&&(h=Gb),g!=h)return!1;switch(g){case Bb:case Cb:return+a==+b;case Fb:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case Hb:case Ib:return a==String(b)}var i=g==Ab;if(!i){if(g!=Gb||!Rb.nodeClass&&(l(a)||l(b)))return!1;var j=!Rb.argsObject&&Tb(a)?Object:a.constructor,n=!Rb.argsObject&&Tb(b)?Object:b.constructor;if(!(j==n||Kb.call(a,"constructor")&&Kb.call(b,"constructor")||eb(j)&&j instanceof j&&eb(n)&&n instanceof n||!("constructor"in a&&"constructor"in b)))return!1}c||(c=[]),d||(d=[]);for(var o=c.length;o--;)if(c[o]==a)return d[o]==b;var p=0,q=!0;if(c.push(a),d.push(b),i){if(o=a.length,p=b.length,q=p==o)for(;p--;){var r=b[p];if(!(q=m(a[p],r,c,d)))break}}else k(b,function(b,e,f){return Kb.call(f,e)?(p++,q=Kb.call(a,e)&&m(a[e],b,c,d)):void 0}),q&&k(a,function(a,b,c){return Kb.call(c,b)?q=--p>-1:void 0});return c.pop(),d.pop(),q}function n(a,b){for(var c=new Array(a),d=0;a>d;d++)c[d]=b();return c}function o(){try{return Ub.apply(this,arguments)}catch(a){return $b.e=a,$b}}function p(a){if(!eb(a))throw new TypeError("fn must be a function");return Ub=a,o}function q(a){throw a}function r(a,b){this.id=a,this.value=b}function t(a,b){this.scheduler=a,this.disposable=b,this.isDisposed=!1}function u(a,b){b.isDisposed||(b.isDisposed=!0,b.disposable.dispose())}function v(a){this.observer=a,this.a=[],this.isStopped=!1}function w(){this._s=s}function x(){this._s=s,this._l=s.length,this._i=0}function y(a){this._a=a}function z(a){this._a=a,this._l=D(a),this._i=0}function A(a){return"number"==typeof a&&T.isFinite(a)}function B(b){var c,d=b[rb];if(!d&&"string"==typeof b)return c=new w(b),c[rb]();if(!d&&b.length!==a)return c=new y(b),c[rb]();if(!d)throw new TypeError("Object is not iterable");return b[rb]()}function C(a){var b=+a;return 0===b?b:isNaN(b)?b:0>b?-1:1}function D(a){var b=+a.length;return isNaN(b)?0:0!==b&&A(b)?(b=C(b)*Math.floor(Math.abs(b)),0>=b?0:b>Wc?Wc:b):b}function E(a,b){this.observer=a,this.parent=b}function F(a,b){return oc(a)||(a=sc),new Yc(b,a)}function G(a,b){this.observer=a,this.parent=b}function H(a,b){this.observer=a,this.parent=b}function I(a,b){return new td(function(c){var d=new ic,e=new jc;return e.setDisposable(d),d.setDisposable(a.subscribe(function(a){c.onNext(a)},function(a){try{var d=b(a)}catch(f){return c.onError(f)}db(d)&&(d=Pc(d));var g=new ic;e.setDisposable(g),g.setDisposable(d.subscribe(c))},function(a){c.onCompleted(a)})),e},a)}function J(a,b){var c=this;return new td(function(d){var e=0,f=a.length;return c.subscribe(function(c){if(f>e){var g,h=a[e++];try{g=b(c,h)}catch(i){return d.onError(i)}d.onNext(g)}else d.onCompleted()},function(a){d.onError(a)},function(){d.onCompleted()})},c)}function K(){return!1}function L(){return[]}function M(a,b,c){var d=wb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return db(e)&&(e=Pc(e)),(ub(e)||tb(e))&&(e=Xc(e)),e}).concatAll()}function N(a,b,c){for(var d=0,e=a.length;e>d;d++)if(c(a[d],b))return d;return-1}function O(a){this.comparer=a,this.set=[]}function P(a,b,c){this.observer=a,this.selector=b,this.source=c,this.i=0,this.isStopped=!1}function Q(a,b,c){var d=wb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return db(e)&&(e=Pc(e)),(ub(e)||tb(e))&&(e=Xc(e)),e}).mergeAll()}function R(a,b,c){this.observer=a,this.predicate=b,this.source=c,this.i=0,this.isStopped=!1}var S={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},T=S[typeof window]&&window||this,U=S[typeof exports]&&exports&&!exports.nodeType&&exports,V=S[typeof module]&&module&&!module.nodeType&&module,W=V&&V.exports===U&&U,X=S[typeof global]&&global;!X||X.global!==X&&X.window!==X||(T=X);var Y={internals:{},config:{Promise:T.Promise},helpers:{}},Z=Y.helpers.noop=function(){},$=(Y.helpers.notDefined=function(a){return"undefined"==typeof a},Y.helpers.identity=function(a){return a}),_=(Y.helpers.pluck=function(a){return function(b){return b[a]}},Y.helpers.just=function(a){return function(){return a}},Y.helpers.defaultNow=Date.now),ab=Y.helpers.defaultComparer=function(a,b){return Vb(a,b)},bb=Y.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},cb=(Y.helpers.defaultKeySerializer=function(a){return a.toString()},Y.helpers.defaultError=function(a){throw a}),db=Y.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},eb=(Y.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},Y.helpers.not=function(a){return!a},Y.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==Jb.call(a)}),a}());Y.config.longStackSupport=!1;var fb=!1;try{throw new Error}catch(gb){fb=!!gb.stack}var hb,ib=g(),jb="From previous event:",kb=Y.EmptyError=function(){this.message="Sequence contains no elements.",Error.call(this)};kb.prototype=Error.prototype;var lb=Y.ObjectDisposedError=function(){this.message="Object has been disposed",Error.call(this)};lb.prototype=Error.prototype;var mb=Y.ArgumentOutOfRangeError=function(){this.message="Argument out of range",Error.call(this)};mb.prototype=Error.prototype;var nb=Y.NotSupportedError=function(a){this.message=a||"This operation is not supported",Error.call(this)};nb.prototype=Error.prototype;var ob=Y.NotImplementedError=function(a){this.message=a||"This operation is not implemented",Error.call(this)};ob.prototype=Error.prototype;var pb=Y.helpers.notImplemented=function(){throw new ob},qb=Y.helpers.notSupported=function(){throw new nb},rb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";T.Set&&"function"==typeof(new T.Set)["@@iterator"]&&(rb="@@iterator");var sb=Y.doneEnumerator={done:!0,value:a},tb=Y.helpers.isIterable=function(b){return b[rb]!==a},ub=Y.helpers.isArrayLike=function(b){return b&&b.length!==a};Y.helpers.iterator=rb;var vb,wb=Y.internals.bindCallback=function(a,b,c){if("undefined"==typeof b)return a;switch(c){case 0:return function(){return a.call(b)};case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}},xb=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],yb=xb.length,zb="[object Arguments]",Ab="[object Array]",Bb="[object Boolean]",Cb="[object Date]",Db="[object Error]",Eb="[object Function]",Fb="[object Number]",Gb="[object Object]",Hb="[object RegExp]",Ib="[object String]",Jb=Object.prototype.toString,Kb=Object.prototype.hasOwnProperty,Lb=Jb.call(arguments)==zb,Mb=Error.prototype,Nb=Object.prototype,Ob=String.prototype,Pb=Nb.propertyIsEnumerable;try{vb=!(Jb.call(document)==Gb&&!({toString:0}+""))}catch(gb){vb=!0}var Qb={};Qb[Ab]=Qb[Cb]=Qb[Fb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Qb[Bb]=Qb[Ib]={constructor:!0,toString:!0,valueOf:!0},Qb[Db]=Qb[Eb]=Qb[Hb]={constructor:!0,toString:!0},Qb[Gb]={constructor:!0};var Rb={};!function(){var a=function(){this.x=1},b=[];a.prototype={valueOf:1,y:1};for(var c in new a)b.push(c);for(c in arguments);Rb.enumErrorProps=Pb.call(Mb,"message")||Pb.call(Mb,"name"),Rb.enumPrototypes=Pb.call(a,"prototype"),Rb.nonEnumArgs=0!=c,Rb.nonEnumShadows=!/valueOf/.test(b)}(1);var Sb=Y.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},Tb=function(a){return a&&"object"==typeof a?Jb.call(a)==zb:!1};Lb||(Tb=function(a){return a&&"object"==typeof a?Kb.call(a,"callee"):!1});var Ub,Vb=Y.internals.isEqual=function(a,b){return m(a,b,[],[])},Wb=({}.hasOwnProperty,Array.prototype.slice),Xb=this.inherits=Y.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},Yb=Y.internals.addProperties=function(a){for(var b=[],c=1,d=arguments.length;d>c;c++)b.push(arguments[c]);for(var e=0,f=b.length;f>e;e++){var g=b[e];for(var h in g)a[h]=g[h]}},Zb=Y.internals.addRef=function(a,b){return new td(function(c){return new bc(b.getDisposable(),a.subscribe(c))})},$b={e:{}};r.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var _b=Y.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},ac=_b.prototype;ac.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},ac.percolate=function(a){if(!(a>=this.length||0>a)){var b=a-1>>1;if(!(0>b||b===a)&&this.isHigherPriority(a,b)){var c=this.items[a];this.items[a]=this.items[b],this.items[b]=c,this.percolate(b)}}},ac.heapify=function(a){if(+a||(a=0),!(a>=this.length||0>a)){var b=2*a+1,c=2*a+2,d=a;if(b<this.length&&this.isHigherPriority(b,d)&&(d=b),c<this.length&&this.isHigherPriority(c,d)&&(d=c),d!==a){var e=this.items[a];this.items[a]=this.items[d],this.items[d]=e,this.heapify(d)}}},ac.peek=function(){return this.items[0].value},ac.removeAt=function(b){this.items[b]=this.items[--this.length],this.items[this.length]=a,this.heapify()},ac.dequeue=function(){var a=this.peek();return this.removeAt(0),a},ac.enqueue=function(a){var b=this.length++;this.items[b]=new r(_b.count++,a),this.percolate(b)},ac.remove=function(a){for(var b=0;b<this.length;b++)if(this.items[b].value===a)return this.removeAt(b),!0;return!1},_b.count=0;var bc=Y.CompositeDisposable=function(){var a,b,c=[];if(Array.isArray(arguments[0]))c=arguments[0],b=c.length;else for(b=arguments.length,c=new Array(b),a=0;b>a;a++)c[a]=arguments[a];for(a=0;b>a;a++)if(!gc(c[a]))throw new TypeError("Not a disposable");this.disposables=c,this.isDisposed=!1,this.length=c.length},cc=bc.prototype;cc.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},cc.remove=function(a){var b=!1;if(!this.isDisposed){var c=this.disposables.indexOf(a);-1!==c&&(b=!0,this.disposables.splice(c,1),this.length--,a.dispose())}return b},cc.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var a=this.disposables.length,b=new Array(a),c=0;a>c;c++)b[c]=this.disposables[c];for(this.disposables=[],this.length=0,c=0;a>c;c++)b[c].dispose()}};var dc=Y.Disposable=function(a){this.isDisposed=!1,this.action=a||Z};dc.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var ec=dc.create=function(a){return new dc(a)},fc=dc.empty={dispose:Z},gc=dc.isDisposable=function(a){return a&&eb(a.dispose)},hc=dc.checkDisposed=function(a){if(a.isDisposed)throw new lb},ic=Y.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null};ic.prototype.getDisposable=function(){return this.current},ic.prototype.setDisposable=function(a){if(this.current)throw new Error("Disposable has already been assigned");var b=this.isDisposed;!b&&(this.current=a),b&&a&&a.dispose()},ic.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var jc=Y.SerialDisposable=function(){this.isDisposed=!1,this.current=null};jc.prototype.getDisposable=function(){return this.current},jc.prototype.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},jc.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var kc=Y.RefCountDisposable=function(){function a(a){this.disposable=a,this.disposable.count++,this.isInnerDisposed=!1}function b(a){this.underlyingDisposable=a,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return a.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},b.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},b.prototype.getDisposable=function(){return this.isDisposed?fc:new a(this)},b}();t.prototype.dispose=function(){this.scheduler.scheduleWithState(this,u)};var lc=Y.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||bb,this.disposable=new ic};lc.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},lc.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},lc.prototype.isCancelled=function(){return this.disposable.isDisposed},lc.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var mc=Y.Scheduler=function(){function a(a,b,c,d){this.now=a,this._schedule=b,this._scheduleRelative=c,this._scheduleAbsolute=d}function b(a,b){return b(),fc}a.isScheduler=function(b){return b instanceof a};var c=a.prototype;return c.schedule=function(a){return this._schedule(a,b)},c.scheduleWithState=function(a,b){return this._schedule(a,b)},c.scheduleWithRelative=function(a,c){return this._scheduleRelative(c,a,b)},c.scheduleWithRelativeAndState=function(a,b,c){return this._scheduleRelative(a,b,c)},c.scheduleWithAbsolute=function(a,c){return this._scheduleAbsolute(c,a,b)},c.scheduleWithAbsoluteAndState=function(a,b,c){return this._scheduleAbsolute(a,b,c)},a.now=_,a.normalize=function(a){return 0>a&&(a=0),a},a}(),nc=mc.normalize,oc=mc.isScheduler;!function(a){function b(a,b){function c(b){e(b,function(b){var d=!1,e=!1,g=a.scheduleWithState(b,function(a,b){return d?f.remove(g):e=!0,c(b),fc});e||(f.add(g),d=!0)})}var d=b[0],e=b[1],f=new bc;return c(d),f}function c(a,b,c){function d(b){f(b,function(b,e){var f=!1,h=!1,i=a[c](b,e,function(a,b){return f?g.remove(i):h=!0,d(b),fc});h||(g.add(i),f=!0)})}var e=b[0],f=b[1],g=new bc;return d(e),g}function d(a,b){a(function(c){b(a,c)})}a.scheduleRecursive=function(a){return this.scheduleRecursiveWithState(a,function(a,b){a(function(){b(a)})})},a.scheduleRecursiveWithState=function(a,c){return this.scheduleWithState([a,c],b)},a.scheduleRecursiveWithRelative=function(a,b){return this.scheduleRecursiveWithRelativeAndState(b,a,d)},a.scheduleRecursiveWithRelativeAndState=function(a,b,d){return this._scheduleRelative([a,d],b,function(a,b){return c(a,b,"scheduleWithRelativeAndState")})},a.scheduleRecursiveWithAbsolute=function(a,b){return this.scheduleRecursiveWithAbsoluteAndState(b,a,d)},a.scheduleRecursiveWithAbsoluteAndState=function(a,b,d){return this._scheduleAbsolute([a,d],b,function(a,b){return c(a,b,"scheduleWithAbsoluteAndState")})}}(mc.prototype),function(){mc.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},mc.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof T.setInterval)throw new nb;b=nc(b);var d=a,e=T.setInterval(function(){d=c(d)},b);return ec(function(){T.clearInterval(e)})}}(mc.prototype),function(a){a.catchError=a["catch"]=function(a){return new wc(this,a)}}(mc.prototype);var pc,qc,rc=(Y.internals.SchedulePeriodicRecursive=function(){function a(a,b){b(0,this._period);try{this._state=this._action(this._state)}catch(c){throw this._cancel.dispose(),c}}function b(a,b,c,d){this._scheduler=a,this._state=b,this._period=c,this._action=d}return b.prototype.start=function(){var b=new ic;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),mc.immediate=function(){function a(a,b){return b(this,a)}return new mc(_,a,qb,qb)}()),sc=mc.currentThread=function(){function a(){for(;c.length>0;){var a=c.dequeue();!a.isCancelled()&&a.invoke()}}function b(b,d){var e=new lc(this,b,d,this.now());if(c)c.enqueue(e);else{c=new _b(4),c.enqueue(e);var f=p(a)();if(c=null,f===$b)return q(f.e)}return e.disposable}var c,d=new mc(_,b,qb,qb);return d.scheduleRequired=function(){return!c},d}(),tc=function(){var a,b=Z;if(T.setTimeout)a=T.setTimeout,b=T.clearTimeout;else{if(!T.WScript)throw new nb;a=function(a,b){T.WScript.Sleep(b),a()}}return{setTimeout:a,clearTimeout:b}}(),uc=tc.setTimeout,vc=tc.clearTimeout;!function(){function a(b){if(f)uc(function(){a(b)},0);else{var c=e[b];if(c){f=!0;var d=p(c)();if(qc(b),f=!1,d===$b)return q(d.e)}}}function b(){if(!T.postMessage||T.importScripts)return!1;var a=!1,b=T.onmessage;return T.onmessage=function(){a=!0},T.postMessage("","*"),T.onmessage=b,a}function c(b){"string"==typeof b.data&&b.data.substring(0,i.length)===i&&a(b.data.substring(i.length))}var d=1,e={},f=!1;qc=function(a){delete e[a]};var g=RegExp("^"+String(Jb).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),h="function"==typeof(h=X&&W&&X.setImmediate)&&!g.test(h)&&h;if(eb(h))pc=function(b){var c=d++;return e[c]=b,h(function(){a(c)}),c};else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))pc=function(b){var c=d++;return e[c]=b,process.nextTick(function(){a(c)}),c};else if(b()){var i="ms.rx.schedule"+Math.random();T.addEventListener?T.addEventListener("message",c,!1):T.attachEvent?T.attachEvent("onmessage",c):T.onmessage=c,pc=function(a){var b=d++;return e[b]=a,T.postMessage(i+currentId,"*"),b}}else if(T.MessageChannel){var j=new T.MessageChannel;j.port1.onmessage=function(b){a(b.data)},pc=function(a){var b=d++;return e[b]=a,j.port2.postMessage(b),b}}else pc="document"in T&&"onreadystatechange"in T.document.createElement("script")?function(b){var c=T.document.createElement("script"),f=d++;return e[f]=b,c.onreadystatechange=function(){a(f),c.onreadystatechange=null,c.parentNode.removeChild(c),c=null},T.document.documentElement.appendChild(c),f}:function(b){var c=d++;return e[c]=b,uc(function(){a(c)},0),c}}();var wc=(mc.timeout=mc["default"]=function(){function a(a,b){var c=this,d=new ic,e=pc(function(){!d.isDisposed&&d.setDisposable(b(c,a))});return new bc(d,ec(function(){qc(e)}))}function b(a,b,c){var d=this,e=mc.normalize(b),f=new ic;if(0===e)return d.scheduleWithState(a,c);var g=uc(function(){!f.isDisposed&&f.setDisposable(c(d,a))},e);return new bc(f,ec(function(){vc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new mc(_,a,b,c)}(),function(a){function b(a,b){return this._scheduler.scheduleWithState(a,this._wrap(b))}function c(a,b,c){return this._scheduler.scheduleWithRelativeAndState(a,b,this._wrap(c))}function d(a,b,c){return this._scheduler.scheduleWithAbsoluteAndState(a,b,this._wrap(c))}function e(e,f){this._scheduler=e,this._handler=f,this._recursiveOriginal=null,this._recursiveWrapper=null,a.call(this,this._scheduler.now.bind(this._scheduler),b,c,d)}return Xb(e,a),e.prototype._clone=function(a){return new e(a,this._handler)},e.prototype._wrap=function(a){var b=this;return function(c,d){try{return a(b._getRecursiveWrapper(c),d)}catch(e){if(!b._handler(e))throw e;return fc}}},e.prototype._getRecursiveWrapper=function(a){if(this._recursiveOriginal!==a){this._recursiveOriginal=a;var b=this._clone(a);b._recursiveOriginal=a,b._recursiveWrapper=b,this._recursiveWrapper=b}return this._recursiveWrapper},e.prototype.schedulePeriodicWithState=function(a,b,c){var d=this,e=!1,f=new ic;return f.setDisposable(this._scheduler.schedulePeriodicWithState(a,b,function(a){if(e)return null;try{return c(a)}catch(b){if(e=!0,!d._handler(b))throw b;return f.dispose(),null}})),f},e}(mc)),xc=Y.Notification=function(){function a(a,b,c,d,e,f){this.kind=a,this.value=b,this.exception=c,this._accept=d,this._acceptObservable=e,this.toString=f}return a.prototype.accept=function(a,b,c){return a&&"object"==typeof a?this._acceptObservable(a):this._accept(a,b,c)},a.prototype.toObservable=function(a){var b=this;return oc(a)||(a=rc),new td(function(c){return a.scheduleWithState(b,function(a,b){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),yc=xc.createOnNext=function(){function a(a){return a(this.value)}function b(a){return a.onNext(this.value)}function c(){return"OnNext("+this.value+")"}return function(d){return new xc("N",d,null,a,b,c)}}(),zc=xc.createOnError=function(){function a(a,b){return b(this.exception)}function b(a){return a.onError(this.exception)}function c(){return"OnError("+this.exception+")"}return function(d){return new xc("E",null,d,a,b,c)}}(),Ac=xc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){return new xc("C",null,null,a,b,c)}}(),Bc=Y.internals.Enumerator=function(a){this._next=a};Bc.prototype.next=function(){return this._next()},Bc.prototype[rb]=function(){return this};var Cc=Y.internals.Enumerable=function(a){this._iterator=a};Cc.prototype[rb]=function(){return this._iterator()},Cc.prototype.concat=function(){var a=this;return new td(function(b){var c,d=a[rb](),e=new jc,f=rc.scheduleRecursive(function(a){if(!c){try{var f=d.next()}catch(g){return b.onError(g)}if(f.done)return b.onCompleted();var h=f.value;db(h)&&(h=Pc(h));var i=new ic;e.setDisposable(i),i.setDisposable(h.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},a))}});return new bc(e,f,ec(function(){c=!0}))})},Cc.prototype.catchError=function(){var a=this;return new td(function(b){var c,d=a[rb](),e=new jc,f=rc.scheduleRecursiveWithState(null,function(a,f){if(!c){try{var g=d.next()}catch(h){return observer.onError(h)}if(g.done)return void(null!==a?b.onError(a):b.onCompleted());var i=g.value;db(i)&&(i=Pc(i));var j=new ic;e.setDisposable(j),j.setDisposable(i.subscribe(function(a){b.onNext(a)},f,function(){b.onCompleted()}))}});return new bc(e,f,ec(function(){c=!0}))})},Cc.prototype.catchErrorWhen=function(a){var b=this;return new td(function(c){var d,e,f=new wd,g=new wd,h=a(f),i=h.subscribe(g),j=b[rb](),k=new jc,l=rc.scheduleRecursive(function(a){if(!d){try{var b=j.next()}catch(h){return c.onError(h)}if(b.done)return void(e?c.onError(e):c.onCompleted());var i=b.value;db(i)&&(i=Pc(i));var l=new ic,m=new ic;k.setDisposable(new bc(m,l)),l.setDisposable(i.subscribe(function(a){c.onNext(a)},function(b){m.setDisposable(g.subscribe(a,function(a){c.onError(a)},function(){c.onCompleted()})),f.onNext(b)},function(){c.onCompleted()}))}});return new bc(i,k,l,ec(function(){d=!0}))})};var Dc=Cc.repeat=function(a,b){return null==b&&(b=-1),new Cc(function(){var c=b;return new Bc(function(){return 0===c?sb:(c>0&&c--,{done:!1,value:a})})})},Ec=Cc.of=function(a,b,c){if(b)var d=wb(b,c,3);return new Cc(function(){var c=-1;return new Bc(function(){return++c<a.length?{done:!1,value:b?d(a[c],c,a):a[c]}:sb})})},Fc=Y.Observer=function(){};Fc.prototype.toNotifier=function(){var a=this;return function(b){return b.accept(a)}},Fc.prototype.asObserver=function(){return new Jc(this.onNext.bind(this),this.onError.bind(this),this.onCompleted.bind(this))},Fc.prototype.checked=function(){return new Kc(this)};var Gc=Fc.create=function(a,b,c){return a||(a=Z),b||(b=cb),c||(c=Z),new Jc(a,b,c)};Fc.fromNotifier=function(a,b){return new Jc(function(c){return a.call(b,yc(c))},function(c){return a.call(b,zc(c))},function(){return a.call(b,Ac())})},Fc.prototype.notifyOn=function(a){return new Mc(a,this)},Fc.prototype.makeSafe=function(a){return new AnonymousSafeObserver(this._onNext,this._onError,this._onCompleted,a)};var Hc,Ic=Y.internals.AbstractObserver=function(a){function b(){this.isStopped=!1,a.call(this)}return Xb(b,a),b.prototype.next=pb,b.prototype.error=pb,b.prototype.completed=pb,b.prototype.onNext=function(a){this.isStopped||this.next(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.error(a))},b.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.error(a),!0)},b}(Fc),Jc=Y.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return Xb(b,a),b.prototype.next=function(a){this._onNext(a)},b.prototype.error=function(a){this._onError(a)},b.prototype.completed=function(){this._onCompleted()},b}(Ic),Kc=function(a){function b(b){a.call(this),this._observer=b,this._state=0}Xb(b,a);var c=b.prototype;return c.onNext=function(a){this.checkAccess();var b=p(this._observer.onNext).call(this._observer,a);this._state=0,b===$b&&q(b.e)},c.onError=function(a){this.checkAccess();var b=p(this._observer.onError).call(this._observer,a);this._state=2,b===$b&&q(b.e)},c.onCompleted=function(){this.checkAccess();var a=p(this._observer.onCompleted).call(this._observer);this._state=2,a===$b&&q(a.e)},c.checkAccess=function(){if(1===this._state)throw new Error("Re-entrancy detected");if(2===this._state)throw new Error("Observer completed");0===this._state&&(this._state=1)},b}(Fc),Lc=Y.internals.ScheduledObserver=function(a){function b(b,c){a.call(this),this.scheduler=b,this.observer=c,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new jc}return Xb(b,a),b.prototype.next=function(a){var b=this;this.queue.push(function(){b.observer.onNext(a)})},b.prototype.error=function(a){var b=this;this.queue.push(function(){b.observer.onError(a)})},b.prototype.completed=function(){var a=this;this.queue.push(function(){a.observer.onCompleted()})},b.prototype.ensureActive=function(){var a=!1,b=this;!this.hasFaulted&&this.queue.length>0&&(a=!this.isAcquired,this.isAcquired=!0),a&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(function(a){var c;if(!(b.queue.length>0))return void(b.isAcquired=!1);c=b.queue.shift();try{c()}catch(d){throw b.queue=[],b.hasFaulted=!0,d}a()}))},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.disposable.dispose()},b}(Ic),Mc=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return Xb(b,a),b.prototype.next=function(b){a.prototype.next.call(this,b),this.ensureActive()},b.prototype.error=function(b){a.prototype.error.call(this,b),this.ensureActive()},b.prototype.completed=function(){a.prototype.completed.call(this),this.ensureActive()},b.prototype.dispose=function(){a.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},b}(Lc),Nc=Y.Observable=function(){function a(a){if(Y.config.longStackSupport&&fb){try{throw new Error}catch(b){this.stack=b.stack.substring(b.stack.indexOf("\n")+1)}var d=this;this._subscribe=function(b){var e=b.onError.bind(b);return b.onError=function(a){c(a,d),e(a)},a.call(d,b)}}else this._subscribe=a}return Hc=a.prototype,Hc.subscribe=Hc.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:Gc(a,b,c))},Hc.subscribeOnNext=function(a,b){return this._subscribe(Gc("undefined"!=typeof b?function(c){a.call(b,c)}:a))},Hc.subscribeOnError=function(a,b){return this._subscribe(Gc(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},Hc.subscribeOnCompleted=function(a,b){return this._subscribe(Gc(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},a}(),Oc=Y.ObservableBase=function(a){function b(a){return a&&eb(a.dispose)?a:eb(a)?ec(a):fc}function c(a,c){var d=c[0],e=c[1],f=p(e.subscribeCore).call(e,d);return f!==$b||d.fail($b.e)?void d.setDisposable(b(f)):q($b.e)}function d(a){var b=new ud(a),d=[b,this];return sc.scheduleRequired()?sc.scheduleWithState(d,c):c(null,d),b}function e(){a.call(this,d)}return Xb(e,a),e.prototype.subscribeCore=pb,e}(Nc);Hc.observeOn=function(a){var b=this;return new td(function(c){return b.subscribe(new Mc(a,c))},b)},Hc.subscribeOn=function(a){var b=this;return new td(function(c){var d=new ic,e=new jc;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new t(a,b.subscribe(c)))})),e},b)};var Pc=Nc.fromPromise=function(a){return Rc(function(){var b=new Y.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};Hc.toPromise=function(a){if(a||(a=Y.config.Promise),!a)throw new nb("Promise type not provided nor in Rx.config.Promise");var b=this;return new a(function(a,c){var d,e=!1;b.subscribe(function(a){d=a,e=!0},c,function(){e&&a(d)})})};var Qc=function(a){function b(b){this.source=b,a.call(this)}return Xb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new v(a))},b}(Oc);v.prototype.onNext=function(a){this.isStopped||this.a.push(a)},v.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},v.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onNext(this.a),this.observer.onCompleted())},v.prototype.dispose=function(){this.isStopped=!0},v.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},Hc.toArray=function(){return new Qc(this)},Nc.create=Nc.createWithDisposable=function(a,b){return new td(a,b)};var Rc=Nc.defer=function(a){return new td(function(b){var c;try{c=a()}catch(d){return gd(d).subscribe(b)}return db(c)&&(c=Pc(c)),c.subscribe(b)})},Sc=function(a){function b(b){this.scheduler=b,a.call(this)}function c(a,b){this.observer=a,this.parent=b}function d(a,b){b.onCompleted()}return Xb(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this);return b.run()},c.prototype.run=function(){return this.parent.scheduler.scheduleWithState(this.observer,d)},b}(Oc),Tc=Nc.empty=function(a){return oc(a)||(a=rc),new Sc(a)},Uc=function(a){function b(b,c,d){this.iterable=b,this.mapper=c,this.scheduler=d,a.call(this)}return Xb(b,a),b.prototype.subscribeCore=function(a){var b=new Vc(a,this);return b.run()},b}(Oc),Vc=function(){function a(a,b){this.observer=a,this.parent=b}return a.prototype.run=function(){function a(a,b){try{var f=c.next()}catch(g){return d.onError(g)}if(f.done)return d.onCompleted();var h=f.value;if(e)try{h=e(h,a)}catch(g){return d.onError(g)}d.onNext(h),b(a+1)}var b=Object(this.parent.iterable),c=B(b),d=this.observer,e=this.parent.mapper;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}(),Wc=Math.pow(2,53)-1;w.prototype[rb]=function(){return new x(this._s)},x.prototype[rb]=function(){return this},x.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:sb},y.prototype[rb]=function(){return new z(this._a)},z.prototype[rb]=function(){return this},z.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:sb};var Xc=Nc.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!eb(b))throw new Error("mapFn when provided must be a function");if(b)var e=wb(b,c,2);return oc(d)||(d=sc),new Uc(a,e,d)},Yc=function(a){function b(b,c){this.args=b,this.scheduler=c,a.call(this)
3
+ }return Xb(b,a),b.prototype.subscribeCore=function(a){var b=new E(a,this);return b.run()},b}(Oc);E.prototype.run=function(){function a(a,e){d>a?(b.onNext(c[a]),e(a+1)):b.onCompleted()}var b=this.observer,c=this.parent.args,d=c.length;return this.parent.scheduler.scheduleRecursiveWithState(0,a)};var Zc=Nc.fromArray=function(a,b){return oc(b)||(b=sc),new Yc(a,b)};Nc.generate=function(a,b,c,d,e){return oc(e)||(e=sc),new td(function(f){var g=!0;return e.scheduleRecursiveWithState(a,function(a,e){var h,i;try{g?g=!1:a=c(a),h=b(a),h&&(i=d(a))}catch(j){return f.onError(j)}h?(f.onNext(i),e(a)):f.onCompleted()})})};var $c=function(a){function b(){a.call(this)}return Xb(b,a),b.prototype.subscribeCore=function(){return fc},b}(Oc),_c=Nc.never=function(){return new $c};Nc.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return new Yc(b,sc)},Nc.ofWithScheduler=function(a){for(var b=arguments.length,c=new Array(b-1),d=1;b>d;d++)c[d-1]=arguments[d];return new Yc(c,a)};var ad=function(a){function b(b,c){this.obj=b,this.keys=Object.keys(b),this.scheduler=c,a.call(this)}return Xb(b,a),b.prototype.subscribeCore=function(a){var b=new G(a,this);return b.run()},b}(Oc);G.prototype.run=function(){function a(a,f){if(e>a){var g=d[a];b.onNext([g,c[g]]),f(a+1)}else b.onCompleted()}var b=this.observer,c=this.parent.obj,d=this.parent.keys,e=d.length;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},Nc.pairs=function(a,b){return b||(b=sc),new ad(a,b)};var bd=function(a){function b(b,c,d){this.start=b,this.count=c,this.scheduler=d,a.call(this)}return Xb(b,a),b.prototype.subscribeCore=function(a){var b=new cd(a,this);return b.run()},b}(Oc),cd=function(){function a(a,b){this.observer=a,this.parent=b}return a.prototype.run=function(){function a(a,e){c>a?(d.onNext(b+a),e(a+1)):d.onCompleted()}var b=this.parent.start,c=this.parent.count,d=this.observer;return this.parent.scheduler.scheduleRecursiveWithState(0,a)},a}();Nc.range=function(a,b,c){return oc(c)||(c=sc),new bd(a,b,c)};var dd=function(a){function b(b,c,d){this.value=b,this.repeatCount=null==c?-1:c,this.scheduler=d,a.call(this)}return Xb(b,a),b.prototype.subscribeCore=function(a){var b=new H(a,this);return b.run()},b}(Oc);H.prototype.run=function(){function a(a,d){return(-1===a||a>0)&&(b.onNext(c),a>0&&a--),0===a?b.onCompleted():void d(a)}var b=this.observer,c=this.parent.value;return this.parent.scheduler.scheduleRecursiveWithState(this.parent.repeatCount,a)},Nc.repeat=function(a,b,c){return oc(c)||(c=sc),new dd(a,b,c)};var ed=function(a){function b(b,c){this.value=b,this.scheduler=c,a.call(this)}function c(a,b){this.observer=a,this.parent=b}function d(a,b){var c=b[0],d=b[1];d.onNext(c),d.onCompleted()}return Xb(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this);return b.run()},c.prototype.run=function(){return this.parent.scheduler.scheduleWithState([this.parent.value,this.observer],d)},b}(Oc),fd=(Nc["return"]=Nc.just=Nc.returnValue=function(a,b){return oc(b)||(b=rc),new ed(a,b)},function(a){function b(b,c){this.error=b,this.scheduler=c,a.call(this)}function c(a,b){this.observer=a,this.parent=b}function d(a,b){var c=b[0],d=b[1];d.onError(c)}return Xb(b,a),b.prototype.subscribeCore=function(a){var b=new c(a,this);return b.run()},c.prototype.run=function(){return this.parent.scheduler.scheduleWithState([this.parent.error,this.observer],d)},b}(Oc)),gd=Nc["throw"]=Nc.throwError=Nc.throwException=function(a,b){return oc(b)||(b=rc),new fd(a,b)};Nc.using=function(a,b){return new td(function(c){var d,e,f=fc;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new bc(gd(g).subscribe(c),f)}return new bc(e.subscribe(c),f)})},Hc.amb=function(a){var b=this;return new td(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new ic,j=new ic;return db(a)&&(a=Pc(a)),i.setDisposable(b.subscribe(function(a){d(),f===g&&c.onNext(a)},function(a){d(),f===g&&c.onError(a)},function(){d(),f===g&&c.onCompleted()})),j.setDisposable(a.subscribe(function(a){e(),f===h&&c.onNext(a)},function(a){e(),f===h&&c.onError(a)},function(){e(),f===h&&c.onCompleted()})),new bc(i,j)})},Nc.amb=function(){function a(a,b){return a.amb(b)}var b=_c(),c=[];if(Array.isArray(arguments[0]))c=arguments[0];else for(var d=0,e=arguments.length;e>d;d++)c.push(arguments[d]);for(var d=0,e=c.length;e>d;d++)b=a(b,c[d]);return b},Hc["catch"]=Hc.catchError=Hc.catchException=function(a){return"function"==typeof a?I(this,a):hd([this,a])};var hd=Nc.catchError=Nc["catch"]=Nc.catchException=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return Ec(a).catchError()};Hc.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return Array.isArray(b[0])?b[0].unshift(this):b.unshift(this),id.apply(this,b)};var id=Nc.combineLatest=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.pop();return Array.isArray(b[0])&&(b=b[0]),new td(function(a){function c(b){if(h[b]=!0,i||(i=h.every($))){try{var c=d.apply(null,k)}catch(e){return a.onError(e)}a.onNext(c)}else j.filter(function(a,c){return c!==b}).every($)&&a.onCompleted()}function e(b){j[b]=!0,j.every($)&&a.onCompleted()}for(var f=b.length,g=function(){return!1},h=n(f,g),i=!1,j=n(f,g),k=new Array(f),l=new Array(f),m=0;f>m;m++)!function(d){var f=b[d],g=new ic;db(f)&&(f=Pc(f)),g.setDisposable(f.subscribe(function(a){k[d]=a,c(d)},function(b){a.onError(b)},function(){e(d)})),l[d]=g}(m);return new bc(l)},this)};Hc.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),jd.apply(null,a)};var jd=Nc.concat=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(arguments.length);for(var b=0,c=arguments.length;c>b;b++)a[b]=arguments[b]}return Ec(a).concat()};Hc.concatAll=Hc.concatObservable=function(){return this.merge(1)};var kd=function(a){function b(b,c){this.source=b,this.maxConcurrent=c,a.call(this)}return Xb(b,a),b.prototype.subscribeCore=function(a){var b=new bc;return b.add(this.source.subscribe(new ld(a,this.maxConcurrent,b))),b},b}(Oc),ld=function(){function a(a,b,c){this.o=a,this.max=b,this.g=c,this.done=!1,this.q=[],this.activeCount=0,this.isStopped=!1}function b(a,b){this.parent=a,this.sad=b,this.isStopped=!1}return a.prototype.handleSubscribe=function(a){var c=new ic;this.g.add(c),db(a)&&(a=Pc(a)),c.setDisposable(a.subscribe(new b(this,c)))},a.prototype.onNext=function(a){this.isStopped||(this.activeCount<this.max?(this.activeCount++,this.handleSubscribe(a)):this.q.push(a))},a.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},a.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.done=!0,0===this.activeCount&&this.o.onCompleted())},a.prototype.dispose=function(){this.isStopped=!0},a.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b.prototype.onNext=function(a){this.isStopped||this.parent.o.onNext(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.parent.o.onError(a))},b.prototype.onCompleted=function(){if(!this.isStopped){this.isStopped=!0;var a=this.parent;a.g.remove(this.sad),a.q.length>0?a.handleSubscribe(a.q.shift()):(a.activeCount--,a.done&&0===a.activeCount&&a.o.onCompleted())}},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},a}();Hc.merge=function(a){return"number"!=typeof a?md(this,a):new kd(this,a)};var md=Nc.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(oc(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=rc,b=0;d>b;b++)c.push(arguments[b]);else for(a=rc,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),F(a,c).mergeAll()},nd=Y.CompositeError=function(a){this.name="NotImplementedError",this.innerErrors=a,this.message="This contains multiple errors. Check the innerErrors",Error.call(this)};nd.prototype=Error.prototype,Nc.mergeDelayError=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}var d=F(null,a);return new td(function(a){function b(){0===g.length?a.onCompleted():a.onError(1===g.length?g[0]:new nd(g))}var c=new bc,e=new ic,f=!1,g=[];return c.add(e),e.setDisposable(d.subscribe(function(d){var e=new ic;c.add(e),db(d)&&(d=Pc(d)),e.setDisposable(d.subscribe(function(b){a.onNext(b)},function(a){g.push(a),c.remove(e),f&&1===c.length&&b()},function(){c.remove(e),f&&1===c.length&&b()}))},function(a){g.push(a),f=!0,1===c.length&&b()},function(){f=!0,1===c.length&&b()})),c})};var od=function(a){function b(b){this.source=b,a.call(this)}return Xb(b,a),b.prototype.subscribeCore=function(a){var b=new bc,c=new ic;return b.add(c),c.setDisposable(this.source.subscribe(new pd(a,b))),b},b}(Oc),pd=function(){function a(a,b){this.o=a,this.g=b,this.isStopped=!1,this.done=!1}function b(a,b,c){this.parent=a,this.g=b,this.sad=c,this.isStopped=!1}return a.prototype.onNext=function(a){if(!this.isStopped){var c=new ic;this.g.add(c),db(a)&&(a=Pc(a)),c.setDisposable(a.subscribe(new b(this,this.g,c)))}},a.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.o.onError(a))},a.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.done=!0,1===this.g.length&&this.o.onCompleted())},a.prototype.dispose=function(){this.isStopped=!0},a.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.o.onError(a),!0)},b.prototype.onNext=function(a){this.isStopped||this.parent.o.onNext(a)},b.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.parent.o.onError(a))},b.prototype.onCompleted=function(){if(!this.isStopped){var a=this.parent;this.isStopped=!0,a.g.remove(this.sad),a.done&&1===a.g.length&&a.o.onCompleted()}},b.prototype.dispose=function(){this.isStopped=!0},b.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.parent.o.onError(a),!0)},a}();Hc.mergeAll=Hc.mergeObservable=function(){return new od(this)},Hc.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return qd([this,a])};var qd=Nc.onErrorResumeNext=function(){var a=[];if(Array.isArray(arguments[0]))a=arguments[0];else for(var b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return new td(function(b){var c=0,d=new jc,e=rc.scheduleRecursive(function(e){var f,g;c<a.length?(f=a[c++],db(f)&&(f=Pc(f)),g=new ic,d.setDisposable(g),g.setDisposable(f.subscribe(b.onNext.bind(b),e,e))):b.onCompleted()});return new bc(d,e)})};Hc.skipUntil=function(a){var b=this;return new td(function(c){var d=!1,e=new bc(b.subscribe(function(a){d&&c.onNext(a)},function(a){c.onError(a)},function(){d&&c.onCompleted()}));db(a)&&(a=Pc(a));var f=new ic;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},function(a){c.onError(a)},function(){f.dispose()})),e},b)},Hc["switch"]=Hc.switchLatest=function(){var a=this;return new td(function(b){var c=!1,d=new jc,e=!1,f=0,g=a.subscribe(function(a){var g=new ic,h=++f;c=!0,d.setDisposable(g),db(a)&&(a=Pc(a)),g.setDisposable(a.subscribe(function(a){f===h&&b.onNext(a)},function(a){f===h&&b.onError(a)},function(){f===h&&(c=!1,e&&b.onCompleted())}))},function(a){b.onError(a)},function(){e=!0,!c&&b.onCompleted()});return new bc(g,d)},a)},Hc.takeUntil=function(a){var b=this;return new td(function(c){return db(a)&&(a=Pc(a)),new bc(b.subscribe(c),a.subscribe(function(){c.onCompleted()},function(a){c.onError(a)},Z))},b)},Hc.withLatestFrom=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.pop(),e=this;if("undefined"==typeof e)throw new Error("Source observable not found for withLatestFrom().");if("function"!=typeof d)throw new Error("withLatestFrom() expects a resultSelector function.");return Array.isArray(b[0])&&(b=b[0]),new td(function(a){for(var c=function(){return!1},f=b.length,g=n(f,c),h=!1,i=new Array(f),j=new Array(f+1),k=0;f>k;k++)!function(c){var d=b[c],e=new ic;db(d)&&(d=Pc(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every($)},a.onError.bind(a),function(){})),j[c]=e}(k);var l=new ic;return l.setDisposable(e.subscribe(function(b){var c,e=[b].concat(i);if(h){try{c=d.apply(null,e)}catch(f){return void a.onError(f)}a.onNext(c)}},a.onError.bind(a),function(){a.onCompleted()})),j[f]=l,new bc(j)},this)},Hc.zip=function(){if(Array.isArray(arguments[0]))return J.apply(this,arguments);for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=this,e=b.pop();return b.unshift(d),new td(function(a){function c(b){var c,f;if(h.every(function(a){return a.length>0})){try{f=h.map(function(a){return a.shift()}),c=e.apply(d,f)}catch(g){return void a.onError(g)}a.onNext(c)}else i.filter(function(a,c){return c!==b}).every($)&&a.onCompleted()}function f(b){i[b]=!0,i.every(function(a){return a})&&a.onCompleted()}for(var g=b.length,h=n(g,L),i=n(g,K),j=new Array(g),k=0;g>k;k++)!function(d){var e=b[d],g=new ic;db(e)&&(e=Pc(e)),g.setDisposable(e.subscribe(function(a){h[d].push(a),c(d)},function(b){a.onError(b)},function(){f(d)})),j[d]=g}(k);return new bc(j)},d)},Nc.zip=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];var d=b.shift();return d.zip.apply(d,b)},Nc.zipArray=function(){var a;if(Array.isArray(arguments[0]))a=arguments[0];else{var b=arguments.length;a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return new td(function(b){function c(a){if(f.every(function(a){return a.length>0})){var c=f.map(function(a){return a.shift()});b.onNext(c)}else if(g.filter(function(b,c){return c!==a}).every($))return void b.onCompleted()}function d(a){return g[a]=!0,g.every($)?void b.onCompleted():void 0}for(var e=a.length,f=n(e,function(){return[]}),g=n(e,function(){return!1}),h=new Array(e),i=0;e>i;i++)!function(e){h[e]=new ic,h[e].setDisposable(a[e].subscribe(function(a){f[e].push(a),c(e)},function(a){b.onError(a)},function(){d(e)}))}(i);return new bc(h)})},Hc.asObservable=function(){var a=this;return new td(function(b){return a.subscribe(b)},this)},Hc.bufferWithCount=function(a,b){return"number"!=typeof b&&(b=a),this.windowWithCount(a,b).selectMany(function(a){return a.toArray()}).where(function(a){return a.length>0})},Hc.dematerialize=function(){var a=this;return new td(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},Hc.distinctUntilChanged=function(a,b){var c=this;return b||(b=ab),new td(function(d){var e,f=!1;return c.subscribe(function(c){var g=c;if(a)try{g=a(c)}catch(h){return void d.onError(h)}if(f)try{var i=b(e,g)}catch(h){return void d.onError(h)}f&&i||(f=!0,e=g,d.onNext(c))},function(a){d.onError(a)},function(){d.onCompleted()})},this)},Hc["do"]=Hc.tap=Hc.doAction=function(a,b,c){var d=this;return new td(function(e){var f=!a||eb(a)?Gc(a||Z,b||Z,c||Z):a;return d.subscribe(function(a){try{f.onNext(a)}catch(b){e.onError(b)}e.onNext(a)},function(a){try{f.onError(a)}catch(b){e.onError(b)}e.onError(a)},function(){try{f.onCompleted()}catch(a){e.onError(a)}e.onCompleted()})},this)},Hc.doOnNext=Hc.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},Hc.doOnError=Hc.tapOnError=function(a,b){return this.tap(Z,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},Hc.doOnCompleted=Hc.tapOnCompleted=function(a,b){return this.tap(Z,null,"undefined"!=typeof b?function(){a.call(b)}:a)},Hc["finally"]=Hc.ensure=function(a){var b=this;return new td(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return ec(function(){try{d.dispose()}catch(b){throw b}finally{a()}})},this)},Hc.finallyAction=function(a){return this.ensure(a)},Hc.ignoreElements=function(){var a=this;return new td(function(b){return a.subscribe(Z,function(a){b.onError(a)},function(){b.onCompleted()})},a)},Hc.materialize=function(){var a=this;return new td(function(b){return a.subscribe(function(a){b.onNext(yc(a))},function(a){b.onNext(zc(a)),b.onCompleted()},function(){b.onNext(Ac()),b.onCompleted()})},a)},Hc.repeat=function(a){return Dc(this,a).concat()},Hc.retry=function(a){return Dc(this,a).catchError()},Hc.retryWhen=function(a){return Dc(this).catchErrorWhen(a)},Hc.scan=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,a=arguments[0],b=arguments[1]):b=arguments[0],new td(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=b(g,d):(g=c?b(a,d):d,f=!0)}catch(i){return void e.onError(i)}e.onNext(g)},function(a){e.onError(a)},function(){!h&&c&&e.onNext(a),e.onCompleted()})},d)},Hc.skipLast=function(a){if(0>a)throw new mb;var b=this;return new td(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&c.onNext(d.shift())},function(a){c.onError(a)},function(){c.onCompleted()})},b)},Hc.startWith=function(){var a,b=0;arguments.length&&oc(arguments[0])?(a=arguments[0],b=1):a=rc;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return Ec([Zc(c,a),this]).concat()},Hc.takeLast=function(a){if(0>a)throw new mb;var b=this;return new td(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){for(;d.length>0;)c.onNext(d.shift());c.onCompleted()})},b)},Hc.takeLastBuffer=function(a){var b=this;return new td(function(c){var d=[];return b.subscribe(function(b){d.push(b),d.length>a&&d.shift()},function(a){c.onError(a)},function(){c.onNext(d),c.onCompleted()})},b)},Hc.windowWithCount=function(a,b){var c=this;if(+a||(a=0),1/0===Math.abs(a)&&(a=0),0>=a)throw new mb;if(null==b&&(b=a),+b||(b=0),1/0===Math.abs(b)&&(b=0),0>=b)throw new mb;return new td(function(d){function e(){var a=new wd;i.push(a),d.onNext(Zb(a,g))}var f=new ic,g=new kc(f),h=0,i=[];return e(),f.setDisposable(c.subscribe(function(c){for(var d=0,f=i.length;f>d;d++)i[d].onNext(c);var g=h-a+1;g>=0&&g%b===0&&i.shift().onCompleted(),++h%b===0&&e()},function(a){for(;i.length>0;)i.shift().onError(a);d.onError(a)},function(){for(;i.length>0;)i.shift().onCompleted();d.onCompleted()})),g},c)},Hc.selectConcat=Hc.concatMap=function(a,b,c){return eb(a)&&eb(b)?this.concatMap(function(c,d){var e=a(c,d);return db(e)&&(e=Pc(e)),(ub(e)||tb(e))&&(e=Xc(e)),e.map(function(a,e){return b(c,a,d,e)})}):eb(a)?M(this,a,c):M(this,function(){return a})},Hc.concatMapObserver=Hc.selectConcatObserver=function(a,b,c,d){var e=this,f=wb(a,d,2),g=wb(b,d,1),h=wb(c,d,0);return new td(function(a){var b=0;return e.subscribe(function(c){var d;try{d=f(c,b++)}catch(e){return void a.onError(e)}db(d)&&(d=Pc(d)),a.onNext(d)},function(b){var c;try{c=g(b)}catch(d){return void a.onError(d)}db(c)&&(c=Pc(c)),a.onNext(c),a.onCompleted()},function(){var b;try{b=h()}catch(c){return void a.onError(c)}db(b)&&(b=Pc(b)),a.onNext(b),a.onCompleted()})},this).concatAll()},Hc.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new td(function(a){var d=!1;return c.subscribe(function(b){d=!0,a.onNext(b)},function(b){a.onError(b)},function(){!d&&a.onNext(b),a.onCompleted()})},c)},O.prototype.push=function(a){var b=-1===N(this.set,a,this.comparer);return b&&this.set.push(a),b},Hc.distinct=function(a,b){var c=this;return b||(b=ab),new td(function(d){var e=new O(b);return c.subscribe(function(b){var c=b;if(a)try{c=a(b)}catch(f){return void d.onError(f)}e.push(c)&&d.onNext(b)},function(a){d.onError(a)},function(){d.onCompleted()})},this)};var rd=function(a){function b(b,c,d){this.source=b,this.selector=wb(c,d,3),a.call(this)}return Xb(b,a),b.prototype.internalMap=function(a,c){var d=this;return new b(this.source,function(b,c,e){return a.call(this,d.selector(b,c,e),c,e)},c)},b.prototype.subscribeCore=function(a){return this.source.subscribe(new P(a,this.selector,this))},b}(Oc);P.prototype.onNext=function(a){if(!this.isStopped){var b=p(this.selector).call(this,a,this.i++,this.source);return b===$b?this.observer.onError(b.e):void this.observer.onNext(b)}},P.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},P.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},P.prototype.dispose=function(){this.isStopped=!0},P.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},Hc.map=Hc.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof rd?this.internalMap(c,b):new rd(this,c,b)},Hc.pluck=function(){var b=arguments,c=arguments.length;if(0===c)throw new Error("List of properties cannot be empty.");return this.map(function(d){for(var e=d,f=0;c>f;f++){var g=e[b[f]];if("undefined"==typeof g)return a;e=g}return e})},Hc.flatMapObserver=Hc.selectManyObserver=function(a,b,c,d){var e=this;return new td(function(f){var g=0;return e.subscribe(function(b){var c;try{c=a.call(d,b,g++)}catch(e){return void f.onError(e)}db(c)&&(c=Pc(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}db(c)&&(c=Pc(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}db(a)&&(a=Pc(a)),f.onNext(a),f.onCompleted()})},e).mergeAll()},Hc.selectMany=Hc.flatMap=function(a,b,c){return eb(a)&&eb(b)?this.flatMap(function(c,d){var e=a(c,d);return db(e)&&(e=Pc(e)),(ub(e)||tb(e))&&(e=Xc(e)),e.map(function(a,e){return b(c,a,d,e)})},c):eb(a)?Q(this,a,c):Q(this,function(){return a})},Hc.selectSwitch=Hc.flatMapLatest=Hc.switchMap=function(a,b){return this.select(a,b).switchLatest()},Hc.skip=function(a){if(0>a)throw new mb;var b=this;return new td(function(c){var d=a;return b.subscribe(function(a){0>=d?c.onNext(a):d--},function(a){c.onError(a)},function(){c.onCompleted()})},b)},Hc.skipWhile=function(a,b){var c=this,d=wb(a,b,3);return new td(function(a){var b=0,e=!1;return c.subscribe(function(f){if(!e)try{e=!d(f,b++,c)}catch(g){return void a.onError(g)}e&&a.onNext(f)},function(b){a.onError(b)},function(){a.onCompleted()})},c)},Hc.take=function(a,b){if(0>a)throw new mb;if(0===a)return Tc(b);var c=this;return new td(function(b){var d=a;return c.subscribe(function(a){d-->0&&(b.onNext(a),0===d&&b.onCompleted())},function(a){b.onError(a)},function(){b.onCompleted()})},c)},Hc.takeWhile=function(a,b){var c=this,d=wb(a,b,3);return new td(function(a){var b=0,e=!0;return c.subscribe(function(f){if(e){try{e=d(f,b++,c)}catch(g){return void a.onError(g)}e?a.onNext(f):a.onCompleted()}},function(b){a.onError(b)},function(){a.onCompleted()})},c)};var sd=function(a){function b(b,c,d){this.source=b,this.predicate=wb(c,d,3),a.call(this)}return Xb(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new R(a,this.predicate,this))},b.prototype.internalFilter=function(a,c){var d=this;return new b(this.source,function(b,c,e){return d.predicate(b,c,e)&&a.call(this,b,c,e)},c)},b}(Oc);R.prototype.onNext=function(a){if(!this.isStopped){var b=p(this.predicate).call(this,a,this.i++,this.source);return b===$b?this.observer.onError(b.e):void(b&&this.observer.onNext(a))}},R.prototype.onError=function(a){this.isStopped||(this.isStopped=!0,this.observer.onError(a))},R.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.observer.onCompleted())},R.prototype.dispose=function(){this.isStopped=!0},R.prototype.fail=function(a){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(a),!0)},Hc.filter=Hc.where=function(a,b){return this instanceof sd?this.internalFilter(a,b):new sd(this,a,b)},Hc.transduce=function(a){function b(a){return{"@@transducer/init":function(){return a},"@@transducer/step":function(a,b){return a.onNext(b)},"@@transducer/result":function(a){return a.onCompleted()}}}var c=this;return new td(function(d){var e=a(b(d));return c.subscribe(function(a){try{e["@@transducer/step"](d,a)}catch(b){d.onError(b)}},function(a){d.onError(a)},function(){e["@@transducer/result"](d)})},c)};var td=Y.AnonymousObservable=function(a){function b(a){return a&&eb(a.dispose)?a:eb(a)?ec(a):fc}function c(a,c){var d=c[0],e=c[1],f=p(e)(d);return f!==$b||d.fail($b.e)?void d.setDisposable(b(f)):q($b.e)}function d(b,d){function e(a){var d=new ud(a),e=[d,b];return sc.scheduleRequired()?sc.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return Xb(d,a),d}(Nc),ud=function(a){function b(b){a.call(this),this.observer=b,this.m=new ic}Xb(b,a);var c=b.prototype;return c.next=function(a){var b=p(this.observer.onNext).call(this.observer,a);b===$b&&(this.dispose(),q(b.e))},c.error=function(a){var b=p(this.observer.onError).call(this.observer,a);this.dispose(),b===$b&&q(b.e)},c.completed=function(){var a=p(this.observer.onCompleted).call(this.observer);this.dispose(),a===$b&&q(a.e)},c.setDisposable=function(a){this.m.setDisposable(a)},c.getDisposable=function(){return this.m.getDisposable()},c.dispose=function(){a.prototype.dispose.call(this),this.m.dispose()},b}(Ic),vd=function(a,b){this.subject=a,this.observer=b};vd.prototype.dispose=function(){if(!this.subject.isDisposed&&null!==this.observer){var a=this.subject.observers.indexOf(this.observer);this.subject.observers.splice(a,1),this.observer=null}};var wd=Y.Subject=function(a){function c(a){return hc(this),this.isStopped?this.hasError?(a.onError(this.error),fc):(a.onCompleted(),fc):(this.observers.push(a),new vd(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return Xb(d,a),Yb(d.prototype,Fc.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(hc(this),!this.isStopped){this.isStopped=!0;for(var a=0,c=b(this.observers),d=c.length;d>a;a++)c[a].onCompleted();this.observers.length=0}},onError:function(a){if(hc(this),!this.isStopped){this.isStopped=!0,this.error=a,this.hasError=!0;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){if(hc(this),!this.isStopped)for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onNext(a)},dispose:function(){this.isDisposed=!0,this.observers=null}}),d.create=function(a,b){return new xd(a,b)},d}(Nc),xd=(Y.AsyncSubject=function(a){function c(a){return hc(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),fc):(this.observers.push(a),new vd(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return Xb(d,a),Yb(d.prototype,Fc,{hasObservers:function(){return hc(this),this.observers.length>0},onCompleted:function(){var a,c;if(hc(this),!this.isStopped){this.isStopped=!0;var d=b(this.observers),c=d.length;if(this.hasValue)for(a=0;c>a;a++){var e=d[a];e.onNext(this.value),e.onCompleted()}else for(a=0;c>a;a++)d[a].onCompleted();this.observers.length=0}},onError:function(a){if(hc(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=a;for(var c=0,d=b(this.observers),e=d.length;e>c;c++)d[c].onError(a);this.observers.length=0}},onNext:function(a){hc(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(Nc),Y.AnonymousSubject=function(a){function b(a){return this.observable.subscribe(a)}function c(c,d){this.observer=c,this.observable=d,a.call(this,b)}return Xb(c,a),Yb(c.prototype,Fc.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(Nc));"function"==typeof define&&"object"==typeof define.amd&&define.amd?(T.Rx=Y,define(function(){return Y})):U&&V?W?(V.exports=Y).Rx=Y:U.Rx=Y:T.Rx=Y;var yd=g()}).call(this);
4
4
  //# sourceMappingURL=rx.map
@@ -35,17 +35,16 @@
35
35
 
36
36
  // Defaults
37
37
  var Observer = Rx.Observer,
38
- Observable = Rx.Observable,
39
- Notification = Rx.Notification,
40
- VirtualTimeScheduler = Rx.VirtualTimeScheduler,
41
- Disposable = Rx.Disposable,
42
- disposableEmpty = Disposable.empty,
43
- disposableCreate = Disposable.create,
44
- CompositeDisposable = Rx.CompositeDisposable,
45
- SingleAssignmentDisposable = Rx.SingleAssignmentDisposable,
46
- slice = Array.prototype.slice,
47
- inherits = Rx.internals.inherits,
48
- defaultComparer = Rx.internals.isEqual;
38
+ Observable = Rx.Observable,
39
+ Notification = Rx.Notification,
40
+ VirtualTimeScheduler = Rx.VirtualTimeScheduler,
41
+ Disposable = Rx.Disposable,
42
+ disposableEmpty = Disposable.empty,
43
+ disposableCreate = Disposable.create,
44
+ CompositeDisposable = Rx.CompositeDisposable,
45
+ SingleAssignmentDisposable = Rx.SingleAssignmentDisposable,
46
+ inherits = Rx.internals.inherits,
47
+ defaultComparer = Rx.internals.isEqual;
49
48
 
50
49
  function OnNextPredicate(predicate) {
51
50
  this.predicate = predicate;
@@ -1 +1 @@
1
- {"version":3,"file":"rx.testing.min.js","sources":["rx.testing.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","OnNextPredicate","predicate","OnErrorPredicate","MockPromise","scheduler","messages","self","subscriptions","observers","i","len","length","message","notification","value","innerNotification","scheduleAbsoluteWithState","time","obs","slice","j","jLen","accept","disposableEmpty","Observer","Observable","Notification","VirtualTimeScheduler","Disposable","empty","disposableCreate","create","CompositeDisposable","inherits","SingleAssignmentDisposable","Array","prototype","internals","defaultComparer","isEqual","equals","other","kind","exception","ReactiveTest","created","subscribed","disposed","onNext","ticks","Recorded","createOnNext","onError","error","createOnError","onCompleted","createOnCompleted","subscribe","start","end","Subscription","comparer","toString","unsubscribe","Number","MAX_VALUE","MockDisposable","disposes","push","clock","dispose","MockObserver","__super__","MockObserverPrototype","then","onResolved","onRejected","newPromise","index","observer","x","retValue","idx","indexOf","splice","err","HotObservable","observable","ColdObservable","d","add","scheduleRelativeWithState","TestScheduler","baseComparer","y","state","dueTime","action","absolute","relative","toDateTimeOffset","Date","getTime","toRelative","timeSpan","startWithTiming","source","subscription","createObserver","startWithDispose","startWithCreate","createHotObservable","args","arguments","isArray","createColdObservable","createResolvedPromise","createRejectedPromise","reason"],"mappings":";CAEE,SAAUA,GACV,GAAIC,IACFC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGXC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF,UAAYD,GAAeA,EACvDV,QAAmBgB,UAAWA,SAE3CD,GAAeA,EAAWC,SAAWD,GAAcA,EAAWP,SAAWO,IAC3ER,EAAOQ,GAIa,kBAAXE,SAAyBA,OAAOC,IACzCD,QAAQ,iBAAkB,WAAY,SAAUE,EAAIR,GAElD,MADAJ,GAAKY,GAAKpB,EAAQQ,EAAMI,EAASQ,GAC1BZ,EAAKY,KAEa,gBAAXL,SAAuBA,QAAUA,OAAOH,UAAYD,EACpEI,OAAOH,QAAUZ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AAI6E,GAAcpG,KAAM8H,IAQjCpB,EAAcxD,UAAU+E,qBAAuB,WAC7C,GAA4BH,GAAxBtG,EAAMuG,UAAUtG,MACpB,IAAIwB,MAAM+E,QAAQD,UAAU,IAC1BD,EAAOC,UAAU,OACZ,CACLD,EAAO,GAAI7E,OAAMzB,EACjB,KAAK,GAAID,GAAI,EAAOC,EAAJD,EAASA,IAAOuG,EAAKvG,GAAKwG,UAAUxG,GAEtD,MAAO,IAAI+E,GAAetG,KAAM8H,IASlCpB,EAAcxD,UAAUgF,sBAAwB,SAAUnE,EAAOnC,GAC/D,MAAO,IAAIX,GAAYjB,MAAOU,EAAGgD,aAAaI,OAAOC,EAAOnC,GAAQlB,EAAGgD,aAAaW,YAAYN,MASlG2C,EAAcxD,UAAUiF,sBAAwB,SAAUpE,EAAOqE,GAC/D,MAAO,IAAInH,GAAYjB,MAAOU,EAAGgD,aAAaQ,QAAQH,EAAOqE,MAO/D1B,EAAcxD,UAAUwE,eAAiB,WACvC,MAAO,IAAIrC,GAAarF,OAGnB0G,GACNjE,GAEM/B"}
1
+ {"version":3,"file":"rx.testing.min.js","sources":["rx.testing.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","OnNextPredicate","predicate","OnErrorPredicate","MockPromise","scheduler","messages","self","subscriptions","observers","i","len","length","message","notification","value","innerNotification","scheduleAbsoluteWithState","time","obs","slice","j","jLen","accept","disposableEmpty","Observer","Observable","Notification","VirtualTimeScheduler","Disposable","empty","disposableCreate","create","CompositeDisposable","inherits","SingleAssignmentDisposable","internals","defaultComparer","isEqual","prototype","equals","other","kind","exception","ReactiveTest","created","subscribed","disposed","onNext","ticks","Recorded","createOnNext","onError","error","createOnError","onCompleted","createOnCompleted","subscribe","start","end","Subscription","comparer","toString","unsubscribe","Number","MAX_VALUE","MockDisposable","disposes","push","clock","dispose","MockObserver","__super__","MockObserverPrototype","then","onResolved","onRejected","newPromise","index","observer","x","retValue","idx","indexOf","splice","err","HotObservable","observable","ColdObservable","d","add","scheduleRelativeWithState","TestScheduler","baseComparer","y","state","dueTime","action","absolute","relative","toDateTimeOffset","Date","getTime","toRelative","timeSpan","startWithTiming","source","subscription","createObserver","startWithDispose","startWithCreate","createHotObservable","args","arguments","Array","isArray","createColdObservable","createResolvedPromise","createRejectedPromise","reason"],"mappings":";CAEE,SAAUA,GACV,GAAIC,IACFC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGXC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF,UAAYD,GAAeA,EACvDV,QAAmBgB,UAAWA,SAE3CD,GAAeA,EAAWC,SAAWD,GAAcA,EAAWP,SAAWO,IAC3ER,EAAOQ,GAIa,kBAAXE,SAAyBA,OAAOC,IACzCD,QAAQ,iBAAkB,WAAY,SAAUE,EAAIR,GAElD,MADAJ,GAAKY,GAAKpB,EAAQQ,EAAMI,EAASQ,GAC1BZ,EAAKY,KAEa,gBAAXL,SAAuBA,QAAUA,OAAOH,UAAYD,EACpEI,OAAOH,QAAUZ,EAAQQ,EAAMO,OAAOH,QAASS,QAAQ,SAEvDb,EAAKY,GAAKpB,EAAQQ,KAAUA,EAAKY,MAEnCE,KAAKZ,KAAM,SAAUF,EAAMe,EAAKH,EAAIb,GAetC,QAASiB,GAAgBC,GACrBf,KAAKe,UAAYA,EAUrB,QAASC,GAAiBD,GACxBf,KAAKe,UAAYA,EAuKjB,QAASE,GAAYC,EAAWC,GAC9B,GAAIC,GAAOpB,IACXA,MAAKkB,UAAYA,EACjBlB,KAAKmB,SAAWA,EAChBnB,KAAKqB,iBACLrB,KAAKsB,YACL,KAAK,GAAIC,GAAI,EAAGC,EAAMxB,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AAOlC,GAAQlB,EAAG+C,aAAaW,YAAYN,MASlG2C,EAAcrD,UAAU+E,sBAAwB,SAAUrE,EAAOsE,GAC/D,MAAO,IAAInH,GAAYjB,MAAOU,EAAG+C,aAAaQ,QAAQH,EAAOsE,MAO/D3B,EAAcrD,UAAUqE,eAAiB,WACvC,MAAO,IAAIrC,GAAapF,OAGnByG,GACNhE,GAEM/B"}
@@ -1,3 +1,3 @@
1
1
  /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
2
- (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx.virtualtime","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(a){this.predicate=a}function f(a){this.predicate=a}function g(a,b){var c=this;this.scheduler=a,this.messages=b,this.subscriptions=[],this.observers=[];for(var d=0,e=this.messages.length;e>d;d++){var f=this.messages[d],g=f.value;!function(b){a.scheduleAbsoluteWithState(null,f.time,function(){for(var a=c.observers.slice(0),d=0,e=a.length;e>d;d++)b.accept(a[d]);return m})}(g)}}var h=c.Observer,i=c.Observable,j=c.Notification,k=c.VirtualTimeScheduler,l=c.Disposable,m=l.empty,n=l.create,o=c.CompositeDisposable,p=(c.SingleAssignmentDisposable,Array.prototype.slice,c.internals.inherits),q=c.internals.isEqual;e.prototype.equals=function(a){return a===this?!0:null==a?!1:"N"!==a.kind?!1:this.predicate(a.value)},f.prototype.equals=function(a){return a===this?!0:null==a?!1:"E"!==a.kind?!1:this.predicate(a.exception)};var r=c.ReactiveTest={created:100,subscribed:200,disposed:1e3,onNext:function(a,b){return"function"==typeof b?new s(a,new e(b)):new s(a,j.createOnNext(b))},onError:function(a,b){return"function"==typeof b?new s(a,new f(b)):new s(a,j.createOnError(b))},onCompleted:function(a){return new s(a,j.createOnCompleted())},subscribe:function(a,b){return new t(a,b)}},s=c.Recorded=function(a,b,c){this.time=a,this.value=b,this.comparer=c||q};s.prototype.equals=function(a){return this.time===a.time&&this.comparer(this.value,a.value)},s.prototype.toString=function(){return this.value.toString()+"@"+this.time};var t=c.Subscription=function(a,b){this.subscribe=a,this.unsubscribe=b||Number.MAX_VALUE};t.prototype.equals=function(a){return this.subscribe===a.subscribe&&this.unsubscribe===a.unsubscribe},t.prototype.toString=function(){return"("+this.subscribe+", "+(this.unsubscribe===Number.MAX_VALUE?"Infinite":this.unsubscribe)+")"};var u=c.MockDisposable=function(a){this.scheduler=a,this.disposes=[],this.disposes.push(this.scheduler.clock)};u.prototype.dispose=function(){this.disposes.push(this.scheduler.clock)};var v=function(a){function b(b){a.call(this),this.scheduler=b,this.messages=[]}p(b,a);var c=b.prototype;return c.onNext=function(a){this.messages.push(new s(this.scheduler.clock,j.createOnNext(a)))},c.onError=function(a){this.messages.push(new s(this.scheduler.clock,j.createOnError(a)))},c.onCompleted=function(){this.messages.push(new s(this.scheduler.clock,j.createOnCompleted()))},b}(h);g.prototype.then=function(a,b){var e=this;this.subscriptions.push(new t(this.scheduler.clock));var f,h=this.subscriptions.length-1,i=c.Observer.create(function(b){var j=a(b);if(j&&"function"==typeof j.then)f=j;else{var k=e.scheduler.clock;f=new g(e.scheduler,[c.ReactiveTest.onNext(k,d),c.ReactiveTest.onCompleted(k)])}var l=e.observers.indexOf(i);e.observers.splice(l,1),e.subscriptions[h]=new t(e.subscriptions[h].subscribe,e.scheduler.clock)},function(a){b(a);var c=e.observers.indexOf(i);e.observers.splice(c,1),e.subscriptions[h]=new t(e.subscriptions[h].subscribe,e.scheduler.clock)});return this.observers.push(i),f||new g(this.scheduler,this.messages)};var w=function(a){function b(a){var b=this;this.observers.push(a),this.subscriptions.push(new t(this.scheduler.clock));var c=this.subscriptions.length-1;return n(function(){var d=b.observers.indexOf(a);b.observers.splice(d,1),b.subscriptions[c]=new t(b.subscriptions[c].subscribe,b.scheduler.clock)})}function c(c,d){a.call(this,b);var e,f,g=this;this.scheduler=c,this.messages=d,this.subscriptions=[],this.observers=[];for(var h=0,i=this.messages.length;i>h;h++)e=this.messages[h],f=e.value,function(a){c.scheduleAbsoluteWithState(null,e.time,function(){for(var b=g.observers.slice(0),c=0,d=b.length;d>c;c++)a.accept(b[c]);return m})}(f)}return p(c,a),c}(i),x=function(a){function b(a){var b,c,d=this;this.subscriptions.push(new t(this.scheduler.clock));for(var e=this.subscriptions.length-1,f=new o,g=0,h=this.messages.length;h>g;g++)b=this.messages[g],c=b.value,function(c){f.add(d.scheduler.scheduleRelativeWithState(null,b.time,function(){return c.accept(a),m}))}(c);return n(function(){d.subscriptions[e]=new t(d.subscriptions[e].subscribe,d.scheduler.clock),f.dispose()})}function c(c,d){a.call(this,b),this.scheduler=c,this.messages=d,this.subscriptions=[]}return p(c,a),c}(i);return c.TestScheduler=function(a){function b(a,b){return a>b?1:b>a?-1:0}function d(){a.call(this,0,b)}return p(d,a),d.prototype.scheduleAbsoluteWithState=function(b,c,d){return c<=this.clock&&(c=this.clock+1),a.prototype.scheduleAbsoluteWithState.call(this,b,c,d)},d.prototype.add=function(a,b){return a+b},d.prototype.toDateTimeOffset=function(a){return new Date(a).getTime()},d.prototype.toRelative=function(a){return a},d.prototype.startWithTiming=function(a,b,c,d){var e,f,g=this.createObserver();return this.scheduleAbsoluteWithState(null,b,function(){return e=a(),m}),this.scheduleAbsoluteWithState(null,c,function(){return f=e.subscribe(g),m}),this.scheduleAbsoluteWithState(null,d,function(){return f.dispose(),m}),this.start(),g},d.prototype.startWithDispose=function(a,b){return this.startWithTiming(a,r.created,r.subscribed,b)},d.prototype.startWithCreate=function(a){return this.startWithTiming(a,r.created,r.subscribed,r.disposed)},d.prototype.createHotObservable=function(){var a,b=arguments.length;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return new w(this,a)},d.prototype.createColdObservable=function(){var a,b=arguments.length;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return new x(this,a)},d.prototype.createResolvedPromise=function(a,b){return new g(this,[c.ReactiveTest.onNext(a,b),c.ReactiveTest.onCompleted(a)])},d.prototype.createRejectedPromise=function(a,b){return new g(this,[c.ReactiveTest.onError(a,b)])},d.prototype.createObserver=function(){return new v(this)},d}(k),c});
2
+ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx.virtualtime","exports"],function(b,d){return c.Rx=a(c,d,b),c.Rx}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(a){this.predicate=a}function f(a){this.predicate=a}function g(a,b){var c=this;this.scheduler=a,this.messages=b,this.subscriptions=[],this.observers=[];for(var d=0,e=this.messages.length;e>d;d++){var f=this.messages[d],g=f.value;!function(b){a.scheduleAbsoluteWithState(null,f.time,function(){for(var a=c.observers.slice(0),d=0,e=a.length;e>d;d++)b.accept(a[d]);return m})}(g)}}var h=c.Observer,i=c.Observable,j=c.Notification,k=c.VirtualTimeScheduler,l=c.Disposable,m=l.empty,n=l.create,o=c.CompositeDisposable,p=(c.SingleAssignmentDisposable,c.internals.inherits),q=c.internals.isEqual;e.prototype.equals=function(a){return a===this?!0:null==a?!1:"N"!==a.kind?!1:this.predicate(a.value)},f.prototype.equals=function(a){return a===this?!0:null==a?!1:"E"!==a.kind?!1:this.predicate(a.exception)};var r=c.ReactiveTest={created:100,subscribed:200,disposed:1e3,onNext:function(a,b){return"function"==typeof b?new s(a,new e(b)):new s(a,j.createOnNext(b))},onError:function(a,b){return"function"==typeof b?new s(a,new f(b)):new s(a,j.createOnError(b))},onCompleted:function(a){return new s(a,j.createOnCompleted())},subscribe:function(a,b){return new t(a,b)}},s=c.Recorded=function(a,b,c){this.time=a,this.value=b,this.comparer=c||q};s.prototype.equals=function(a){return this.time===a.time&&this.comparer(this.value,a.value)},s.prototype.toString=function(){return this.value.toString()+"@"+this.time};var t=c.Subscription=function(a,b){this.subscribe=a,this.unsubscribe=b||Number.MAX_VALUE};t.prototype.equals=function(a){return this.subscribe===a.subscribe&&this.unsubscribe===a.unsubscribe},t.prototype.toString=function(){return"("+this.subscribe+", "+(this.unsubscribe===Number.MAX_VALUE?"Infinite":this.unsubscribe)+")"};var u=c.MockDisposable=function(a){this.scheduler=a,this.disposes=[],this.disposes.push(this.scheduler.clock)};u.prototype.dispose=function(){this.disposes.push(this.scheduler.clock)};var v=function(a){function b(b){a.call(this),this.scheduler=b,this.messages=[]}p(b,a);var c=b.prototype;return c.onNext=function(a){this.messages.push(new s(this.scheduler.clock,j.createOnNext(a)))},c.onError=function(a){this.messages.push(new s(this.scheduler.clock,j.createOnError(a)))},c.onCompleted=function(){this.messages.push(new s(this.scheduler.clock,j.createOnCompleted()))},b}(h);g.prototype.then=function(a,b){var e=this;this.subscriptions.push(new t(this.scheduler.clock));var f,h=this.subscriptions.length-1,i=c.Observer.create(function(b){var j=a(b);if(j&&"function"==typeof j.then)f=j;else{var k=e.scheduler.clock;f=new g(e.scheduler,[c.ReactiveTest.onNext(k,d),c.ReactiveTest.onCompleted(k)])}var l=e.observers.indexOf(i);e.observers.splice(l,1),e.subscriptions[h]=new t(e.subscriptions[h].subscribe,e.scheduler.clock)},function(a){b(a);var c=e.observers.indexOf(i);e.observers.splice(c,1),e.subscriptions[h]=new t(e.subscriptions[h].subscribe,e.scheduler.clock)});return this.observers.push(i),f||new g(this.scheduler,this.messages)};var w=function(a){function b(a){var b=this;this.observers.push(a),this.subscriptions.push(new t(this.scheduler.clock));var c=this.subscriptions.length-1;return n(function(){var d=b.observers.indexOf(a);b.observers.splice(d,1),b.subscriptions[c]=new t(b.subscriptions[c].subscribe,b.scheduler.clock)})}function c(c,d){a.call(this,b);var e,f,g=this;this.scheduler=c,this.messages=d,this.subscriptions=[],this.observers=[];for(var h=0,i=this.messages.length;i>h;h++)e=this.messages[h],f=e.value,function(a){c.scheduleAbsoluteWithState(null,e.time,function(){for(var b=g.observers.slice(0),c=0,d=b.length;d>c;c++)a.accept(b[c]);return m})}(f)}return p(c,a),c}(i),x=function(a){function b(a){var b,c,d=this;this.subscriptions.push(new t(this.scheduler.clock));for(var e=this.subscriptions.length-1,f=new o,g=0,h=this.messages.length;h>g;g++)b=this.messages[g],c=b.value,function(c){f.add(d.scheduler.scheduleRelativeWithState(null,b.time,function(){return c.accept(a),m}))}(c);return n(function(){d.subscriptions[e]=new t(d.subscriptions[e].subscribe,d.scheduler.clock),f.dispose()})}function c(c,d){a.call(this,b),this.scheduler=c,this.messages=d,this.subscriptions=[]}return p(c,a),c}(i);return c.TestScheduler=function(a){function b(a,b){return a>b?1:b>a?-1:0}function d(){a.call(this,0,b)}return p(d,a),d.prototype.scheduleAbsoluteWithState=function(b,c,d){return c<=this.clock&&(c=this.clock+1),a.prototype.scheduleAbsoluteWithState.call(this,b,c,d)},d.prototype.add=function(a,b){return a+b},d.prototype.toDateTimeOffset=function(a){return new Date(a).getTime()},d.prototype.toRelative=function(a){return a},d.prototype.startWithTiming=function(a,b,c,d){var e,f,g=this.createObserver();return this.scheduleAbsoluteWithState(null,b,function(){return e=a(),m}),this.scheduleAbsoluteWithState(null,c,function(){return f=e.subscribe(g),m}),this.scheduleAbsoluteWithState(null,d,function(){return f.dispose(),m}),this.start(),g},d.prototype.startWithDispose=function(a,b){return this.startWithTiming(a,r.created,r.subscribed,b)},d.prototype.startWithCreate=function(a){return this.startWithTiming(a,r.created,r.subscribed,r.disposed)},d.prototype.createHotObservable=function(){var a,b=arguments.length;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return new w(this,a)},d.prototype.createColdObservable=function(){var a,b=arguments.length;if(Array.isArray(arguments[0]))a=arguments[0];else{a=new Array(b);for(var c=0;b>c;c++)a[c]=arguments[c]}return new x(this,a)},d.prototype.createResolvedPromise=function(a,b){return new g(this,[c.ReactiveTest.onNext(a,b),c.ReactiveTest.onCompleted(a)])},d.prototype.createRejectedPromise=function(a,b){return new g(this,[c.ReactiveTest.onError(a,b)])},d.prototype.createObserver=function(){return new v(this)},d}(k),c});
3
3
  //# sourceMappingURL=rx.testing.map
@@ -41,7 +41,7 @@
41
41
  observableNever = Observable.never,
42
42
  observableThrow = Observable.throwException,
43
43
  observableFromArray = Observable.fromArray,
44
- timeoutScheduler = Rx.Scheduler.timeout,
44
+ timeoutScheduler = Rx.Scheduler['default'],
45
45
  SingleAssignmentDisposable = Rx.SingleAssignmentDisposable,
46
46
  SerialDisposable = Rx.SerialDisposable,
47
47
  CompositeDisposable = Rx.CompositeDisposable,
@@ -51,9 +51,28 @@
51
51
  normalizeTime = Rx.Scheduler.normalize,
52
52
  helpers = Rx.helpers,
53
53
  isPromise = helpers.isPromise,
54
- isScheduler = helpers.isScheduler,
55
- observableFromPromise = Observable.fromPromise,
56
- deprecate = helpers.deprecate;
54
+ isFunction = helpers.isFunction,
55
+ isScheduler = Rx.Scheduler.isScheduler,
56
+ observableFromPromise = Observable.fromPromise;
57
+
58
+ var errorObj = {e: {}};
59
+ var tryCatchTarget;
60
+ function tryCatcher() {
61
+ try {
62
+ return tryCatchTarget.apply(this, arguments);
63
+ } catch (e) {
64
+ errorObj.e = e;
65
+ return errorObj;
66
+ }
67
+ }
68
+ function tryCatch(fn) {
69
+ if (!isFunction(fn)) { throw new TypeError('fn must be a function'); }
70
+ tryCatchTarget = fn;
71
+ return tryCatcher;
72
+ }
73
+ function thrower(e) {
74
+ throw e;
75
+ }
57
76
 
58
77
  function observableTimerDate(dueTime, scheduler) {
59
78
  return new AnonymousObservable(function (observer) {
@@ -486,9 +505,9 @@
486
505
  *
487
506
  * @example
488
507
  * 1 - res = source.timestamp(); // produces { value: x, timestamp: ts }
489
- * 2 - res = source.timestamp(Rx.Scheduler.timeout);
508
+ * 2 - res = source.timestamp(Rx.Scheduler.default);
490
509
  *
491
- * @param {Scheduler} [scheduler] Scheduler used to compute timestamps. If not specified, the timeout scheduler is used.
510
+ * @param {Scheduler} [scheduler] Scheduler used to compute timestamps. If not specified, the default scheduler is used.
492
511
  * @returns {Observable} An observable sequence with timestamp information on values.
493
512
  */
494
513
  observableProto.timestamp = function (scheduler) {
@@ -707,18 +726,29 @@
707
726
  };
708
727
 
709
728
  /**
710
- * Time shifts the observable sequence by delaying the subscription.
729
+ * Time shifts the observable sequence by delaying the subscription with the specified relative time duration, using the specified scheduler to run timers.
711
730
  *
712
731
  * @example
713
732
  * 1 - res = source.delaySubscription(5000); // 5s
714
- * 2 - res = source.delaySubscription(5000, Rx.Scheduler.timeout); // 5 seconds
733
+ * 2 - res = source.delaySubscription(5000, Rx.Scheduler.default); // 5 seconds
715
734
  *
716
- * @param {Number} dueTime Absolute or relative time to perform the subscription at.
735
+ * @param {Number} dueTime Relative or absolute time shift of the subscription.
717
736
  * @param {Scheduler} [scheduler] Scheduler to run the subscription delay timer on. If not specified, the timeout scheduler is used.
718
737
  * @returns {Observable} Time-shifted sequence.
719
738
  */
720
739
  observableProto.delaySubscription = function (dueTime, scheduler) {
721
- return this.delayWithSelector(observableTimer(dueTime, isScheduler(scheduler) ? scheduler : timeoutScheduler), observableEmpty);
740
+ var scheduleMethod = dueTime instanceof Date ? 'scheduleWithAbsolute' : 'scheduleWithRelative';
741
+ var source = this;
742
+ isScheduler(scheduler) || (scheduler = timeoutScheduler);
743
+ return new AnonymousObservable(function (o) {
744
+ var d = new SerialDisposable();
745
+
746
+ d.setDisposable(scheduler[scheduleMethod](dueTime, function() {
747
+ d.setDisposable(source.subscribe(o));
748
+ }));
749
+
750
+ return d;
751
+ }, this);
722
752
  };
723
753
 
724
754
  /**
@@ -733,47 +763,54 @@
733
763
  * @returns {Observable} Time-shifted sequence.
734
764
  */
735
765
  observableProto.delayWithSelector = function (subscriptionDelay, delayDurationSelector) {
736
- var source = this, subDelay, selector;
737
- if (typeof subscriptionDelay === 'function') {
738
- selector = subscriptionDelay;
739
- } else {
740
- subDelay = subscriptionDelay;
741
- selector = delayDurationSelector;
742
- }
743
- return new AnonymousObservable(function (observer) {
744
- var delays = new CompositeDisposable(), atEnd = false, done = function () {
745
- if (atEnd && delays.length === 0) { observer.onCompleted(); }
746
- }, subscription = new SerialDisposable(), start = function () {
747
- subscription.setDisposable(source.subscribe(function (x) {
748
- var delay;
749
- try {
750
- delay = selector(x);
751
- } catch (error) {
752
- observer.onError(error);
753
- return;
754
- }
755
- var d = new SingleAssignmentDisposable();
756
- delays.add(d);
757
- d.setDisposable(delay.subscribe(function () {
766
+ var source = this, subDelay, selector;
767
+ if (isFunction(subscriptionDelay)) {
768
+ selector = subscriptionDelay;
769
+ } else {
770
+ subDelay = subscriptionDelay;
771
+ selector = delayDurationSelector;
772
+ }
773
+ return new AnonymousObservable(function (observer) {
774
+ var delays = new CompositeDisposable(), atEnd = false, subscription = new SerialDisposable();
775
+
776
+ function start() {
777
+ subscription.setDisposable(source.subscribe(
778
+ function (x) {
779
+ var delay = tryCatch(selector)(x);
780
+ if (delay === errorObj) { return observer.onError(delay.e); }
781
+ var d = new SingleAssignmentDisposable();
782
+ delays.add(d);
783
+ d.setDisposable(delay.subscribe(
784
+ function () {
758
785
  observer.onNext(x);
759
786
  delays.remove(d);
760
787
  done();
761
- }, observer.onError.bind(observer), function () {
788
+ },
789
+ function (e) { observer.onError(e); },
790
+ function () {
762
791
  observer.onNext(x);
763
792
  delays.remove(d);
764
793
  done();
765
- }));
766
- }, observer.onError.bind(observer), function () {
794
+ }
795
+ ))
796
+ },
797
+ function (e) { observer.onError(e); },
798
+ function () {
767
799
  atEnd = true;
768
800
  subscription.dispose();
769
801
  done();
770
- }));
771
- };
802
+ }
803
+ ))
804
+ }
805
+
806
+ function done () {
807
+ atEnd && delays.length === 0 && observer.onCompleted();
808
+ }
772
809
 
773
810
  if (!subDelay) {
774
811
  start();
775
812
  } else {
776
- subscription.setDisposable(subDelay.subscribe(start, observer.onError.bind(observer), start));
813
+ subscription.setDisposable(subDelay.subscribe(start, function (e) { observer.onError(e); }, start));
777
814
  }
778
815
 
779
816
  return new CompositeDisposable(subscription, delays);
@@ -899,9 +936,12 @@
899
936
  }, source);
900
937
  };
901
938
 
902
- observableProto.throttleWithSelector = function () {
939
+ /**
940
+ * @deprecated use #debounceWithSelector instead.
941
+ */
942
+ observableProto.throttleWithSelector = function (durationSelector) {
903
943
  //deprecate('throttleWithSelector', 'debounceWithSelector');
904
- return this.debounceWithSelector.apply(this, arguments);
944
+ return this.debounceWithSelector(durationSelector);
905
945
  };
906
946
 
907
947
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"rx.time.min.js","sources":["rx.time.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","observableTimerDate","dueTime","scheduler","AnonymousObservable","observer","scheduleWithAbsolute","onNext","onCompleted","observableTimerDateAndPeriod","period","d","p","normalizeTime","scheduleRecursiveWithAbsoluteAndState","count","self","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","source","subscription","active","cancelable","SerialDisposable","exception","q","running","materialize","timestamp","subscribe","notification","shouldRun","value","kind","push","onError","SingleAssignmentDisposable","setDisposable","scheduleRecursiveWithRelative","e","recurseDueTime","result","shouldRecurse","length","shift","accept","Math","max","CompositeDisposable","observableDelayDate","sampleObservable","sampler","sampleSubscribe","hasValue","atEnd","newValue","bind","Observable","observableProto","prototype","defer","observableEmpty","empty","observableNever","never","observableThrow","throwException","timeoutScheduler","fromArray","Scheduler","timeout","RefCountDisposable","Subject","addRef","internals","normalize","helpers","isPromise","isScheduler","observableFromPromise","fromPromise","observableinterval","deprecate","interval","observableTimer","timer","periodOrScheduler","Date","getTime","delay","debounce","throttleWithTimeout","hasvalue","id","x","currentId","dispose","throttle","windowWithTime","timeSpan","timeShiftOrScheduler","timeShift","createTimer","m","isSpan","isShift","timerD","nextSpan","nextShift","newTotalTime","ts","totalTime","s","refCountDisposable","groupDisposable","add","i","len","windowWithTimeOrCount","windowId","n","newId","newWindow","bufferWithTime","apply","arguments","selectMany","toArray","bufferWithTimeOrCount","timeInterval","last","map","span","sample","throttleLatest","intervalOrSampler","other","Error","schedulerMethod","myId","original","switched","generateWithAbsoluteTime","initialState","condition","iterate","resultSelector","timeSelector","time","first","hasResult","state","scheduleRecursiveWithAbsolute","generateWithRelativeTime","delaySubscription","delayWithSelector","subscriptionDelay","delayDurationSelector","subDelay","selector","delays","done","start","error","remove","timeoutWithSelector","firstTimeout","timeoutdurationSelector","setTimer","timerWins","observerWins","res","debounceWithSelector","durationSelector","currentid","throttleWithSelector","skipLastWithTime","duration","o","takeLastWithTime","next","takeLastBufferWithTime","takeWithTime","skipWithTime","open","skipUntilWithTime","startTime","takeUntilWithTime","endTime","throttleFirst","windowDuration","RangeError","lastOnNext"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGbC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF,UAAYD,GAAeA,EACvDV,QAAmBgB,UAAWA,SAE3CD,GAAeA,EAAWC,SAAWD,GAAcA,E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AAiB,KAAM,IAAIc,YAAW,+CAC1C,IAAI5K,GAASrC,IACb,OAAO,IAAIiB,GAAoB,SAAUmL,GACvC,GAAIc,GAAa,CACjB,OAAO7K,GAAOU,UACZ,SAAUiE,GACR,GAAIlF,GAAMd,EAAUc,OACD,IAAfoL,GAAoBpL,EAAMoL,GAAcf,KAC1Ce,EAAapL,EACbsK,EAAEhL,OAAO4F,KAEX,SAAUvD,GAAK2I,EAAE/I,QAAQI,IAAO,WAAc2I,EAAE/K,iBAEnDgB,IAGI3B"}
1
+ {"version":3,"file":"rx.time.min.js","sources":["rx.time.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","tryCatcher","tryCatchTarget","apply","arguments","e","errorObj","tryCatch","fn","isFunction","TypeError","observableTimerDate","dueTime","scheduler","AnonymousObservable","observer","scheduleWithAbsolute","onNext","onCompleted","observableTimerDateAndPeriod","period","d","p","normalizeTime","scheduleRecursiveWithAbsoluteAndState","count","self","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","source","subscription","active","cancelable","SerialDisposable","exception","q","running","materialize","timestamp","subscribe","notification","shouldRun","value","kind","push","onError","SingleAssignmentDisposable","setDisposable","scheduleRecursiveWithRelative","recurseDueTime","result","shouldRecurse","length","shift","accept","Math","max","CompositeDisposable","observableDelayDate","sampleObservable","sampler","sampleSubscribe","hasValue","atEnd","newValue","bind","Observable","observableProto","prototype","defer","observableNever","empty","never","observableThrow","throwException","timeoutScheduler","fromArray","Scheduler","RefCountDisposable","Subject","addRef","internals","normalize","helpers","isPromise","isScheduler","observableFromPromise","fromPromise","observableinterval","interval","timer","periodOrScheduler","Date","getTime","delay","debounce","throttleWithTimeout","hasvalue","id","x","currentId","dispose","throttle","windowWithTime","timeSpan","timeShiftOrScheduler","timeShift","createTimer","m","isSpan","isShift","timerD","nextSpan","nextShift","newTotalTime","ts","totalTime","s","refCountDisposable","groupDisposable","add","i","len","windowWithTimeOrCount","windowId","n","newId","newWindow","bufferWithTime","selectMany","toArray","bufferWithTimeOrCount","timeInterval","last","map","span","sample","throttleLatest","intervalOrSampler","timeout","other","Error","schedulerMethod","myId","original","switched","generateWithAbsoluteTime","initialState","condition","iterate","resultSelector","timeSelector","time","first","hasResult","state","scheduleRecursiveWithAbsolute","generateWithRelativeTime","delaySubscription","scheduleMethod","o","delayWithSelector","subscriptionDelay","delayDurationSelector","subDelay","selector","start","delays","remove","done","timeoutWithSelector","firstTimeout","timeoutdurationSelector","setTimer","timerWins","observerWins","res","debounceWithSelector","durationSelector","currentid","throttleWithSelector","skipLastWithTime","duration","takeLastWithTime","next","takeLastBufferWithTime","takeWithTime","skipWithTime","open","skipUntilWithTime","startTime","takeUntilWithTime","endTime","throttleFirst","windowDuration","RangeError","lastOnNext"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGbC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF,UAAYD,GAAeA,EACvDV,QAAmBgB,UAAWA,SAE3CD,GAAeA,EAAWC,SAAWD,GAAcA,EAAWP,SAAWO,IACzER,EAAOQ,GAIW,kBAAXE,SAAyBA,OAAOC,IACvCD,QAAQ,MAAO,SAAUE,EAAIR,GACzB,MAAOZ,GAAQQ,EAAMI,EAASQ,KAET,gBAAXL,SAAuBA,QAAUA,OAAOH,UAAYD,EAClEI,OAAOH,QAAUZ,EAAQQ,EAAMO,OAAOH,QAASS,QAAQ,SAEvDb,EAAKY,GAAKpB,EAAQQ,KAAUA,EAAKY,MAEvCE,KAAKZ,KAAM,SAAUF,EA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ACTjD,EAAUsI,GAAiBkD,EAAS,WAAchC,EAAEnJ,gBACpDgB,EAAOU,UAAUyH,KAClBnI,IASLsC,EAAgB8H,cAAgB,SAAUC,EAAgB1L,GACxD6E,EAAY7E,KAAeA,EAAYmE,EACvC,IAAI2G,IAAYY,GAAkB,CAClC,IAAgB,GAAZZ,EAAiB,KAAM,IAAIa,YAAW,+CAC1C,IAAItK,GAAS/C,IACb,OAAO,IAAI2B,GAAoB,SAAUuJ,GACvC,GAAIoC,GAAa,CACjB,OAAOvK,GAAOU,UACZ,SAAU4D,GACR,GAAI7E,GAAMd,EAAUc,OACD,IAAf8K,GAAoB9K,EAAM8K,GAAcd,KAC1Cc,EAAa9K,EACb0I,EAAEpJ,OAAOuF,KAEX,SAAUnG,GAAKgK,EAAEnH,QAAQ7C,IAAO,WAAcgK,EAAEnJ,iBAEnDgB,IAGIrC"}
@@ -1,3 +1,3 @@
1
1
  /* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.*/
2
- (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx"],function(b,d){return a(c,d,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(a,b){return new n(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function f(a,b,c){return new n(function(d){var e=a,f=z(b);return c.scheduleRecursiveWithAbsoluteAndState(0,e,function(a,b){if(f>0){var g=c.now();e+=f,g>=e&&(e=g+f)}d.onNext(a),b(a+1,e)})})}function g(a,b){return new n(function(c){return b.scheduleWithRelative(z(a),function(){c.onNext(0),c.onCompleted()})})}function h(a,b,c){return a===b?new n(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):o(function(){return f(c.now()+a,b,c)})}function i(a,b,c){return new n(function(d){var e,f=!1,g=new u,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new t,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new v(e,g)},a)}function j(a,b,c){return o(function(){return i(a,b-c.now(),c)})}function k(a,b){return new n(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new v(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))},a)}var l=c.Observable,m=l.prototype,n=c.AnonymousObservable,o=l.defer,p=l.empty,q=l.never,r=l.throwException,s=(l.fromArray,c.Scheduler.timeout),t=c.SingleAssignmentDisposable,u=c.SerialDisposable,v=c.CompositeDisposable,w=c.RefCountDisposable,x=c.Subject,y=c.internals.addRef,z=c.Scheduler.normalize,A=c.helpers,B=A.isPromise,C=A.isScheduler,D=l.fromPromise,E=(A.deprecate,l.interval=function(a,b){return h(a,a,C(b)?b:s)}),F=l.timer=function(a,b,c){var i;return C(c)||(c=s),b!==d&&"number"==typeof b?i=b:C(b)&&(c=b),a instanceof Date&&i===d?e(a.getTime(),c):a instanceof Date&&i!==d?(i=b,f(a.getTime(),i,c)):i===d?g(a,c):h(a,i,c)};return m.delay=function(a,b){return C(b)||(b=s),a instanceof Date?j(this,a.getTime(),b):i(this,a,b)},m.debounce=m.throttleWithTimeout=function(a,b){C(b)||(b=s);var c=this;return new n(function(d){var e,f=new u,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new t;f.setDisposable(j),j.setDisposable(b.scheduleWithRelative(a,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new v(i,f)},this)},m.throttle=function(a,b){return this.debounce(a,b)},m.windowWithTime=function(a,b,c){var d,e=this;return null==b&&(d=a),C(c)||(c=s),"number"==typeof b?d=b:C(b)&&(d=a,c=b),new n(function(b){function f(){var a=new t,e=!1,g=!1;l.setDisposable(a),j===i?(e=!0,g=!0):i>j?e=!0:g=!0;var n=e?j:i,o=n-m;m=n,e&&(j+=d),g&&(i+=d),a.setDisposable(c.scheduleWithRelative(o,function(){if(g){var a=new x;k.push(a),b.onNext(y(a,h))}e&&k.shift().onCompleted(),f()}))}var g,h,i=d,j=a,k=[],l=new u,m=0;return g=new v(l),h=new w(g),k.push(new x),b.onNext(y(k[0],h)),f(),g.add(e.subscribe(function(a){for(var b=0,c=k.length;c>b;b++)k[b].onNext(a)},function(a){for(var c=0,d=k.length;d>c;c++)k[c].onError(a);b.onError(a)},function(){for(var a=0,c=k.length;c>a;a++)k[a].onCompleted();b.onCompleted()})),h},e)},m.windowWithTimeOrCount=function(a,b,c){var d=this;return C(c)||(c=s),new n(function(e){function f(b){var d=new t;g.setDisposable(d),d.setDisposable(c.scheduleWithRelative(a,function(){if(b===k){j=0;var a=++k;l.onCompleted(),l=new x,e.onNext(y(l,i)),f(a)}}))}var g=new u,h=new v(g),i=new w(h),j=0,k=0,l=new x;return e.onNext(y(l,i)),f(0),h.add(d.subscribe(function(a){var c=0,d=!1;l.onNext(a),++j===b&&(d=!0,j=0,c=++k,l.onCompleted(),l=new x,e.onNext(y(l,i))),d&&f(c)},function(a){l.onError(a),e.onError(a)},function(){l.onCompleted(),e.onCompleted()})),i},d)},m.bufferWithTime=function(){return this.windowWithTime.apply(this,arguments).selectMany(function(a){return a.toArray()})},m.bufferWithTimeOrCount=function(a,b,c){return this.windowWithTimeOrCount(a,b,c).selectMany(function(a){return a.toArray()})},m.timeInterval=function(a){var b=this;return C(a)||(a=s),o(function(){var c=a.now();return b.map(function(b){var d=a.now(),e=d-c;return c=d,{value:b,interval:e}})})},m.timestamp=function(a){return C(a)||(a=s),this.map(function(b){return{value:b,timestamp:a.now()}})},m.sample=m.throttleLatest=function(a,b){return C(b)||(b=s),"number"==typeof a?k(this,E(a,b)):k(this,a)},m.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=r(new Error(b||"Timeout"))),C(c)||(c=s);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new n(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(B(b)&&(b=D(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new t,j=new u,k=!1,l=new u;return j.setDisposable(i),g(),i.setDisposable(d.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new v(j,l)},d)},l.generateWithAbsoluteTime=function(a,b,c,d,e,f){return C(f)||(f=s),new n(function(g){var h,i,j=!0,k=!1,l=a;return f.scheduleRecursiveWithAbsolute(f.now(),function(a){k&&g.onNext(h);try{j?j=!1:l=c(l),k=b(l),k&&(h=d(l),i=e(l))}catch(f){return void g.onError(f)}k?a(i):g.onCompleted()})})},l.generateWithRelativeTime=function(a,b,c,d,e,f){return C(f)||(f=s),new n(function(g){var h,i,j=!0,k=!1,l=a;return f.scheduleRecursiveWithRelative(0,function(a){k&&g.onNext(h);try{j?j=!1:l=c(l),k=b(l),k&&(h=d(l),i=e(l))}catch(f){return void g.onError(f)}k?a(i):g.onCompleted()})})},m.delaySubscription=function(a,b){return this.delayWithSelector(F(a,C(b)?b:s),p)},m.delayWithSelector=function(a,b){var c,d,e=this;return"function"==typeof a?d=a:(c=a,d=b),new n(function(a){var b=new v,f=!1,g=function(){f&&0===b.length&&a.onCompleted()},h=new u,i=function(){h.setDisposable(e.subscribe(function(c){var e;try{e=d(c)}catch(f){return void a.onError(f)}var h=new t;b.add(h),h.setDisposable(e.subscribe(function(){a.onNext(c),b.remove(h),g()},a.onError.bind(a),function(){a.onNext(c),b.remove(h),g()}))},a.onError.bind(a),function(){f=!0,h.dispose(),g()}))};return c?h.setDisposable(c.subscribe(i,a.onError.bind(a),i)):i(),new v(h,b)},this)},m.timeoutWithSelector=function(a,b,c){1===arguments.length&&(b=a,a=q()),c||(c=r(new Error("Timeout")));var d=this;return new n(function(e){function f(a){function b(){return k===d}var d=k,f=new t;i.setDisposable(f),f.setDisposable(a.subscribe(function(){b()&&h.setDisposable(c.subscribe(e)),f.dispose()},function(a){b()&&e.onError(a)},function(){b()&&h.setDisposable(c.subscribe(e))}))}function g(){var a=!l;return a&&k++,a}var h=new u,i=new u,j=new t;h.setDisposable(j);var k=0,l=!1;return f(a),j.setDisposable(d.subscribe(function(a){if(g()){e.onNext(a);var c;try{c=b(a)}catch(d){return void e.onError(d)}f(B(c)?D(c):c)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new v(h,i)},d)},m.debounceWithSelector=function(a){var b=this;return new n(function(c){var d,e=!1,f=new u,g=0,h=b.subscribe(function(b){var h;try{h=a(b)}catch(i){return void c.onError(i)}B(h)&&(h=D(h)),e=!0,d=b,g++;var j=g,k=new t;f.setDisposable(k),k.setDisposable(h.subscribe(function(){e&&g===j&&c.onNext(d),e=!1,k.dispose()},c.onError.bind(c),function(){e&&g===j&&c.onNext(d),e=!1,k.dispose()}))},function(a){f.dispose(),c.onError(a),e=!1,g++},function(){f.dispose(),e&&c.onNext(d),c.onCompleted(),e=!1,g++});return new v(h,f)},b)},m.throttleWithSelector=function(){return this.debounceWithSelector.apply(this,arguments)},m.skipLastWithTime=function(a,b){C(b)||(b=s);var c=this;return new n(function(d){var e=[];return c.subscribe(function(c){var f=b.now();for(e.push({interval:f,value:c});e.length>0&&f-e[0].interval>=a;)d.onNext(e.shift().value)},function(a){d.onError(a)},function(){for(var c=b.now();e.length>0&&c-e[0].interval>=a;)d.onNext(e.shift().value);d.onCompleted()})},c)},m.takeLastWithTime=function(a,b){var c=this;return C(b)||(b=s),new n(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},function(a){d.onError(a)},function(){for(var c=b.now();e.length>0;){var f=e.shift();c-f.interval<=a&&d.onNext(f.value)}d.onCompleted()})},c)},m.takeLastBufferWithTime=function(a,b){var c=this;return C(b)||(b=s),new n(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},function(a){d.onError(a)},function(){for(var c=b.now(),f=[];e.length>0;){var g=e.shift();c-g.interval<=a&&f.push(g.value)}d.onNext(f),d.onCompleted()})},c)},m.takeWithTime=function(a,b){var c=this;return C(b)||(b=s),new n(function(d){return new v(b.scheduleWithRelative(a,function(){d.onCompleted()}),c.subscribe(d))},c)},m.skipWithTime=function(a,b){var c=this;return C(b)||(b=s),new n(function(d){var e=!1;return new v(b.scheduleWithRelative(a,function(){e=!0}),c.subscribe(function(a){e&&d.onNext(a)},d.onError.bind(d),d.onCompleted.bind(d)))},c)},m.skipUntilWithTime=function(a,b){C(b)||(b=s);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new n(function(e){var f=!1;return new v(b[d](a,function(){f=!0}),c.subscribe(function(a){f&&e.onNext(a)},function(a){e.onError(a)},function(){e.onCompleted()}))},c)},m.takeUntilWithTime=function(a,b){C(b)||(b=s);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new n(function(e){return new v(b[d](a,function(){e.onCompleted()}),c.subscribe(e))},c)},m.throttleFirst=function(a,b){C(b)||(b=s);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new n(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)},c});
2
+ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx"],function(b,d){return a(c,d,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c,d){function e(){try{return n.apply(this,arguments)}catch(a){return H.e=a,H}}function f(a){if(!E(a))throw new TypeError("fn must be a function");return n=a,e}function g(a,b){return new q(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function h(a,b,c){return new q(function(d){var e=a,f=B(b);return c.scheduleRecursiveWithAbsoluteAndState(0,e,function(a,b){if(f>0){var g=c.now();e+=f,g>=e&&(e=g+f)}d.onNext(a),b(a+1,e)})})}function i(a,b){return new q(function(c){return b.scheduleWithRelative(B(a),function(){c.onNext(0),c.onCompleted()})})}function j(a,b,c){return a===b?new q(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):r(function(){return h(c.now()+a,b,c)})}function k(a,b,c){return new q(function(d){var e,f=!1,g=new w,h=null,i=[],j=!1;return e=a.materialize().timestamp(c).subscribe(function(a){var e,k;"E"===a.value.kind?(i=[],i.push(a),h=a.value.exception,k=!j):(i.push({value:a.value,timestamp:a.timestamp+b}),k=!f,f=!0),k&&(null!==h?d.onError(h):(e=new v,g.setDisposable(e),e.setDisposable(c.scheduleRecursiveWithRelative(b,function(a){var b,e,g,k;if(null===h){j=!0;do g=null,i.length>0&&i[0].timestamp-c.now()<=0&&(g=i.shift().value),null!==g&&g.accept(d);while(null!==g);k=!1,e=0,i.length>0?(k=!0,e=Math.max(0,i[0].timestamp-c.now())):f=!1,b=h,j=!1,null!==b?d.onError(b):k&&a(e)}}))))}),new x(e,g)},a)}function l(a,b,c){return r(function(){return k(a,b-c.now(),c)})}function m(a,b){return new q(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new x(a.subscribe(function(a){g=!0,f=a},c.onError.bind(c),function(){e=!0}),b.subscribe(d,c.onError.bind(c),d))},a)}{var n,o=c.Observable,p=o.prototype,q=c.AnonymousObservable,r=o.defer,s=(o.empty,o.never),t=o.throwException,u=(o.fromArray,c.Scheduler["default"]),v=c.SingleAssignmentDisposable,w=c.SerialDisposable,x=c.CompositeDisposable,y=c.RefCountDisposable,z=c.Subject,A=c.internals.addRef,B=c.Scheduler.normalize,C=c.helpers,D=C.isPromise,E=C.isFunction,F=c.Scheduler.isScheduler,G=o.fromPromise,H={e:{}},I=o.interval=function(a,b){return j(a,a,F(b)?b:u)};o.timer=function(a,b,c){var e;return F(c)||(c=u),b!==d&&"number"==typeof b?e=b:F(b)&&(c=b),a instanceof Date&&e===d?g(a.getTime(),c):a instanceof Date&&e!==d?(e=b,h(a.getTime(),e,c)):e===d?i(a,c):j(a,e,c)}}return p.delay=function(a,b){return F(b)||(b=u),a instanceof Date?l(this,a.getTime(),b):k(this,a,b)},p.debounce=p.throttleWithTimeout=function(a,b){F(b)||(b=u);var c=this;return new q(function(d){var e,f=new w,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new v;f.setDisposable(j),j.setDisposable(b.scheduleWithRelative(a,function(){g&&h===i&&d.onNext(e),g=!1}))},function(a){f.dispose(),d.onError(a),g=!1,h++},function(){f.dispose(),g&&d.onNext(e),d.onCompleted(),g=!1,h++});return new x(i,f)},this)},p.throttle=function(a,b){return this.debounce(a,b)},p.windowWithTime=function(a,b,c){var d,e=this;return null==b&&(d=a),F(c)||(c=u),"number"==typeof b?d=b:F(b)&&(d=a,c=b),new q(function(b){function f(){var a=new v,e=!1,g=!1;l.setDisposable(a),j===i?(e=!0,g=!0):i>j?e=!0:g=!0;var n=e?j:i,o=n-m;m=n,e&&(j+=d),g&&(i+=d),a.setDisposable(c.scheduleWithRelative(o,function(){if(g){var a=new z;k.push(a),b.onNext(A(a,h))}e&&k.shift().onCompleted(),f()}))}var g,h,i=d,j=a,k=[],l=new w,m=0;return g=new x(l),h=new y(g),k.push(new z),b.onNext(A(k[0],h)),f(),g.add(e.subscribe(function(a){for(var b=0,c=k.length;c>b;b++)k[b].onNext(a)},function(a){for(var c=0,d=k.length;d>c;c++)k[c].onError(a);b.onError(a)},function(){for(var a=0,c=k.length;c>a;a++)k[a].onCompleted();b.onCompleted()})),h},e)},p.windowWithTimeOrCount=function(a,b,c){var d=this;return F(c)||(c=u),new q(function(e){function f(b){var d=new v;g.setDisposable(d),d.setDisposable(c.scheduleWithRelative(a,function(){if(b===k){j=0;var a=++k;l.onCompleted(),l=new z,e.onNext(A(l,i)),f(a)}}))}var g=new w,h=new x(g),i=new y(h),j=0,k=0,l=new z;return e.onNext(A(l,i)),f(0),h.add(d.subscribe(function(a){var c=0,d=!1;l.onNext(a),++j===b&&(d=!0,j=0,c=++k,l.onCompleted(),l=new z,e.onNext(A(l,i))),d&&f(c)},function(a){l.onError(a),e.onError(a)},function(){l.onCompleted(),e.onCompleted()})),i},d)},p.bufferWithTime=function(){return this.windowWithTime.apply(this,arguments).selectMany(function(a){return a.toArray()})},p.bufferWithTimeOrCount=function(a,b,c){return this.windowWithTimeOrCount(a,b,c).selectMany(function(a){return a.toArray()})},p.timeInterval=function(a){var b=this;return F(a)||(a=u),r(function(){var c=a.now();return b.map(function(b){var d=a.now(),e=d-c;return c=d,{value:b,interval:e}})})},p.timestamp=function(a){return F(a)||(a=u),this.map(function(b){return{value:b,timestamp:a.now()}})},p.sample=p.throttleLatest=function(a,b){return F(b)||(b=u),"number"==typeof a?m(this,I(a,b)):m(this,a)},p.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=t(new Error(b||"Timeout"))),F(c)||(c=u);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new q(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(D(b)&&(b=G(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new v,j=new w,k=!1,l=new w;return j.setDisposable(i),g(),i.setDisposable(d.subscribe(function(a){k||(h++,f.onNext(a),g())},function(a){k||(h++,f.onError(a))},function(){k||(h++,f.onCompleted())})),new x(j,l)},d)},o.generateWithAbsoluteTime=function(a,b,c,d,e,f){return F(f)||(f=u),new q(function(g){var h,i,j=!0,k=!1,l=a;return f.scheduleRecursiveWithAbsolute(f.now(),function(a){k&&g.onNext(h);try{j?j=!1:l=c(l),k=b(l),k&&(h=d(l),i=e(l))}catch(f){return void g.onError(f)}k?a(i):g.onCompleted()})})},o.generateWithRelativeTime=function(a,b,c,d,e,f){return F(f)||(f=u),new q(function(g){var h,i,j=!0,k=!1,l=a;return f.scheduleRecursiveWithRelative(0,function(a){k&&g.onNext(h);try{j?j=!1:l=c(l),k=b(l),k&&(h=d(l),i=e(l))}catch(f){return void g.onError(f)}k?a(i):g.onCompleted()})})},p.delaySubscription=function(a,b){var c=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative",d=this;return F(b)||(b=u),new q(function(e){var f=new w;return f.setDisposable(b[c](a,function(){f.setDisposable(d.subscribe(e))})),f},this)},p.delayWithSelector=function(a,b){var c,d,e=this;return E(a)?d=a:(c=a,d=b),new q(function(a){function b(){j.setDisposable(e.subscribe(function(b){var c=f(d)(b);if(c===H)return a.onError(c.e);var e=new v;h.add(e),e.setDisposable(c.subscribe(function(){a.onNext(b),h.remove(e),g()},function(b){a.onError(b)},function(){a.onNext(b),h.remove(e),g()}))},function(b){a.onError(b)},function(){i=!0,j.dispose(),g()}))}function g(){i&&0===h.length&&a.onCompleted()}var h=new x,i=!1,j=new w;return c?j.setDisposable(c.subscribe(b,function(b){a.onError(b)},b)):b(),new x(j,h)},this)},p.timeoutWithSelector=function(a,b,c){1===arguments.length&&(b=a,a=s()),c||(c=t(new Error("Timeout")));var d=this;return new q(function(e){function f(a){function b(){return k===d}var d=k,f=new v;i.setDisposable(f),f.setDisposable(a.subscribe(function(){b()&&h.setDisposable(c.subscribe(e)),f.dispose()},function(a){b()&&e.onError(a)},function(){b()&&h.setDisposable(c.subscribe(e))}))}function g(){var a=!l;return a&&k++,a}var h=new w,i=new w,j=new v;h.setDisposable(j);var k=0,l=!1;return f(a),j.setDisposable(d.subscribe(function(a){if(g()){e.onNext(a);var c;try{c=b(a)}catch(d){return void e.onError(d)}f(D(c)?G(c):c)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new x(h,i)},d)},p.debounceWithSelector=function(a){var b=this;return new q(function(c){var d,e=!1,f=new w,g=0,h=b.subscribe(function(b){var h;try{h=a(b)}catch(i){return void c.onError(i)}D(h)&&(h=G(h)),e=!0,d=b,g++;var j=g,k=new v;f.setDisposable(k),k.setDisposable(h.subscribe(function(){e&&g===j&&c.onNext(d),e=!1,k.dispose()},c.onError.bind(c),function(){e&&g===j&&c.onNext(d),e=!1,k.dispose()}))},function(a){f.dispose(),c.onError(a),e=!1,g++},function(){f.dispose(),e&&c.onNext(d),c.onCompleted(),e=!1,g++});return new x(h,f)},b)},p.throttleWithSelector=function(a){return this.debounceWithSelector(a)},p.skipLastWithTime=function(a,b){F(b)||(b=u);var c=this;return new q(function(d){var e=[];return c.subscribe(function(c){var f=b.now();for(e.push({interval:f,value:c});e.length>0&&f-e[0].interval>=a;)d.onNext(e.shift().value)},function(a){d.onError(a)},function(){for(var c=b.now();e.length>0&&c-e[0].interval>=a;)d.onNext(e.shift().value);d.onCompleted()})},c)},p.takeLastWithTime=function(a,b){var c=this;return F(b)||(b=u),new q(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},function(a){d.onError(a)},function(){for(var c=b.now();e.length>0;){var f=e.shift();c-f.interval<=a&&d.onNext(f.value)}d.onCompleted()})},c)},p.takeLastBufferWithTime=function(a,b){var c=this;return F(b)||(b=u),new q(function(d){var e=[];return c.subscribe(function(c){var d=b.now();for(e.push({interval:d,value:c});e.length>0&&d-e[0].interval>=a;)e.shift()},function(a){d.onError(a)},function(){for(var c=b.now(),f=[];e.length>0;){var g=e.shift();c-g.interval<=a&&f.push(g.value)}d.onNext(f),d.onCompleted()})},c)},p.takeWithTime=function(a,b){var c=this;return F(b)||(b=u),new q(function(d){return new x(b.scheduleWithRelative(a,function(){d.onCompleted()}),c.subscribe(d))},c)},p.skipWithTime=function(a,b){var c=this;return F(b)||(b=u),new q(function(d){var e=!1;return new x(b.scheduleWithRelative(a,function(){e=!0}),c.subscribe(function(a){e&&d.onNext(a)},d.onError.bind(d),d.onCompleted.bind(d)))},c)},p.skipUntilWithTime=function(a,b){F(b)||(b=u);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new q(function(e){var f=!1;return new x(b[d](a,function(){f=!0}),c.subscribe(function(a){f&&e.onNext(a)},function(a){e.onError(a)},function(){e.onCompleted()}))},c)},p.takeUntilWithTime=function(a,b){F(b)||(b=u);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new q(function(e){return new x(b[d](a,function(){e.onCompleted()}),c.subscribe(e))},c)},p.throttleFirst=function(a,b){F(b)||(b=u);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new q(function(a){var e=0;return d.subscribe(function(d){var f=b.now();(0===e||f-e>=c)&&(e=f,a.onNext(d))},function(b){a.onError(b)},function(){a.onCompleted()})},d)},c});
3
3
  //# sourceMappingURL=rx.time.map
@@ -39,15 +39,12 @@
39
39
  SchedulePeriodicRecursive = Rx.internals.SchedulePeriodicRecursive,
40
40
  disposableEmpty = Rx.Disposable.empty,
41
41
  inherits = Rx.internals.inherits,
42
- defaultSubComparer = Rx.helpers.defaultSubComparer;
42
+ defaultSubComparer = Rx.helpers.defaultSubComparer,
43
+ notImplemented = Rx.helpers.notImplemented;
43
44
 
44
45
  /** Provides a set of extension methods for virtual time scheduling. */
45
46
  Rx.VirtualTimeScheduler = (function (__super__) {
46
47
 
47
- function notImplemented() {
48
- throw new Error('Not implemented');
49
- }
50
-
51
48
  function localNow() {
52
49
  return this.toDateTimeOffset(this.clock);
53
50
  }
@@ -175,12 +172,8 @@
175
172
  */
176
173
  VirtualTimeSchedulerPrototype.advanceTo = function (time) {
177
174
  var dueToClock = this.comparer(this.clock, time);
178
- if (this.comparer(this.clock, time) > 0) {
179
- throw new Error(argumentOutOfRange);
180
- }
181
- if (dueToClock === 0) {
182
- return;
183
- }
175
+ if (this.comparer(this.clock, time) > 0) { throw new ArgumentOutOfRangeError(); }
176
+ if (dueToClock === 0) { return; }
184
177
  if (!this.isEnabled) {
185
178
  this.isEnabled = true;
186
179
  do {
@@ -203,7 +196,7 @@
203
196
  VirtualTimeSchedulerPrototype.advanceBy = function (time) {
204
197
  var dt = this.add(this.clock, time),
205
198
  dueToClock = this.comparer(this.clock, dt);
206
- if (dueToClock > 0) { throw new Error(argumentOutOfRange); }
199
+ if (dueToClock > 0) { throw new ArgumentOutOfRangeError(); }
207
200
  if (dueToClock === 0) { return; }
208
201
 
209
202
  this.advanceTo(dt);
@@ -215,7 +208,7 @@
215
208
  */
216
209
  VirtualTimeSchedulerPrototype.sleep = function (time) {
217
210
  var dt = this.add(this.clock, time);
218
- if (this.comparer(this.clock, dt) >= 0) { throw new Error(argumentOutOfRange); }
211
+ if (this.comparer(this.clock, dt) >= 0) { throw new ArgumentOutOfRangeError(); }
219
212
 
220
213
  this.clock = dt;
221
214
  };
@@ -1 +1 @@
1
- {"version":3,"file":"rx.virtualtime.min.js","sources":["rx.virtualtime.js"],"names":["factory","objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","Scheduler","PriorityQueue","internals","ScheduledItem","SchedulePeriodicRecursive","disposableEmpty","Disposable","empty","inherits","defaultSubComparer","helpers","VirtualTimeScheduler","__super__","notImplemented","Error","localNow","toDateTimeOffset","clock","scheduleNow","state","action","scheduleAbsoluteWithState","scheduleRelative","dueTime","scheduleRelativeWithState","toRelative","scheduleAbsolute","now","invokeAction","scheduler","initialClock","comparer","isEnabled","queue","VirtualTimeSchedulerPrototype","prototype","add","schedulePeriodicWithState","period","s","start","runAt","next","getNext","invoke","stop","advanceTo","time","dueToClock","argumentOutOfRange","advanceBy","dt","sleep","length","peek","isCancelled","dequeue","run","state1","self","remove","si","enqueue","disposable","HistoricalScheduler","cmp","HistoricalSchedulerProto","absolute","relative","Date","getTime","timeSpan"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGbC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF,UAAYD,GAAeA,EACvDV,QAAmBgB,UAAWA,SAE3CD,GAAeA,EAAWC,SAAWD,GAAcA,EAAWP,SAAWO,IACzER,EAAOQ,GAIW,kBAAXE,SAAyBA,OAAOC,IACvCD,QAAQ,MAAO,SAAUE,EAAIR,GACzB,MAAOZ,GAAQQ,EAAMI,EAASQ,KAET,gBAAXL,SAAuBA,QAAUA,OAAOH,UAAYD,EAClEI,OAAOH,QAAUZ,EAAQQ,EAAMO,OAAOH,QAASS,QAAQ,SAEvDb,EAAKY,GAAKpB,EAAQQ,KAAUA,EAAKY,MAEvCE,KAAKZ,KAAM,SAAUF,EAAMe,EAAKH,GAGjC,GAAII,GAAYJ,EAAGI,UACl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objectTypes","boolean","function","object","number","string","undefined","root","window","this","freeExports","exports","nodeType","freeModule","module","freeGlobal","global","define","amd","Rx","require","call","exp","Scheduler","PriorityQueue","internals","ScheduledItem","SchedulePeriodicRecursive","disposableEmpty","Disposable","empty","inherits","defaultSubComparer","helpers","notImplemented","VirtualTimeScheduler","__super__","localNow","toDateTimeOffset","clock","scheduleNow","state","action","scheduleAbsoluteWithState","scheduleRelative","dueTime","scheduleRelativeWithState","toRelative","scheduleAbsolute","now","invokeAction","scheduler","initialClock","comparer","isEnabled","queue","VirtualTimeSchedulerPrototype","prototype","add","schedulePeriodicWithState","period","s","start","runAt","next","getNext","invoke","stop","advanceTo","time","dueToClock","ArgumentOutOfRangeError","advanceBy","dt","sleep","length","peek","isCancelled","dequeue","run","state1","self","remove","si","enqueue","disposable","HistoricalScheduler","cmp","HistoricalSchedulerProto","absolute","relative","Date","getTime","timeSpan"],"mappings":";CAEE,SAAUA,GACR,GAAIC,IACAC,WAAW,EACXC,YAAY,EACZC,QAAU,EACVC,QAAU,EACVC,QAAU,EACVC,WAAa,GAGbC,EAAQP,QAAmBQ,UAAWA,QAAWC,KACjDC,EAAcV,QAAmBW,WAAYA,UAAYA,QAAQC,UAAYD,QAC7EE,EAAab,QAAmBc,UAAWA,SAAWA,OAAOF,UAAYE,OAEzEC,GADgBF,GAAcA,EAAWF,UAAYD,GAAeA,EACvDV,QAAmBgB,UAAWA,SAE3CD,GAAeA,EAAWC,SAAWD,GAAcA,EAAWP,SAAWO,IACzER,EAAOQ,GAIW,kBAAXE,SAAyBA,OAAOC,IACvCD,QAAQ,MAAO,SAAUE,EAAIR,GACzB,MAAOZ,GAAQQ,EAAMI,EAASQ,KAET,gBAAXL,SAAuBA,QAAUA,OAAOH,UAAYD,EAClEI,OAAOH,QAAUZ,EAAQQ,EAAMO,OAAOH,QAASS,QAAQ,SAEvDb,EAAKY,GAAKpB,EAAQQ,KAAUA,EAAKY,MAEvCE,KAAKZ,KAAM,SAAUF,EAAMe,EAA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reserved. See License.txt in the project root for license information.*/
2
- (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx"],function(b,d){return a(c,d,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){var d=c.Scheduler,e=c.internals.PriorityQueue,f=c.internals.ScheduledItem,g=c.internals.SchedulePeriodicRecursive,h=c.Disposable.empty,i=c.internals.inherits,j=c.helpers.defaultSubComparer;return c.VirtualTimeScheduler=function(a){function b(){throw new Error("Not implemented")}function c(){return this.toDateTimeOffset(this.clock)}function d(a,b){return this.scheduleAbsoluteWithState(a,this.clock,b)}function j(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b),c)}function k(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b-this.now()),c)}function l(a,b){return b(),h}function m(b,f){this.clock=b,this.comparer=f,this.isEnabled=!1,this.queue=new e(1024),a.call(this,c,d,j,k)}i(m,a);var n=m.prototype;return n.add=b,n.toDateTimeOffset=b,n.toRelative=b,n.schedulePeriodicWithState=function(a,b,c){var d=new g(this,a,b,c);return d.start()},n.scheduleRelativeWithState=function(a,b,c){var d=this.add(this.clock,b);return this.scheduleAbsoluteWithState(a,d,c)},n.scheduleRelative=function(a,b){return this.scheduleRelativeWithState(b,a,l)},n.start=function(){if(!this.isEnabled){this.isEnabled=!0;do{var a=this.getNext();null!==a?(this.comparer(a.dueTime,this.clock)>0&&(this.clock=a.dueTime),a.invoke()):this.isEnabled=!1}while(this.isEnabled)}},n.stop=function(){this.isEnabled=!1},n.advanceTo=function(a){var b=this.comparer(this.clock,a);if(this.comparer(this.clock,a)>0)throw new Error(argumentOutOfRange);if(0!==b&&!this.isEnabled){this.isEnabled=!0;do{var c=this.getNext();null!==c&&this.comparer(c.dueTime,a)<=0?(this.comparer(c.dueTime,this.clock)>0&&(this.clock=c.dueTime),c.invoke()):this.isEnabled=!1}while(this.isEnabled);this.clock=a}},n.advanceBy=function(a){var b=this.add(this.clock,a),c=this.comparer(this.clock,b);if(c>0)throw new Error(argumentOutOfRange);0!==c&&this.advanceTo(b)},n.sleep=function(a){var b=this.add(this.clock,a);if(this.comparer(this.clock,b)>=0)throw new Error(argumentOutOfRange);this.clock=b},n.getNext=function(){for(;this.queue.length>0;){var a=this.queue.peek();if(!a.isCancelled())return a;this.queue.dequeue()}return null},n.scheduleAbsolute=function(a,b){return this.scheduleAbsoluteWithState(b,a,l)},n.scheduleAbsoluteWithState=function(a,b,c){function d(a,b){return e.queue.remove(g),c(a,b)}var e=this,g=new f(this,a,d,b,this.comparer);return this.queue.enqueue(g),g.disposable},m}(d),c.HistoricalScheduler=function(a){function b(b,c){var d=null==b?0:b,e=c||j;a.call(this,d,e)}i(b,a);var c=b.prototype;return c.add=function(a,b){return a+b},c.toDateTimeOffset=function(a){return new Date(a).getTime()},c.toRelative=function(a){return a},b}(c.VirtualTimeScheduler),c});
2
+ (function(a){var b={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},c=b[typeof window]&&window||this,d=b[typeof exports]&&exports&&!exports.nodeType&&exports,e=b[typeof module]&&module&&!module.nodeType&&module,f=(e&&e.exports===d&&d,b[typeof global]&&global);!f||f.global!==f&&f.window!==f||(c=f),"function"==typeof define&&define.amd?define(["rx"],function(b,d){return a(c,d,b)}):"object"==typeof module&&module&&module.exports===d?module.exports=a(c,module.exports,require("./rx")):c.Rx=a(c,{},c.Rx)}).call(this,function(a,b,c){var d=c.Scheduler,e=c.internals.PriorityQueue,f=c.internals.ScheduledItem,g=c.internals.SchedulePeriodicRecursive,h=c.Disposable.empty,i=c.internals.inherits,j=c.helpers.defaultSubComparer,k=c.helpers.notImplemented;return c.VirtualTimeScheduler=function(a){function b(){return this.toDateTimeOffset(this.clock)}function c(a,b){return this.scheduleAbsoluteWithState(a,this.clock,b)}function d(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b),c)}function j(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b-this.now()),c)}function l(a,b){return b(),h}function m(f,g){this.clock=f,this.comparer=g,this.isEnabled=!1,this.queue=new e(1024),a.call(this,b,c,d,j)}i(m,a);var n=m.prototype;return n.add=k,n.toDateTimeOffset=k,n.toRelative=k,n.schedulePeriodicWithState=function(a,b,c){var d=new g(this,a,b,c);return d.start()},n.scheduleRelativeWithState=function(a,b,c){var d=this.add(this.clock,b);return this.scheduleAbsoluteWithState(a,d,c)},n.scheduleRelative=function(a,b){return this.scheduleRelativeWithState(b,a,l)},n.start=function(){if(!this.isEnabled){this.isEnabled=!0;do{var a=this.getNext();null!==a?(this.comparer(a.dueTime,this.clock)>0&&(this.clock=a.dueTime),a.invoke()):this.isEnabled=!1}while(this.isEnabled)}},n.stop=function(){this.isEnabled=!1},n.advanceTo=function(a){var b=this.comparer(this.clock,a);if(this.comparer(this.clock,a)>0)throw new ArgumentOutOfRangeError;if(0!==b&&!this.isEnabled){this.isEnabled=!0;do{var c=this.getNext();null!==c&&this.comparer(c.dueTime,a)<=0?(this.comparer(c.dueTime,this.clock)>0&&(this.clock=c.dueTime),c.invoke()):this.isEnabled=!1}while(this.isEnabled);this.clock=a}},n.advanceBy=function(a){var b=this.add(this.clock,a),c=this.comparer(this.clock,b);if(c>0)throw new ArgumentOutOfRangeError;0!==c&&this.advanceTo(b)},n.sleep=function(a){var b=this.add(this.clock,a);if(this.comparer(this.clock,b)>=0)throw new ArgumentOutOfRangeError;this.clock=b},n.getNext=function(){for(;this.queue.length>0;){var a=this.queue.peek();if(!a.isCancelled())return a;this.queue.dequeue()}return null},n.scheduleAbsolute=function(a,b){return this.scheduleAbsoluteWithState(b,a,l)},n.scheduleAbsoluteWithState=function(a,b,c){function d(a,b){return e.queue.remove(g),c(a,b)}var e=this,g=new f(this,a,d,b,this.comparer);return this.queue.enqueue(g),g.disposable},m}(d),c.HistoricalScheduler=function(a){function b(b,c){var d=null==b?0:b,e=c||j;a.call(this,d,e)}i(b,a);var c=b.prototype;return c.add=function(a,b){return a+b},c.toDateTimeOffset=function(a){return new Date(a).getTime()},c.toRelative=function(a){return a},b}(c.VirtualTimeScheduler),c});
3
3
  //# sourceMappingURL=rx.virtualtime.map
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rxjs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - jdeseno
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-26 00:00:00.000000000 Z
11
+ date: 2015-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -86,6 +86,9 @@ files:
86
86
  - vendor/assets/javascripts/rx.lite.compat.js
87
87
  - vendor/assets/javascripts/rx.lite.compat.map
88
88
  - vendor/assets/javascripts/rx.lite.compat.min.js
89
+ - vendor/assets/javascripts/rx.lite.extras.compat.js
90
+ - vendor/assets/javascripts/rx.lite.extras.compat.map
91
+ - vendor/assets/javascripts/rx.lite.extras.compat.min.js
89
92
  - vendor/assets/javascripts/rx.lite.extras.js
90
93
  - vendor/assets/javascripts/rx.lite.extras.map
91
94
  - vendor/assets/javascripts/rx.lite.extras.min.js
@@ -127,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
130
  version: 1.3.6
128
131
  requirements: []
129
132
  rubyforge_project: rxjs-rails
130
- rubygems_version: 2.4.5
133
+ rubygems_version: 2.2.2
131
134
  signing_key:
132
135
  specification_version: 4
133
136
  summary: Use RxJS with rails