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.all.min.js","sources":["rx.all.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","extremaBy","keySelector","hasValue","lastKey","list","comparison","ex1","firstOnly","sequenceContainsNoElements","elementAtOrDefault","hasDefault","defaultValue","argumentOutOfRange","singleOrDefaultAsync","seenValue","firstOrDefaultAsync","lastOrDefaultAsync","findValue","yieldIndex","shouldRun","toThunk","obj","ctx","isArray","objectToThunk","isGeneratorFunction","observableSpawn","isGenerator","isObservable","observableToThunk","promiseToThunk","fnString","done","run","fn","finished","results","pending","err","res","keys","timeoutScheduler","schedule","v","promise","then","name","next","throwString","handleError","createListener","element","addEventListener","disposableCreate","removeEventListener","createEventListener","el","eventName","disposables","CompositeDisposable","add","combineLatestSource","subject","values","hasValueAll","every","identity","apply","isDone","observableWindowWithOpenings","windowOpenings","windowClosingSelector","groupJoin","observableEmpty","_","win","observableWindowWithBoundaries","windowBoundaries","Subject","r","RefCountDisposable","addRef","observableWindowWithClosingSelector","createWindowClose","windowClose","m1","m","take","noop","enumerableWhile","condition","Enumerable","Enumerator","Pattern","patterns","Plan","expression","planCreateObserver","externalSubscriptions","entry","get","JoinObserver","ActivePlan","joinObserverArray","joinObservers","Map","joinObserver","observableTimerDate","dueTime","scheduleWithAbsolute","observableTimerDateAndPeriod","period","p","normalizeTime","scheduleRecursiveWithAbsoluteAndState","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","exception","q","running","materialize","timestamp","notification","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","atEnd","newValue","bind","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","isScheduler","notDefined","Scheduler","defaultNow","pluck","property","just","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","not","asArray","arguments","isFn","longStackSupport","Symbol","iterator","Set","doneEnumerator","supportNodeClass","func","argCount","arg","collection","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","__","addProperties","sources","idx","ln","prop","xs","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","args","CompositeDisposablePrototype","shouldDispose","splice","currentDisposables","Disposable","action","create","disposableEmpty","empty","BooleanDisposable","current","booleanDisposablePrototype","old","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","scheduleWithState","ScheduledItem","state","invoke","invokeCore","isCancelled","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","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","catchError","CatchScheduler","scheduleMethod","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","immediateScheduler","immediate","scheduleNow","notSupported","currentThreadScheduler","currentThread","runTrampoline","si","queue","currentScheduler","scheduleRequired","ensureTrampoline","clearMethod","localTimer","localSetTimeout","localClearTimeout","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","timeout","__super__","_wrap","_handler","_recursiveOriginal","_recursiveWrapper","_clone","_getRecursiveWrapper","wrapper","failed","Notification","observerOrOnNext","_acceptObservable","_accept","toObservable","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","_next","_iterator","concat","currentItem","currentValue","lastException","catchErrorWhen","notificationHandler","exceptions","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","cancel","Observable","_subscribe","oldOnError","forEach","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ObservableBase","fixSubscriber","subscriber","ado","subscribeCore","AutoDetachObserver","observeOn","subscribeOn","fromPromise","AsyncSubject","toPromise","promiseCtor","resolve","reject","ToArrayObservable","toArray","createWithDisposable","defer","observableFactory","observableThrow","FromObservable","iterable","mapper","sink","FromSink","loopRecursive","pow","charAt","from","mapFn","observableFromArray","fromArray","generate","initialState","iterate","hasResult","ofWithScheduler","ofArrayChanges","observe","unobserve","observerFn","changes","ofObjectChanges","observableNever","never","pairs","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","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","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","takeLastBuffer","Infinity","createWindow","refCountDisposable","selectConcat","selectorResult","i2","concatMapObserver","selectConcatObserver","onNextFunc","onErrorFunc","onCompletedFunc","defaultIfEmpty","found","retValue","distinct","hashSet","groupBy","elementSelector","groupByUntil","durationSelector","Dictionary","groupDisposable","getValues","fireNewMapEntry","writer","tryGetValue","GroupedObservable","durationGroup","duration","md","expire","MapObservable","internalMap","select","currentProp","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","RangeError","takeWhile","FilterObservable","internalFilter","shouldYield","aggregate","reduce","some","any","isEmpty","all","includes","searchElement","fromIndex","contains","sum","prev","curr","minBy","min","maxBy","average","cur","sequenceEqual","donel","doner","ql","qr","subscription1","equal","subscription2","elementAt","single","singleOrDefault","firstOrDefault","last","lastOrDefault","find","findIndex","toSet","toMap","spawn","isGenFun","exit","ret","gen","called","hasCallback","context","observableToAsync","toAsync","fromCallback","publishLast","refCount","fromNodeCallback","useNativeEvents","fromEvent","addListener","fromEventPattern","h","removeListener","on","off","publish","addHandler","removeHandler","innerHandler","startAsync","functionAsync","PausableObservable","conn","connection","pausable","pauser","connect","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","ControlledObservable","enableQueue","ControlledSubject","multicast","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","controlledDisposable","hasRequested","disposeCurrentRequest","_processRequest","controlled","StopAndWaitObservable","StopAndWaitObserver","__sub__","stopAndWaitObserverProto","stopAndWait","WindowedObservable","WindowedObserver","windowSize","received","windowedObserverPrototype","windowed","subjectOrSubjectSelector","connectable","ConnectableObservable","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","InnerSubscription","observers","hasError","hasObservers","os","createRemovableDisposable","so","_trim","MAX_VALUE","interval","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","isPrime","candidate","num1","sqrt","num2","getPrime","num","primes","stringHashFn","str","hash","character","charCodeAt","numberHashFn","c2","newEntry","hashCode","_initialize","freeCount","freeList","noSuchkey","duplicatekey","getHashCode","uniqueIdCounter","dictionaryProto","prime","buckets","entries","_insert","index3","index1","index2","_resize","numArray","entryArray","clear","_findEntry","containskey","leftDurationSelector","rightDurationSelector","leftDone","rightDone","leftId","rightId","leftMap","rightMap","buffer","windowOpeningsOrClosingSelector","pairwise","hasPrevious","partition","letBind","ifThen","thenSource","elseSourceOrScheduler","forIn","observableWhileDo","whileDo","doWhile","switchCase","defaultSourceOrScheduler","expand","forkJoin","allSources","hasResults","ix","lastLeft","lastRight","leftStopped","rightStopped","hasLeft","hasRight","manySelect","chain","ChainObservable","g","head","tail","_keys","_values","and","thenDo","activate","deactivate","activePlan","jlen","removeActivePlan","addActivePlan","match","hasValues","firstValues","isCompleted","activePlans","JoinObserverPrototype","when","plans","outObserver","observableinterval","observableTimer","timer","periodOrScheduler","getTime","delay","debounce","throttleWithTimeout","hasvalue","throttle","windowWithTime","timeShiftOrScheduler","timeShift","createTimer","isSpan","isShift","timerD","nextSpan","nextShift","newTotalTime","ts","totalTime","windowWithTimeOrCount","windowId","newId","newWindow","bufferWithTime","bufferWithTimeOrCount","timeInterval","span","sample","throttleLatest","intervalOrSampler","schedulerMethod","myId","original","switched","generateWithAbsoluteTime","timeSelector","generateWithRelativeTime","delaySubscription","delayWithSelector","subscriptionDelay","delayDurationSelector","subDelay","delays","timeoutWithSelector","firstTimeout","timeoutdurationSelector","setTimer","timerWins","observerWins","debounceWithSelector","currentid","throttleWithSelector","skipLastWithTime","takeLastWithTime","takeLastBufferWithTime","takeWithTime","skipWithTime","open","skipUntilWithTime","startTime","takeUntilWithTime","endTime","throttleFirst","windowDuration","lastOnNext","transduce","transducer","transformForObserver","init","step","obs","input","xform","exclusive","hasCurrent","exclusiveMap","VirtualTimeScheduler","localNow","toDateTimeOffset","clock","scheduleAbsoluteWithState","scheduleRelativeWithState","toRelative","initialClock","isEnabled","VirtualTimeSchedulerPrototype","runAt","getNext","stop","advanceTo","dueToClock","advanceBy","sleep","HistoricalScheduler","cmp","HistoricalSchedulerProto","absolute","relative","AutoDetachObserverPrototype","noError","underlyingObservable","mergedDisposable","AnonymousSubject","Pauser","define","amd"],"mappings":";CAEE,SAAUA,GAgEV,QAASC,GAAcC,GAAQ,GAAIA,EAAKC,WAAc,KAAM,IAAIC,OAAMC,IACtE,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,GAAOG,QAAQT,EAAMG,MAErB,IAAIO,GAAiBJ,EAAOK,KAAK,KAAON,GAAuB,KAC/DL,GAAMG,MAAQS,EAAkBF,IAItC,QAASE,GAAkBC,GAGzB,IAAK,GAFDC,GAAQD,EAAYE,MAAM,MAC1BC,KACKrB,EAAI,EAAGC,EAAMkB,EAAMjB,OAAYD,EAAJD,EAASA,IAAK,CAChD,GAAIsB,GAAOH,EAAMnB,EAEZuB,GAAgBD,IAAUE,EAAYF,KAASA,GAClDD,EAAalB,KAAKmB,GAGtB,MAAOD,GAAaL,KAAK,MAG3B,QAASO,GAAgBE,GACvB,GAAIC,GAAwBC,EAAyBF,EACrD,KAAKC,EACH,OAAO,CAET,IAAIE,GAAWF,EAAsB,GAAIG,EAAaH,EAAsB,EAE5E,OAAOE,KAAaE,IAClBD,GAAcE,IACAC,IAAdH,EAGJ,QAASL,GAAYC,GACnB,MAA4C,KAArCA,EAAUhB,QAAQ,gBACY,KAAnCgB,EAAUhB,QAAQ,aAGtB,QAASwB,KACP,GAAK1B,GAEL,IACE,KAAM,IAAIZ,OACV,MAAOuC,GACP,GAAIf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EAClBoH,KAAK4yB,UAAY,KACjB5yB,KAAK+M,UAAY,KACjB/M,KAAKhC,MAAQ,QAIV2iB,GACPhB,IAEEwgB,GAAmBnxB,GAAGmxB,iBAAoB,SAAUjlB,GAGtD,QAASpY,GAAUtC,GACjB,MAAOR,MAAKxG,WAAWsJ,UAAUtC,GAGnC,QAAS2/B,GAAiB3/B,EAAUhH,GAClCwG,KAAKQ,SAAWA,EAChBR,KAAKxG,WAAaA,EAClB0hB,EAAU/e,KAAK6D,KAAM8C,GAevB,MAxBA0O,IAAS2uB,EAAkBjlB,GAY3BvJ,GAAcwuB,EAAiBnjC,UAAW2gB,GAAS3gB,WACjDsG,YAAa,WACXtD,KAAKQ,SAAS8C,eAEhBJ,QAAS,SAAU3J,GACjByG,KAAKQ,SAAS0C,QAAQ3J,IAExByJ,OAAQ,SAAUhF,GAChBgC,KAAKQ,SAASwC,OAAOhF,MAIlBmiC,GACPxgB,GAKF3Q,IAAGoxB,OAAU,SAAUllB,GAGrB,QAASklB,KACPllB,EAAU/e,KAAK6D,MAajB,MAhBAwR,IAAS4uB,EAAQllB,GASjBklB,EAAOpjC,UAAU8yB,MAAQ,WAAc9vB,KAAKgD,QAAO,IAKnDo9B,EAAOpjC,UAAU+yB,OAAS,WAAc/vB,KAAKgD,QAAO,IAE7Co9B,GACPn2B,IAEmB,kBAAVo2B,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACzEl/B,GAAK4N,GAAKA,GAEVqxB,OAAO,WACL,MAAOrxB,OAEAR,IAAeG,GAEpBE,IACDF,GAAWF,QAAUO,IAAIA,GAAKA,GAE/BR,GAAYQ,GAAKA,GAInB5N,GAAK4N,GAAKA,EAIZ,IAAI9T,IAAcC,MAElBgB,KAAK6D"}
1
+ {"version":3,"file":"rx.all.min.js","sources":["rx.all.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","extremaBy","keySelector","hasValue","lastKey","list","comparison","ex1","firstOnly","EmptyError","elementAtOrDefault","hasDefault","defaultValue","ArgumentOutOfRangeError","singleOrDefaultAsync","seenValue","firstOrDefaultAsync","lastOrDefaultAsync","findValue","yieldIndex","shouldRun","toThunk","obj","ctx","isArray","objectToThunk","isGeneratorFunction","observableSpawn","isGenerator","isObservable","observableToThunk","promiseToThunk","fnString","done","run","finished","results","pending","err","res","keys","timeoutScheduler","schedule","v","promise","then","name","next","throwString","handleError","createListener","element","addEventListener","disposableCreate","removeEventListener","createEventListener","el","eventName","disposables","CompositeDisposable","add","combineLatestSource","subject","values","hasValueAll","every","identity","isDone","observableWindowWithOpenings","windowOpenings","windowClosingSelector","groupJoin","observableEmpty","_","win","observableWindowWithBoundaries","windowBoundaries","Subject","r","RefCountDisposable","addRef","observableWindowWithClosingSelector","createWindowClose","windowClose","m1","m","take","noop","enumerableWhile","condition","Enumerable","Enumerator","Pattern","patterns","Plan","expression","planCreateObserver","externalSubscriptions","entry","get","JoinObserver","ActivePlan","joinObserverArray","joinObservers","Map","joinObserver","observableTimerDate","dueTime","scheduleWithAbsolute","observableTimerDateAndPeriod","period","p","normalizeTime","scheduleRecursiveWithAbsoluteAndState","now","observableTimerTimeSpan","scheduleWithRelative","observableTimerTimeSpanAndPeriod","schedulePeriodicWithState","observableDefer","observableDelayTimeSpan","active","cancelable","exception","q","running","materialize","timestamp","notification","kind","scheduleRecursiveWithRelative","recurseDueTime","shouldRecurse","shift","accept","max","observableDelayDate","sampleObservable","sampler","sampleSubscribe","atEnd","newValue","bind","objectTypes","boolean","function","string","window","freeExports","exports","nodeType","freeModule","module","moduleExports","freeGlobal","global","Rx","internals","config","Promise","helpers","notDefined","defaultNow","pluck","property","just","Date","defaultComparer","y","isEqual","defaultSubComparer","defaultError","defaultKeySerializer","not","asArray","isFn","longStackSupport","message","ObjectDisposedError","NotSupportedError","NotImplementedError","notImplemented","notSupported","Symbol","iterator","Set","doneEnumerator","supportNodeClass","func","argCount","arg","collection","funcClass","supportsArgsClass","propertyIsEnumerable","document","toLocaleString","valueOf","test","inherits","child","__","addProperties","sources","idx","ln","prop","xs","getDisposable","compareTo","other","c","PriorityQueue","capacity","items","priorityProto","isHigherPriority","percolate","temp","heapify","peek","removeAt","dequeue","enqueue","remove","args","isDisposable","CompositeDisposablePrototype","shouldDispose","splice","currentDisposables","Disposable","action","create","disposableEmpty","empty","checkDisposed","current","old","InnerDisposable","isInnerDisposed","underlyingDisposable","isPrimaryDisposed","scheduleWithState","ScheduledItem","state","invoke","invokeCore","isCancelled","Scheduler","scheduleRelative","scheduleAbsolute","_schedule","_scheduleRelative","_scheduleAbsolute","invokeAction","schedulerProto","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","catchError","CatchScheduler","scheduleMethod","clearMethod","SchedulePeriodicRecursive","tick","command","recurse","_period","_state","_cancel","_scheduler","start","immediateScheduler","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","attachEvent","currentId","MessageChannel","channel","port1","port2","createElement","scriptElement","onreadystatechange","parentNode","removeChild","documentElement","appendChild","timeout","__super__","_wrap","_handler","_recursiveOriginal","_recursiveWrapper","_clone","_getRecursiveWrapper","wrapper","failed","Notification","acceptObservable","_accept","_acceptObservable","observerOrOnNext","toObservable","notificationCreateOnNext","createOnNext","notificationCreateOnError","createOnError","notificationCreateOnCompleted","createOnCompleted","_next","_iterator","concat","currentItem","currentValue","lastException","catchErrorWhen","notificationHandler","exceptions","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","ScheduledObserver","isAcquired","hasFaulted","ensureActive","isOwner","work","cancel","Observable","_subscribe","oldOnError","forEach","subscribeOnNext","subscribeOnError","subscribeOnCompleted","ObservableBase","fixSubscriber","subscriber","ado","sub","subscribeCore","AutoDetachObserver","observeOn","subscribeOn","fromPromise","AsyncSubject","toPromise","promiseCtor","resolve","reject","ToArrayObservable","toArray","createWithDisposable","defer","observableFactory","observableThrow","EmptyObservable","EmptySink","sink","FromObservable","iterable","mapper","FromSink","loopRecursive","pow","charAt","from","mapFn","observableFromArray","fromArray","generate","initialState","iterate","hasResult","ofWithScheduler","ofArrayChanges","observe","unobserve","observerFn","changes","ofObjectChanges","NeverObservable","observableNever","never","PairsObservable","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","filter","j","subscriptions","sad","observableConcat","concatObservable","merge","MergeObservable","maxConcurrent","g","MergeObserver","activeCount","InnerObserver","handleSubscribe","innerSource","maxConcurrentOrOther","observableMerge","MergeAllObservable","MergeAllObserver","mergeObservable","CompositeError","errors","innerErrors","mergeDelayError","setCompletion","innerSubscription","onErrorResumeNext","pos","skipUntil","isOpen","switchLatest","hasLatest","latest","takeUntil","withLatestFrom","allValues","zip","queuedValues","queues","asObservable","bufferWithCount","skip","windowWithCount","selectMany","where","dematerialize","distinctUntilChanged","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","takeLastBuffer","Infinity","createWindow","refCountDisposable","selectConcat","selectorResult","i2","concatMapObserver","selectConcatObserver","onNextFunc","onErrorFunc","onCompletedFunc","defaultIfEmpty","found","retValue","distinct","hashSet","groupBy","elementSelector","groupByUntil","durationSelector","Dictionary","groupDisposable","getValues","fireNewMapEntry","writer","tryGetValue","GroupedObservable","durationGroup","duration","md","expire","MapObservable","internalMap","select","currentProp","flatMapObserver","selectManyObserver","selectSwitch","flatMapLatest","switchMap","remaining","skipWhile","takeWhile","FilterObservable","internalFilter","shouldYield","aggregate","reduce","some","any","isEmpty","all","includes","searchElement","fromIndex","contains","sum","prev","curr","minBy","min","maxBy","average","cur","sequenceEqual","donel","doner","ql","qr","subscription1","equal","subscription2","elementAt","single","singleOrDefault","firstOrDefault","last","lastOrDefault","find","findIndex","toSet","toMap","spawn","isGenFun","exit","ret","gen","called","hasCallback","context","observableToAsync","toAsync","fromCallback","publishLast","refCount","fromNodeCallback","useNativeEvents","fromEvent","addListener","fromEventPattern","h","removeListener","on","off","publish","addHandler","removeHandler","innerHandler","startAsync","functionAsync","PausableObservable","conn","connection","pausable","pauser","connect","controller","pause","resume","PausableBufferedObservable","previousShouldFire","shouldFire","pausableBuffered","ControlledObservable","enableQueue","ControlledSubject","multicast","request","numberOfItems","requestedCount","requestedDisposable","hasFailed","hasCompleted","hasRequested","disposeCurrentRequest","_processRequest","controlled","StopAndWaitObservable","StopAndWaitObserver","__sub__","stopAndWaitObserverProto","stopAndWait","WindowedObservable","WindowedObserver","windowSize","received","windowedObserverPrototype","windowed","pipe","dest","onDrain","write","emit","_isStdio","end","subjectOrSubjectSelector","connectable","ConnectableObservable","share","publishValue","initialValueOrSelector","initialValue","BehaviorSubject","shareValue","replay","bufferSize","ReplaySubject","shareReplay","InnerSubscription","observers","hasError","getValue","hasObservers","os","createRemovableDisposable","so","_trim","interval","hasSubscription","sourceObservable","connectableSubscription","shouldConnect","isPrime","candidate","num1","sqrt","num2","getPrime","num","primes","stringHashFn","str","hash","character","charCodeAt","numberHashFn","c2","newEntry","hashCode","_initialize","freeCount","freeList","noSuchkey","duplicatekey","getHashCode","uniqueIdCounter","dictionaryProto","prime","buckets","entries","_insert","index3","index1","index2","_resize","numArray","entryArray","clear","_findEntry","containskey","leftDurationSelector","rightDurationSelector","leftDone","rightDone","leftId","rightId","leftMap","rightMap","buffer","windowOpeningsOrClosingSelector","pairwise","hasPrevious","partition","letBind","ifThen","thenSource","elseSourceOrScheduler","forIn","observableWhileDo","whileDo","doWhile","switchCase","defaultSourceOrScheduler","expand","forkJoin","allSources","hasResults","ix","lastLeft","lastRight","leftStopped","rightStopped","hasLeft","hasRight","manySelect","chain","ChainObservable","head","tail","_keys","_values","and","thenDo","activate","deactivate","activePlan","jlen","removeActivePlan","addActivePlan","match","hasValues","firstValues","isCompleted","activePlans","JoinObserverPrototype","when","plans","outObserver","observableinterval","timer","periodOrScheduler","getTime","delay","debounce","throttleWithTimeout","hasvalue","throttle","windowWithTime","timeShiftOrScheduler","timeShift","createTimer","isSpan","isShift","timerD","nextSpan","nextShift","newTotalTime","ts","totalTime","windowWithTimeOrCount","windowId","newId","newWindow","bufferWithTime","bufferWithTimeOrCount","timeInterval","span","sample","throttleLatest","intervalOrSampler","schedulerMethod","myId","original","switched","generateWithAbsoluteTime","timeSelector","generateWithRelativeTime","delaySubscription","delayWithSelector","subscriptionDelay","delayDurationSelector","subDelay","delays","timeoutWithSelector","firstTimeout","timeoutdurationSelector","setTimer","timerWins","observerWins","debounceWithSelector","currentid","throttleWithSelector","skipLastWithTime","takeLastWithTime","takeLastBufferWithTime","takeWithTime","skipWithTime","open","skipUntilWithTime","startTime","takeUntilWithTime","endTime","throttleFirst","windowDuration","RangeError","lastOnNext","transduce","transducer","transformForObserver","@@transducer/init","@@transducer/step","obs","input","@@transducer/result","xform","exclusive","hasCurrent","exclusiveMap","VirtualTimeScheduler","localNow","toDateTimeOffset","clock","scheduleAbsoluteWithState","scheduleRelativeWithState","toRelative","initialClock","isEnabled","VirtualTimeSchedulerPrototype","runAt","getNext","stop","advanceTo","dueToClock","advanceBy","sleep","HistoricalScheduler","cmp","HistoricalSchedulerProto","absolute","relative","AutoDetachObserverPrototype","underlyingObservable","mergedDisposable","AnonymousSubject","Pauser","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,GAAOG,QAAQT,EAAMG,MAErB,IAAIO,GAAiBJ,EAAOK,KAAK,KAAON,GAAuB,KAC/DL,GAAMG,MAAQS,EAAkBF,IAItC,QAASE,GAAkBC,GAGzB,IAAK,GAFDC,GAAQD,EAAYE,MAAM,MAC1BC,KACKrB,EAAI,EAAGC,EAAMkB,EAAMjB,OAAYD,EAAJD,EAASA,IAAK,CAChD,GAAIsB,GAAOH,EAAMnB,EAEZuB,GAAgBD,IAAUE,EAAYF,KAASA,GAClDD,EAAalB,KAAKmB,GAGtB,MAAOD,GAAaL,KAAK,MAG3B,QAASO,GAAgBE,GACvB,GAAIC,GAAwBC,EAAyBF,EACrD,KAAKC,EACH,OAAO,CAET,IAAIE,GAAWF,EAAsB,GAAIG,EAAaH,EAAsB,EAE5E,OAAOE,KAAaE,IAClBD,GAAcE,IACAC,IAAdH,EAGJ,QAASL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AKkB,SAASiD,eAEhBJ,QAAS,SAAUzK,GACjB0G,KAAKkB,SAAS6C,QAAQzK,IAExBuK,OAAQ,SAAU7F,GAChBgC,KAAKkB,SAAS2C,OAAO7F,MAIlBwkC,GACPliB,GAKF3Q,IAAG8yB,OAAU,SAAU3mB,GAGrB,QAAS2mB,KACP3mB,EAAU3f,KAAK6D,MAajB,MAhBAsS,IAASmwB,EAAQ3mB,GASjB2mB,EAAOzlC,UAAU80B,MAAQ,WAAc9xB,KAAK6D,QAAO,IAKnD4+B,EAAOzlC,UAAU+0B,OAAS,WAAc/xB,KAAK6D,QAAO,IAE7C4+B,GACP73B,IAEmB,kBAAV83B,SAA6C,gBAAdA,QAAOC,KAAmBD,OAAOC,KACzE7gC,GAAK6N,GAAKA,GAEV+yB,OAAO,WACL,MAAO/yB,OAEAR,IAAeG,GAEpBE,IACDF,GAAWF,QAAUO,IAAIA,GAAKA,GAE/BR,GAAYQ,GAAKA,GAInB7N,GAAK6N,GAAKA,EAIZ,IAAI1U,IAAcC,MAElBiB,KAAK6D"}
@@ -1,6 +1,6 @@
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(Nb)}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(Ob&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(Sb)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var f=c.join("\n"+Sb+"\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===Qb&&d>=Rb&&ie>=d}function g(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function h(){if(Ob)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 Qb=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(!sc(a))return b;rc.nonEnumArgs&&a.length&&tc(a)&&(a=vc.call(a));var c=rc.enumPrototypes&&"function"==typeof a,d=rc.enumErrorProps&&(a===mc||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(rc.nonEnumShadows&&a!==nc){var f=a.constructor,g=-1,h=$b;if(a===(f&&f.prototype))var i=a===oc?ic:a===mc?dc:jc.call(a),j=qc[i];for(;++g<h;)e=Zb[g],j&&j[e]||!kc.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=jc.call(a),h=jc.call(b);if(g==_b&&(g=gc),h==_b&&(h=gc),g!=h)return!1;switch(g){case bc:case cc:return+a==+b;case fc:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case hc:case ic:return a==String(b)}var i=g==ac;if(!i){if(g!=gc||!rc.nodeClass&&(m(a)||m(b)))return!1;var j=!rc.argsObject&&tc(a)?Object:a.constructor,k=!rc.argsObject&&tc(b)?Object:b.constructor;if(!(j==k||kc.call(a,"constructor")&&kc.call(b,"constructor")||Kb(j)&&j instanceof j&&Kb(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 kc.call(f,e)?(p++,q=kc.call(a,e)&&n(a[e],b,c,d)):void 0}),q&&l(a,function(a,b,c){return kc.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&&vb.isFinite(a)}function A(b){var c,d=b[Tb];if(!d&&"string"==typeof b)return c=new v(b),c[Tb]();if(!d&&b.length!==a)return c=new x(b),c[Tb]();if(!d)throw new TypeError("Object is not iterable");return b[Tb]()}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>sd?sd:b):b}function D(a,b){this.observer=a,this.parent=b}function E(a,b){return new ud(b,a)}function F(a,b){return new ce(function(c){var d=new Gc,e=new Hc;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)}Ib(d)&&(d=md(d));var g=new Gc;e.setDisposable(g),g.setDisposable(d.subscribe(c))},function(a){c.onCompleted(a)})),e},a)}function G(a,b){var c=this;return new ce(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=Yb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return Ib(e)&&(e=md(e)),(Wb(e)||Vb(e))&&(e=td(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=Yb(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return Ib(e)&&(e=md(e)),(Wb(e)||Vb(e))&&(e=td(e)),e}).mergeAll()}function O(a,b,c){this.observer=a,this.predicate=b,this.source=c,this.i=0,this.isStopped=!1}function P(a,b,c){return new ce(function(d){var e=!1,f=null,g=[];return a.subscribe(function(a){var h,i;try{i=b(a)}catch(j){return void d.onError(j)}if(h=0,e)try{h=c(i,f)}catch(k){return void d.onError(k)}else e=!0,f=i;h>0&&(f=i,g=[]),h>=0&&g.push(a)},function(a){d.onError(a)},function(){d.onNext(g),d.onCompleted()})},a)}function Q(a){if(0===a.length)throw new Error(Lb);return a[0]}function R(a,b,c,d){if(0>b)throw new Error(Mb);return new ce(function(e){var f=b;return a.subscribe(function(a){0===f--&&(e.onNext(a),e.onCompleted())},function(a){e.onError(a)},function(){c?(e.onNext(d),e.onCompleted()):e.onError(new Error(Mb))})},a)}function S(a,b,c){return new ce(function(d){var e=c,f=!1;return a.subscribe(function(a){f?d.onError(new Error("Sequence contains more than one element")):(e=a,f=!0)},function(a){d.onError(a)},function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(Lb))})},a)}function T(a,b,c){return new ce(function(d){return a.subscribe(function(a){d.onNext(a),d.onCompleted()},function(a){d.onError(a)},function(){b?(d.onNext(c),d.onCompleted()):d.onError(new Error(Lb))})},a)}function U(a,b,c){return new ce(function(d){var e=c,f=!1;return a.subscribe(function(a){e=a,f=!0},function(a){d.onError(a)},function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Error(Lb))})},a)}function V(b,c,d,e){var f=Yb(c,d,3);return new ce(function(c){var d=0;return b.subscribe(function(a){var g;try{g=f(a,d,b)}catch(h){return void c.onError(h)}g?(c.onNext(e?d:a),c.onCompleted()):d++},function(a){c.onError(a)},function(){c.onNext(e?-1:a),c.onCompleted()})},b)}function W(a,b){return Array.isArray(a)?X.call(b,a):_(a)?Kd(a.call(b)):ab(a)?Kd(a):$(a)?Y(a):Ib(a)?Z(a):typeof a===Id?a:sc(a)||Array.isArray(a)?X.call(b,a):a}function X(a){var b=this;return function(c){function d(a,d){if(!e)try{if(a=W(a,b),typeof a!==Id)return h[d]=a,--g||c(null,h);a.call(b,function(a,b){if(!e){if(a)return e=!0,c(a);h[d]=b,--g||c(null,h)}})}catch(f){e=!0,c(f)}}var e,f=Object.keys(a),g=f.length,h=new a.constructor;if(!g)return void Uc.schedule(function(){c(null,h)});for(var i=0,j=f.length;j>i;i++)d(a[f[i]],f[i])}}function Y(a){return function(b){var c,d=!1;a.subscribe(function(a){c=a,d=!0},b,function(){d&&b(null,c)})}}function Z(a){return function(b){a.then(function(a){b(null,a)},b)}}function $(a){return a&&typeof a.subscribe===Id}function _(a){return a&&a.constructor&&"GeneratorFunction"===a.constructor.name}function ab(a){return a&&typeof a.next===Id&&typeof a[Jd]===Id}function bb(a){a&&Uc.schedule(function(){throw a})}function cb(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),Ec(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function db(a,b,c){var d=new Bc;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(db(a.item(e),b,c));else a&&d.add(cb(a,b,c));return d}function eb(a,b,c){return new ce(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(Db))){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 Bc(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)}function fb(a,b){return a.groupJoin(this,b,pd,function(a,b){return b})}function gb(a){var b=this;return new ce(function(c){var d=new fe,e=new Bc,f=new Ic(e);return c.onNext(yc(d,f)),e.add(b.subscribe(function(a){d.onNext(a)},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),Ib(a)&&(a=md(a)),e.add(a.subscribe(function(){d.onCompleted(),d=new fe,c.onNext(yc(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f},b)}function hb(a){var b=this;return new ce(function(c){function d(){var b;try{b=a()}catch(f){return void c.onError(f)}Ib(b)&&(b=md(b));var i=new Gc;e.setDisposable(i),i.setDisposable(b.take(1).subscribe(Bb,function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),h=new fe,c.onNext(yc(h,g)),d()}))}var e=new Hc,f=new Bc(e),g=new Ic(f),h=new fe;return c.onNext(yc(h,g)),f.add(b.subscribe(function(a){h.onNext(a)},function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),c.onCompleted()})),d(),g},b)}function ib(b,c){return new _c(function(){return new $c(function(){return b()?{done:!1,value:c}:{done:!0,value:a}})})}function jb(a){this.patterns=a}function kb(a,b){this.expression=a,this.selector=b}function lb(a,b,c){var d=a.get(b);if(!d){var e=new _d(b,c);return a.set(b,e),e}return d}function mb(a,b,c){this.joinObserverArray=a,this.onNext=b,this.onCompleted=c,this.joinObservers=new $d;for(var d=0,e=this.joinObserverArray.length;e>d;d++){var f=this.joinObserverArray[d];this.joinObservers.set(f,f)}}function nb(a,b){return new ce(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function ob(a,b,c){return new ce(function(d){var e=a,f=Lc(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 pb(a,b){return new ce(function(c){return b.scheduleWithRelative(Lc(a),function(){c.onNext(0),c.onCompleted()})})}function qb(a,b,c){return a===b?new ce(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):od(function(){return ob(c.now()+a,b,c)})}function rb(a,b,c){return new ce(function(d){var e,f=!1,g=new Hc,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 Gc,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 Bc(e,g)},a)}function sb(a,b,c){return od(function(){return rb(a,b-c.now(),c)})}function tb(a,b){return new ce(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new Bc(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 ub={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},vb=ub[typeof window]&&window||this,wb=ub[typeof exports]&&exports&&!exports.nodeType&&exports,xb=ub[typeof module]&&module&&!module.nodeType&&module,yb=xb&&xb.exports===wb&&wb,zb=ub[typeof global]&&global;!zb||zb.global!==zb&&zb.window!==zb||(vb=zb);var Ab={internals:{},config:{Promise:vb.Promise},helpers:{}},Bb=Ab.helpers.noop=function(){},Cb=(Ab.helpers.notDefined=function(a){return"undefined"==typeof a},Ab.helpers.isScheduler=function(a){return a instanceof Ab.Scheduler}),Db=Ab.helpers.identity=function(a){return a},Eb=(Ab.helpers.pluck=function(a){return function(b){return b[a]}},Ab.helpers.just=function(a){return function(){return a}},Ab.helpers.defaultNow=Date.now),Fb=Ab.helpers.defaultComparer=function(a,b){return uc(a,b)},Gb=Ab.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},Hb=(Ab.helpers.defaultKeySerializer=function(a){return a.toString()},Ab.helpers.defaultError=function(a){throw a}),Ib=Ab.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},Jb=(Ab.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},Ab.helpers.not=function(a){return!a}),Kb=Ab.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==jc.call(a)}),a}(),Lb="Sequence contains no elements.",Mb="Argument out of range",Nb="Object has been disposed";Ab.config.longStackSupport=!1;var Ob=!1;try{throw new Error}catch(Pb){Ob=!!Pb.stack}var Qb,Rb=h(),Sb="From previous event:",Tb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";vb.Set&&"function"==typeof(new vb.Set)["@@iterator"]&&(Tb="@@iterator");var Ub=Ab.doneEnumerator={done:!0,value:a},Vb=Ab.helpers.isIterable=function(b){return b[Tb]!==a},Wb=Ab.helpers.isArrayLike=function(b){return b&&b.length!==a};Ab.helpers.iterator=Tb;var Xb,Yb=Ab.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)}},Zb=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],$b=Zb.length,_b="[object Arguments]",ac="[object Array]",bc="[object Boolean]",cc="[object Date]",dc="[object Error]",ec="[object Function]",fc="[object Number]",gc="[object Object]",hc="[object RegExp]",ic="[object String]",jc=Object.prototype.toString,kc=Object.prototype.hasOwnProperty,lc=jc.call(arguments)==_b,mc=Error.prototype,nc=Object.prototype,oc=String.prototype,pc=nc.propertyIsEnumerable;try{Xb=!(jc.call(document)==gc&&!({toString:0}+""))}catch(Pb){Xb=!0}var qc={};qc[ac]=qc[cc]=qc[fc]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},qc[bc]=qc[ic]={constructor:!0,toString:!0,valueOf:!0},qc[dc]=qc[ec]=qc[hc]={constructor:!0,toString:!0},qc[gc]={constructor:!0};var rc={};!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);rc.enumErrorProps=pc.call(mc,"message")||pc.call(mc,"name"),rc.enumPrototypes=pc.call(a,"prototype"),rc.nonEnumArgs=0!=c,rc.nonEnumShadows=!/valueOf/.test(b)}(1);var sc=Ab.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},tc=function(a){return a&&"object"==typeof a?jc.call(a)==_b:!1};lc||(tc=function(a){return a&&"object"==typeof a?kc.call(a,"callee"):!1});var uc=Ab.internals.isEqual=function(a,b){return n(a,b,[],[])},vc=({}.hasOwnProperty,Array.prototype.slice),wc=this.inherits=Ab.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},xc=Ab.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]}},yc=Ab.internals.addRef=function(a,b){return new ce(function(c){return new Bc(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 zc=Ab.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Ac=zc.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 q(zc.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},zc.count=0;var Bc=Ab.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},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=Ab.Disposable=function(a){this.isDisposed=!1,this.action=a||Bb};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:Bb},Gc=Ab.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}(),Hc=Ab.SerialDisposable=Gc,Ic=Ab.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}();r.prototype.dispose=function(){this.scheduler.scheduleWithState(this,t)};var Jc=Ab.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||Gb,this.disposable=new Gc};Jc.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Jc.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Jc.prototype.isCancelled=function(){return this.disposable.isDisposed},Jc.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Kc=Ab.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}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=Eb,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Lc=Kc.normalize;!function(a){function b(a,b){var c=b.first,d=b.second,e=new Bc,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),Fc});d||(e.add(g),c=!0)})};return f(c),e}function c(a,b,c){var d=b.first,e=b.second,f=new Bc,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),Fc});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")})}}(Kc.prototype),function(){Kc.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},Kc.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof vb.setInterval)throw new Error("Periodic scheduling not supported.");var d=a,e=vb.setInterval(function(){d=c(d)},b);return Ec(function(){vb.clearInterval(e)})}}(Kc.prototype),function(a){a.catchError=a["catch"]=function(a){return new Vc(this,a)}}(Kc.prototype);var Mc,Nc=Ab.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 Gc;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),Oc=Kc.immediate=function(){function a(a,b){return b(this,a)}function b(){throw new Error("Not supported")}return new Kc(Eb,a,b,b)}(),Pc=Kc.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 Jc(this,b,c,this.now());if(d)d.enqueue(e);else{d=new zc(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 Kc(Eb,b,c,c);return e.scheduleRequired=function(){return!d},e.ensureTrampoline=function(a){d?a():this.schedule(a)},e}(),Qc=Bb,Rc=function(){var a,b=Bb;if("WScript"in this)a=function(a,b){WScript.Sleep(b),a()};else{if(!vb.setTimeout)throw new Error("No concurrency detected!");a=vb.setTimeout,b=vb.clearTimeout}return{setTimeout:a,clearTimeout:b}}(),Sc=Rc.setTimeout,Tc=Rc.clearTimeout;!function(){function a(){if(!vb.postMessage||vb.importScripts)return!1;var a=!1,b=vb.onmessage;return vb.onmessage=function(){a=!0},vb.postMessage("","*"),vb.onmessage=b,a}var b=RegExp("^"+String(jc).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),c="function"==typeof(c=zb&&yb&&zb.setImmediate)&&!b.test(c)&&c,d="function"==typeof(d=zb&&yb&&zb.clearImmediate)&&!b.test(d)&&d;if("function"==typeof c)Mc=c,Qc=d;else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Mc=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]}};vb.addEventListener?vb.addEventListener("message",h,!1):vb.attachEvent("onmessage",h,!1),Mc=function(a){var b=g++;f[b]=a,vb.postMessage(e+b,"*")}}else if(vb.MessageChannel){var i=new vb.MessageChannel,j={},k=0;i.port1.onmessage=function(a){var b=a.data,c=j[b];c(),delete j[b]},Mc=function(a){var b=k++;j[b]=a,i.port2.postMessage(b)}}else"document"in vb&&"onreadystatechange"in vb.document.createElement("script")?Mc=function(a){var b=vb.document.createElement("script");b.onreadystatechange=function(){a(),b.onreadystatechange=null,b.parentNode.removeChild(b),b=null},vb.document.documentElement.appendChild(b)}:(Mc=function(a){return Sc(a,0)},Qc=Tc)}();var Uc=Kc.timeout=function(){function a(a,b){var c=this,d=new Gc,e=Mc(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=Kc.normalize(b);if(0===e)return d.scheduleWithState(a,c);var f=new Gc,g=Sc(function(){f.isDisposed||f.setDisposable(c(d,a))},e);return new Bc(f,Ec(function(){Tc(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Kc(Eb,a,b,c)}(),Vc=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 wc(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 Gc;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}(Kc),Wc=Ab.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 Cb(a)||(a=Oc),new ce(function(c){return a.schedule(function(){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),Xc=Wc.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 Wc("N",!0);return e.value=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Yc=Wc.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 Wc("E");return e.exception=d,e._accept=a,e._acceptObservable=b,e.toString=c,e}}(),Zc=Wc.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){var d=new Wc("C");return d._accept=a,d._acceptObservable=b,d.toString=c,d}}(),$c=Ab.internals.Enumerator=function(a){this._next=a};$c.prototype.next=function(){return this._next()},$c.prototype[Tb]=function(){return this};var _c=Ab.internals.Enumerable=function(a){this._iterator=a};_c.prototype[Tb]=function(){return this._iterator()},_c.prototype.concat=function(){var a=this;return new ce(function(b){var c,d=a[Tb](),e=new Hc,f=Oc.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;Ib(h)&&(h=md(h));var i=new Gc;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}))})},_c.prototype.catchError=function(){var a=this;return new ce(function(b){var c,d=a[Tb](),e=new Hc,f=Oc.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;Ib(i)&&(i=md(i));var j=new Gc;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}))})},_c.prototype.catchErrorWhen=function(a){var b=this;return new ce(function(c){var d,e,f=new fe,g=new fe,h=a(f),i=h.subscribe(g),j=b[Tb](),k=new Hc,l=Oc.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;Ib(i)&&(i=md(i));var l=new Gc,m=new Gc;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 ad=_c.repeat=function(a,b){return null==b&&(b=-1),new _c(function(){var c=b;return new $c(function(){return 0===c?Ub:(c>0&&c--,{done:!1,value:a})})})},bd=_c.of=function(a,b,c){if(b)var d=Yb(b,c,3);return new _c(function(){var c=-1;return new $c(function(){return++c<a.length?{done:!1,value:b?d(a[c],c,a):a[c]}:Ub})})},cd=Ab.Observer=function(){};cd.prototype.toNotifier=function(){var a=this;return function(b){return b.accept(a)}},cd.prototype.asObserver=function(){return new gd(this.onNext.bind(this),this.onError.bind(this),this.onCompleted.bind(this))},cd.prototype.checked=function(){return new hd(this)};var dd=cd.create=function(a,b,c){return a||(a=Bb),b||(b=Hb),c||(c=Bb),new gd(a,b,c)};cd.fromNotifier=function(a,b){return new gd(function(c){return a.call(b,Xc(c))},function(c){return a.call(b,Yc(c))},function(){return a.call(b,Zc())})},cd.prototype.notifyOn=function(a){return new jd(a,this)},cd.prototype.makeSafe=function(a){return new AnonymousSafeObserver(this._onNext,this._onError,this._onCompleted,a)};var ed,fd=Ab.internals.AbstractObserver=function(a){function b(){this.isStopped=!1,a.call(this)}function c(){throw new Error("Method not implemented")}return wc(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}(cd),gd=Ab.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return wc(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}(fd),hd=function(a){function b(b){a.call(this),this._observer=b,this._state=0}wc(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}(cd),id=Ab.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 Hc}return wc(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;
3
- 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}(fd),jd=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return wc(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}(id),kd=Ab.Observable=function(){function a(a){if(Ab.config.longStackSupport&&Ob){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 ed=a.prototype,ed.subscribe=ed.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:dd(a,b,c))},ed.subscribeOnNext=function(a,b){return this._subscribe(dd("undefined"!=typeof b?function(c){a.call(b,c)}:a))},ed.subscribeOnError=function(a,b){return this._subscribe(dd(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},ed.subscribeOnCompleted=function(a,b){return this._subscribe(dd(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},a}(),ld=Ab.ObservableBase=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Ec(a):Fc}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 de(a),d=[b,this];return Pc.scheduleRequired()?Pc.scheduleWithState(d,c):c(null,d),b}function e(){a.call(this,d)}return wc(e,a),e.prototype.subscribeCore=function(){throw new Error("Not implemeneted")},e}(kd);ed.observeOn=function(a){var b=this;return new ce(function(c){return b.subscribe(new jd(a,c))},b)},ed.subscribeOn=function(a){var b=this;return new ce(function(c){var d=new Gc,e=new Hc;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new r(a,b.subscribe(c)))})),e},b)};var md=kd.fromPromise=function(a){return od(function(){var b=new Ab.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};ed.toPromise=function(a){if(a||(a=Ab.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 nd=function(a){function b(b){this.source=b,a.call(this)}return wc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new u(a))},b}(ld);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)},ed.toArray=function(){return new nd(this)},kd.create=kd.createWithDisposable=function(a,b){return new ce(a,b)};var od=kd.defer=function(a){return new ce(function(b){var c;try{c=a()}catch(d){return Ad(d).subscribe(b)}return Ib(c)&&(c=md(c)),c.subscribe(b)})},pd=kd.empty=function(a){return Cb(a)||(a=Oc),new ce(function(b){return a.schedule(function(){b.onCompleted()})})},qd=function(a){function b(b,c,d){this.iterable=b,this.mapper=c,this.scheduler=d,a.call(this)}return wc(b,a),b.prototype.subscribeCore=function(a){var b=new rd(a,this);return b.run()},b}(ld),rd=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}(),sd=Math.pow(2,53)-1;v.prototype[Tb]=function(){return new w(this._s)},w.prototype[Tb]=function(){return this},w.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:Ub},x.prototype[Tb]=function(){return new y(this._a)},y.prototype[Tb]=function(){return this},y.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:Ub};var td=kd.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=Yb(b,c,2);return Cb(d)||(d=Pc),new qd(a,e,d)},ud=function(a){function b(b,c){this.args=b,this.scheduler=c||Pc,a.call(this)}return wc(b,a),b.prototype.subscribeCore=function(a){var b=new D(a,this);return b.run()},b}(ld);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 vd=kd.fromArray=function(a,b){return new ud(a,b)};kd.generate=function(a,b,c,d,e){return Cb(e)||(e=Pc),new ce(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()})})},kd.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return new ud(b)},kd.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 ud(c,a)},kd.ofArrayChanges=function(a){if(!Array.isArray(a))throw new TypeError("Array.observe only accepts arrays.");if("function"!=typeof Array.observe&&"function"!=typeof Array.unobserve)throw new TypeError("Array.observe is not supported on your platform");return new ce(function(b){function c(a){for(var c=0,d=a.length;d>c;c++)b.onNext(a[c])}return Array.observe(a,c),function(){Array.unobserve(a,c)}})},kd.ofObjectChanges=function(a){if(null==a)throw new TypeError("object must not be null or undefined.");if("function"!=typeof Object.observe&&"function"!=typeof Object.unobserve)throw new TypeError("Array.observe is not supported on your platform");return new ce(function(b){function c(a){for(var c=0,d=a.length;d>c;c++)b.onNext(a[c])}return Object.observe(a,c),function(){Object.unobserve(a,c)}})};var wd=kd.never=function(){return new ce(function(){return Fc})};kd.pairs=function(a,b){return b||(b=Ab.Scheduler.currentThread),new ce(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 xd=function(a){function b(b,c,d){this.start=b,this.count=c,this.scheduler=d,a.call(this)}return wc(b,a),b.prototype.subscribeCore=function(a){var b=new yd(a,this);return b.run()},b}(ld),yd=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}();kd.range=function(a,b,c){return Cb(c)||(c=Pc),new xd(a,b,c)},kd.repeat=function(a,b,c){return Cb(c)||(c=Pc),zd(a,c).repeat(null==b?-1:b)};var zd=kd["return"]=kd.just=function(a,b){return Cb(b)||(b=Oc),new ce(function(c){return b.schedule(function(){c.onNext(a),c.onCompleted()})})};kd.returnValue=function(){return zd.apply(null,arguments)};var Ad=kd["throw"]=kd.throwError=function(a,b){return Cb(b)||(b=Oc),new ce(function(c){return b.schedule(function(){c.onError(a)})})};kd.throwException=function(){return kd.throwError.apply(null,arguments)},kd.using=function(a,b){return new ce(function(c){var d,e,f=Fc;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new Bc(Ad(g).subscribe(c),f)}return new Bc(e.subscribe(c),f)})},ed.amb=function(a){var b=this;return new ce(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new Gc,j=new Gc;return Ib(a)&&(a=md(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)})},kd.amb=function(){function a(a,b){return a.amb(b)}var b=wd(),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},ed["catch"]=ed.catchError=ed.catchException=function(a){return"function"==typeof a?F(this,a):Bd([this,a])};var Bd=kd.catchError=kd["catch"]=kd.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 bd(a).catchError()};ed.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),Cd.apply(this,b)};var Cd=kd.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 ce(function(c){function e(a){if(h[a]=!0,i||(i=h.every(Db))){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(Db)&&c.onCompleted()}function f(a){j[a]=!0,j.every(Db)&&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 Gc;Ib(d)&&(d=md(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 Bc(l)},this)};ed.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),Dd.apply(null,a)};var Dd=kd.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 bd(a).concat()};ed.concatAll=ed.concatObservable=function(){return this.merge(1)},ed.merge=function(a){if("number"!=typeof a)return Ed(this,a);var b=this;return new ce(function(c){function d(a){var b=new Gc;f.add(b),Ib(a)&&(a=md(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 Bc,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 Ed=kd.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(Cb(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=Oc,b=0;d>b;b++)c.push(arguments[b]);else for(a=Oc,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),E(a,c).mergeAll()};ed.mergeAll=ed.mergeObservable=function(){var a=this;return new ce(function(b){var c=new Bc,d=!1,e=new Gc;return c.add(e),e.setDisposable(a.subscribe(function(a){var e=new Gc;c.add(e),Ib(a)&&(a=md(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)},ed.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return Fd([this,a])};var Fd=kd.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 ce(function(b){var c=0,d=new Hc,e=Oc.scheduleRecursive(function(e){var f,g;c<a.length?(f=a[c++],Ib(f)&&(f=md(f)),g=new Gc,d.setDisposable(g),g.setDisposable(f.subscribe(b.onNext.bind(b),e,e))):b.onCompleted()});return new Bc(d,e)})};ed.skipUntil=function(a){var b=this;return new ce(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()}));Ib(a)&&(a=md(a));var f=new Gc;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},function(a){c.onError(a)},function(){f.dispose()})),e},b)},ed["switch"]=ed.switchLatest=function(){var a=this;return new ce(function(b){var c=!1,d=new Hc,e=!1,f=0,g=a.subscribe(function(a){var g=new Gc,h=++f;c=!0,d.setDisposable(g),Ib(a)&&(a=md(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)},ed.takeUntil=function(a){var b=this;return new ce(function(c){return Ib(a)&&(a=md(a)),new Bc(b.subscribe(c),a.subscribe(function(){c.onCompleted()},function(a){c.onError(a)},Bb))},b)},ed.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 ce(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 Gc;Ib(d)&&(d=md(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(Db)},b.onError.bind(b),function(){})),j[c]=e}(k);var l=new Gc;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 Bc(j)},this)},ed.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 ce(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(Db)&&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 Gc;Ib(e)&&(e=md(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)},kd.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)},kd.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 ce(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(Db))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(Db)?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 Gc,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)})},ed.asObservable=function(){var a=this;return new ce(function(b){return a.subscribe(b)},this)},ed.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})},ed.dematerialize=function(){var a=this;return new ce(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},ed.distinctUntilChanged=function(a,b){var c=this;return b||(b=Fb),new ce(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)},ed["do"]=ed.tap=ed.doAction=function(a,b,c){var d=this,e="function"==typeof a||"undefined"==typeof a?dd(a||Bb,b||Bb,c||Bb):a;return new ce(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)},ed.doOnNext=ed.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},ed.doOnError=ed.tapOnError=function(a,b){return this.tap(Bb,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},ed.doOnCompleted=ed.tapOnCompleted=function(a,b){return this.tap(Bb,null,"undefined"!=typeof b?function(){a.call(b)}:a)},ed["finally"]=ed.ensure=function(a){var b=this;return new ce(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)},ed.finallyAction=function(a){return this.ensure(a)},ed.ignoreElements=function(){var a=this;return new ce(function(b){return a.subscribe(Bb,function(a){b.onError(a)},function(){b.onCompleted()})},a)},ed.materialize=function(){var a=this;return new ce(function(b){return a.subscribe(function(a){b.onNext(Xc(a))},function(a){b.onNext(Yc(a)),b.onCompleted()},function(){b.onNext(Zc()),b.onCompleted()})},a)},ed.repeat=function(a){return ad(this,a).concat()},ed.retry=function(a){return ad(this,a).catchError()},ed.retryWhen=function(a){return ad(this).catchErrorWhen(a)},ed.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 ce(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)},ed.skipLast=function(a){var b=this;return new ce(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)},ed.startWith=function(){var a,b=0;arguments.length&&Cb(arguments[0])?(a=arguments[0],b=1):a=Oc;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return bd([vd(c,a),this]).concat()},ed.takeLast=function(a){var b=this;return new ce(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)},ed.takeLastBuffer=function(a){var b=this;return new ce(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)},ed.windowWithCount=function(a,b){var c=this;if(+a||(a=0),1/0===Math.abs(a)&&(a=0),0>=a)throw new Error(Mb);if(null==b&&(b=a),+b||(b=0),1/0===Math.abs(b)&&(b=0),0>=b)throw new Error(Mb);return new ce(function(d){function e(){var a=new fe;i.push(a),d.onNext(yc(a,g))}var f=new Gc,g=new Ic(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)},ed.selectConcat=ed.concatMap=function(a,b,c){return Kb(a)&&Kb(b)?this.concatMap(function(c,d){var e=a(c,d);return Ib(e)&&(e=md(e)),(Wb(e)||Vb(e))&&(e=td(e)),e.map(function(a,e){return b(c,a,d,e)})}):Kb(a)?J(this,a,c):J(this,function(){return a})},ed.concatMapObserver=ed.selectConcatObserver=function(a,b,c,d){var e=this,f=Yb(a,d,2),g=Yb(b,d,1),h=Yb(c,d,0);return new ce(function(a){var b=0;return e.subscribe(function(c){var d;try{d=f(c,b++)}catch(e){return void a.onError(e)}Ib(d)&&(d=md(d)),a.onNext(d)},function(b){var c;try{c=g(b)}catch(d){return void a.onError(d)}Ib(c)&&(c=md(c)),a.onNext(c),a.onCompleted()},function(){var b;try{b=h()}catch(c){return void a.onError(c)}Ib(b)&&(b=md(b)),a.onNext(b),a.onCompleted()})},this).concatAll()},ed.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new ce(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},ed.distinct=function(a,b){var c=this;return b||(b=Fb),new ce(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)},ed.groupBy=function(a,b,c){return this.groupByUntil(a,b,wd,c)},ed.groupByUntil=function(a,b,c,d){var e=this;return b||(b=Db),d||(d=Fb),new ce(function(f){function g(a){return function(b){b.onError(a)}}var h=new Xd(0,d),i=new Bc,j=new Ic(i);return i.add(e.subscribe(function(d){var e;try{e=a(d)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}var l=!1,m=h.tryGetValue(e);if(m||(m=new fe,h.set(e,m),l=!0),l){var n=new ee(e,m,j),o=new ee(e,m);try{duration=c(o)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}f.onNext(n);var p=new Gc;i.add(p);var q=function(){h.remove(e)&&m.onCompleted(),i.remove(p)};p.setDisposable(duration.take(1).subscribe(Bb,function(a){h.getValues().forEach(g(a)),f.onError(a)},q))}var r;try{r=b(d)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}m.onNext(r)},function(a){h.getValues().forEach(g(a)),f.onError(a)},function(){h.getValues().forEach(function(a){a.onCompleted()}),f.onCompleted()})),j},e)};var Gd=function(a){function b(b,c,d){this.source=b,this.selector=Yb(c,d,3),a.call(this)}return wc(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}(ld);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)},ed.map=ed.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof Gd?this.internalMap(c,b):new Gd(this,c,b)},ed.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})},ed.selectMany=ed.flatMap=function(a,b,c){return Kb(a)&&Kb(b)?this.flatMap(function(c,d){var e=a(c,d);return Ib(e)&&(e=md(e)),(Wb(e)||Vb(e))&&(e=td(e)),e.map(function(a,e){return b(c,a,d,e)})},c):Kb(a)?N(this,a,c):N(this,function(){return a})},ed.flatMapObserver=ed.selectManyObserver=function(a,b,c,d){var e=this;return new ce(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)}Ib(c)&&(c=md(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}Ib(c)&&(c=md(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}Ib(a)&&(a=md(a)),f.onNext(a),f.onCompleted()})},e).mergeAll()},ed.selectSwitch=ed.flatMapLatest=ed.switchMap=function(a,b){return this.select(a,b).switchLatest()},ed.skip=function(a){if(0>a)throw new Error(Mb);var b=this;return new ce(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)},ed.skipWhile=function(a,b){var c=this,d=Yb(a,b,3);return new ce(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)},ed.take=function(a,b){if(0>a)throw new RangeError(Mb);if(0===a)return pd(b);var c=this;return new ce(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)},ed.takeWhile=function(a,b){var c=this,d=Yb(a,b,3);return new ce(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 Hd=function(a){function b(b,c,d){this.source=b,this.predicate=Yb(c,d,3),a.call(this)}return wc(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}(ld);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)},ed.filter=ed.where=function(a,b){return this instanceof Hd?this.internalFilter(a,b):new Hd(this,a,b)},ed.aggregate=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,b=arguments[0],a=arguments[1]):a=arguments[0],new ce(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=a(g,d):(g=c?a(b,d):d,f=!0)}catch(i){return void e.onError(i)}},function(a){e.onError(a)},function(){h&&e.onNext(g),!h&&c&&e.onNext(b),!h&&!c&&e.onError(new Error(Lb)),e.onCompleted()})},d)},ed.reduce=function(a){var b,c=!1,d=this;return 2===arguments.length&&(c=!0,b=arguments[1]),new ce(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=a(g,d):(g=c?a(b,d):d,f=!0)}catch(i){return void e.onError(i)}},function(a){e.onError(a)},function(){h&&e.onNext(g),!h&&c&&e.onNext(b),!h&&!c&&e.onError(new Error(Lb)),e.onCompleted()})},d)},ed.some=function(a,b){var c=this;return a?c.filter(a,b).some():new ce(function(a){return c.subscribe(function(){a.onNext(!0),a.onCompleted()},function(b){a.onError(b)},function(){a.onNext(!1),a.onCompleted()})},c)},ed.any=function(){return this.some.apply(this,arguments)},ed.isEmpty=function(){return this.any().map(Jb)},ed.every=function(a,b){return this.filter(function(b){return!a(b)},b).some().map(Jb)},ed.all=function(){return this.every.apply(this,arguments)},ed.includes=function(a,b){function c(a,b){return 0===a&&0===b||a===b||isNaN(a)&&isNaN(b)}var d=this;return new ce(function(e){var f=0,g=+b||0;return 1/0===Math.abs(g)&&(g=0),0>g?(e.onNext(!1),e.onCompleted(),Fc):d.subscribe(function(b){f++>=g&&c(b,a)&&(e.onNext(!0),e.onCompleted())},function(a){e.onError(a)},function(){e.onNext(!1),e.onCompleted()})},this)},ed.contains=function(a,b){ed.includes(a,b)},ed.count=function(a,b){return a?this.filter(a,b).count():this.reduce(function(a){return a+1},0)},ed.indexOf=function(a,b){var c=this;return new ce(function(d){var e=0,f=+b||0;return 1/0===Math.abs(f)&&(f=0),0>f?(d.onNext(-1),d.onCompleted(),Fc):c.subscribe(function(b){e>=f&&b===a&&(d.onNext(e),d.onCompleted()),e++},function(a){d.onError(a)},function(){d.onNext(-1),d.onCompleted()})},c)},ed.sum=function(a,b){return a&&Kb(a)?this.map(a,b).sum():this.reduce(function(a,b){return a+b},0)},ed.minBy=function(a,b){return b||(b=Gb),P(this,a,function(a,c){return-1*b(a,c)})},ed.min=function(a){return this.minBy(Db,a).map(function(a){return Q(a)})},ed.maxBy=function(a,b){return b||(b=Gb),P(this,a,b)},ed.max=function(a){return this.maxBy(Db,a).map(function(a){return Q(a)})},ed.average=function(a,b){return a&&Kb(a)?this.map(a,b).average():this.reduce(function(a,b){return{sum:a.sum+b,count:a.count+1}},{sum:0,count:0}).map(function(a){if(0===a.count)throw new Error(Lb);return a.sum/a.count})},ed.sequenceEqual=function(a,b){var c=this;return b||(b=Fb),new ce(function(d){var e=!1,f=!1,g=[],h=[],i=c.subscribe(function(a){var c,e;if(h.length>0){e=h.shift();try{c=b(e,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else f?(d.onNext(!1),d.onCompleted()):g.push(a)},function(a){d.onError(a)},function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))});(Wb(a)||Vb(a))&&(a=td(a)),Ib(a)&&(a=md(a));var j=a.subscribe(function(a){var c;if(g.length>0){var f=g.shift();try{c=b(f,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else e?(d.onNext(!1),d.onCompleted()):h.push(a)},function(a){d.onError(a)},function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new Bc(i,j)},c)},ed.elementAt=function(a){return R(this,a,!1)},ed.elementAtOrDefault=function(a,b){return R(this,a,!0,b)},ed.single=function(a,b){return a&&Kb(a)?this.where(a,b).single():S(this,!1)},ed.singleOrDefault=function(a,b,c){return a&&Kb(a)?this.filter(a,c).singleOrDefault(null,b):S(this,!0,b)},ed.first=function(a,b){return a?this.where(a,b).first():T(this,!1)},ed.firstOrDefault=function(a,b){return a?this.where(a).firstOrDefault(null,b):T(this,!0,b)},ed.last=function(a,b){return a?this.where(a,b).last():U(this,!1)},ed.lastOrDefault=function(a,b,c){return a?this.where(a,c).lastOrDefault(null,b):U(this,!0,b)},ed.find=function(a,b){return V(this,a,b,!1)},ed.findIndex=function(a,b){return V(this,a,b,!0)},ed.toSet=function(){if("undefined"==typeof vb.Set)throw new TypeError;var a=this;return new ce(function(b){var c=new vb.Set;return a.subscribe(function(a){c.add(a)},function(a){b.onError(a)},function(){b.onNext(c),b.onCompleted()})},a)},ed.toMap=function(a,b){if("undefined"==typeof vb.Map)throw new TypeError;var c=this;return new ce(function(d){var e=new vb.Map;return c.subscribe(function(c){var f;try{f=a(c)}catch(g){return void d.onError(g)}var h=c;if(b)try{h=b(c)}catch(g){return void d.onError(g)}e.set(f,h)},function(a){d.onError(a)},function(){d.onNext(e),d.onCompleted()})},c)};var Id="function",Jd="throw",sc=Ab.internals.isObject,Kd=Ab.spawn=function(a){var b=_(a);return function(c){function d(a,b){Uc.schedule(c.bind(f,a,b))}function e(a,b){var c;if(arguments.length>2)for(var b=[],h=1,i=arguments.length;i>h;h++)b.push(arguments[h]);if(a)try{c=g[Jd](a)}catch(j){return d(j)}if(!a)try{c=g.next(b)}catch(j){return d(j)}if(c.done)return d(null,c.value);if(c.value=W(c.value,f),typeof c.value!==Id)e(new TypeError("Rx.spawn only supports a function, Promise, Observable, Object or Array."));else{var k=!1;try{c.value.call(f,function(){k||(k=!0,e.apply(f,arguments))})}catch(j){Uc.schedule(function(){k||(k=!0,e.call(f,j))})}}}var f=this,g=a;if(b){for(var h=[],i=0,j=arguments.length;j>i;i++)h.push(arguments[i]);var j=h.length,k=j&&typeof h[j-1]===Id;c=k?h.pop():bb,g=a.apply(this,h)}else c=c||bb;e()}};kd.start=function(a,b,c){return Ld(a,b,c)()};var Ld=kd.toAsync=function(a,b,c){return Cb(c)||(c=Uc),function(){var d=arguments,e=new ge;return c.schedule(function(){var c;try{c=a.apply(b,d)}catch(f){return void e.onError(f)}e.onNext(c),e.onCompleted()}),e.asObservable()}};kd.fromCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new ce(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()}},kd.fromNodeCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);
4
- return new ce(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()}},Ab.config.useNativeEvents=!1,kd.fromEvent=function(a,b,c){return a.addListener?Md(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c):Ab.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new ce(function(d){return db(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():Md(function(c){a.on(b,c)},function(c){a.off(b,c)},c)};var Md=kd.fromEventPattern=function(a,b,c){return new ce(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 Ec(function(){b&&b(e,f)})}).publish().refCount()};kd.startAsync=function(a){var b;try{b=a()}catch(c){return Ad(c)}return md(b)};var Nd=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=Fc,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=Fc)});return new Bc(c,d,e)}function c(c,d){this.source=c,this.controller=new fe,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b,c)}return wc(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(kd);ed.pausable=function(a){return new Nd(this,a)};var Od=function(b){function c(b){var c,d=[],e=eb(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 fe,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c,a)}return wc(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(kd);ed.pausableBuffered=function(a){return new Od(this,a)};var Pd=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b,c),this.subject=new Qd(d),this.source=c.multicast(this.subject).refCount()}return wc(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(kd),Qd=function(a){function b(a){return this.subject.subscribe(a)}function c(c){null==c&&(c=!0),a.call(this,b),this.subject=new fe,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=Fc,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=Fc}return wc(c,a),xc(c.prototype,cd,{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=Fc):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=Fc),{numberOfItems:a,returnValue:!1}},request:function(a){this.disposeCurrentRequest();var b=this,c=this._processRequest(a),a=c.numberOfItems;return c.returnValue?Fc:(this.requestedCount=a,this.requestedDisposable=Ec(function(){b.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=Fc}}),c}(kd);ed.controlled=function(a){return null==a&&(a=!0),new Pd(this,a)};var Rd=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return Uc.schedule(function(){b.source.request(1)}),this.subscription}function c(c){a.call(this,b,c),this.source=c}wc(c,a);var d=function(a){function b(b,c,d){a.call(this),this.observer=b,this.observable=c,this.cancel=d}wc(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){this.observer.onNext(a);var b=this;Uc.schedule(function(){b.observable.source.request(1)})},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(fd);return c}(kd);Pd.prototype.stopAndWait=function(){return new Rd(this)};var Sd=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return Uc.schedule(function(){b.source.request(b.windowSize)}),this.subscription}function c(c,d){a.call(this,b,c),this.source=c,this.windowSize=d}wc(c,a);var d=function(a){function b(a,b,c){this.observer=a,this.observable=b,this.cancel=c,this.received=0}wc(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){if(this.observer.onNext(a),this.received=++this.received%this.observable.windowSize,0===this.received){var b=this;Uc.schedule(function(){b.observable.source.request(b.observable.windowSize)})}},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(fd);return c}(kd);Pd.prototype.windowed=function(a){return new Sd(this,a)},ed.multicast=function(a,b){var c=this;return"function"==typeof a?new ce(function(d){var e=c.multicast(a());return new Bc(b(e).subscribe(d),e.connect())},c):new Wd(c,a)},ed.publish=function(a){return a&&Kb(a)?this.multicast(function(){return new fe},a):this.multicast(new fe)},ed.share=function(){return this.publish().refCount()},ed.publishLast=function(a){return a&&Kb(a)?this.multicast(function(){return new ge},a):this.multicast(new ge)},ed.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new Ud(b)},a):this.multicast(new Ud(a))},ed.shareValue=function(a){return this.publishValue(a).refCount()},ed.replay=function(a,b,c,d){return a&&Kb(a)?this.multicast(function(){return new Vd(b,c,d)},a):this.multicast(new Vd(b,c,d))},ed.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var Td=function(a,b){this.subject=a,this.observer=b};Td.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 Ud=Ab.BehaviorSubject=function(a){function d(a){return b(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),Fc):(this.observers.push(a),a.onNext(this.value),new Td(this,a))}function e(b){a.call(this,d),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return wc(e,a),xc(e.prototype,cd,{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}(kd),Vd=Ab.ReplaySubject=function(a){function d(a,b){return Ec(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function e(a){var c=new id(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||Pc,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,e)}return wc(f,a),xc(f.prototype,cd.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}(kd),Wd=Ab.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new Bc(f.subscribe(c),Ec(function(){e=!1}))),d},a.call(this,function(a){return c.subscribe(a)})}return wc(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new ce(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(kd),Xd=function(){function b(a){if(0===(1&a))return 2===a;for(var b=Math.sqrt(a),c=3;b>=c;){if(a%c===0)return!1;c+=2}return!0}function c(a){var c,d,e;for(c=0;c<h.length;++c)if(d=h[c],d>=a)return d;for(e=1|a;e<h[h.length-1];){if(b(e))return e;e+=2}return a}function d(a){var b=757602046;if(!a.length)return b;for(var c=0,d=a.length;d>c;c++){var e=a.charCodeAt(c);b=(b<<5)-b+e,b&=b}return b}function e(a){var b=668265261;return a=61^a^a>>>16,a+=a<<3,a^=a>>>4,a*=b,a^=a>>>15}function f(){return{key:null,value:null,next:0,hashCode:0}}function g(a,b){if(0>a)throw new Error("out of range");a>0&&this._initialize(a),this.comparer=b||Fb,this.freeCount=0,this.size=0,this.freeList=-1}var h=[1,3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143,4194301,8388593,16777213,33554393,67108859,134217689,268435399,536870909,1073741789,2147483647],i="no such key",j="duplicate key",k=function(){var a=0;return function(b){if(null==b)throw new Error(i);if("string"==typeof b)return d(b);if("number"==typeof b)return e(b);if("boolean"==typeof b)return b===!0?1:0;if(b instanceof Date)return e(b.valueOf());if(b instanceof RegExp)return d(b.toString());if("function"==typeof b.valueOf){var c=b.valueOf();if("number"==typeof c)return e(c);if("string"==typeof c)return d(c)}if(b.hashCode)return b.hashCode();var f=17*a++;return b.hashCode=function(){return f},f}}(),l=g.prototype;return l._initialize=function(a){var b,d=c(a);for(this.buckets=new Array(d),this.entries=new Array(d),b=0;d>b;b++)this.buckets[b]=-1,this.entries[b]=f();this.freeList=-1},l.add=function(a,b){this._insert(a,b,!0)},l._insert=function(a,b,c){this.buckets||this._initialize(0);for(var d,e=2147483647&k(a),f=e%this.buckets.length,g=this.buckets[f];g>=0;g=this.entries[g].next)if(this.entries[g].hashCode===e&&this.comparer(this.entries[g].key,a)){if(c)throw new Error(j);return void(this.entries[g].value=b)}this.freeCount>0?(d=this.freeList,this.freeList=this.entries[d].next,--this.freeCount):(this.size===this.entries.length&&(this._resize(),f=e%this.buckets.length),d=this.size,++this.size),this.entries[d].hashCode=e,this.entries[d].next=this.buckets[f],this.entries[d].key=a,this.entries[d].value=b,this.buckets[f]=d},l._resize=function(){var a=c(2*this.size),b=new Array(a);for(e=0;e<b.length;++e)b[e]=-1;var d=new Array(a);for(e=0;e<this.size;++e)d[e]=this.entries[e];for(var e=this.size;a>e;++e)d[e]=f();for(var g=0;g<this.size;++g){var h=d[g].hashCode%a;d[g].next=b[h],b[h]=g}this.buckets=b,this.entries=d},l.remove=function(a){if(this.buckets)for(var b=2147483647&k(a),c=b%this.buckets.length,d=-1,e=this.buckets[c];e>=0;e=this.entries[e].next){if(this.entries[e].hashCode===b&&this.comparer(this.entries[e].key,a))return 0>d?this.buckets[c]=this.entries[e].next:this.entries[d].next=this.entries[e].next,this.entries[e].hashCode=-1,this.entries[e].next=this.freeList,this.entries[e].key=null,this.entries[e].value=null,this.freeList=e,++this.freeCount,!0;d=e}return!1},l.clear=function(){var a,b;if(!(this.size<=0)){for(a=0,b=this.buckets.length;b>a;++a)this.buckets[a]=-1;for(a=0;a<this.size;++a)this.entries[a]=f();this.freeList=-1,this.size=0}},l._findEntry=function(a){if(this.buckets)for(var b=2147483647&k(a),c=this.buckets[b%this.buckets.length];c>=0;c=this.entries[c].next)if(this.entries[c].hashCode===b&&this.comparer(this.entries[c].key,a))return c;return-1},l.count=function(){return this.size-this.freeCount},l.tryGetValue=function(b){var c=this._findEntry(b);return c>=0?this.entries[c].value:a},l.getValues=function(){var a=0,b=[];if(this.entries)for(var c=0;c<this.size;c++)this.entries[c].hashCode>=0&&(b[a++]=this.entries[c].value);return b},l.get=function(a){var b=this._findEntry(a);if(b>=0)return this.entries[b].value;throw new Error(i)},l.set=function(a,b){this._insert(a,b,!1)},l.containskey=function(a){return this._findEntry(a)>=0},g}();ed.join=function(a,b,c,d){var e=this;return new ce(function(f){var g=new Bc,h=!1,i=!1,j=0,k=0,l=new Xd,m=new Xd;return g.add(e.subscribe(function(a){var c=j++,e=new Gc;l.add(c,a),g.add(e);var i,k=function(){l.remove(c)&&0===l.count()&&h&&f.onCompleted(),g.remove(e)};try{i=b(a)}catch(n){return void f.onError(n)}e.setDisposable(i.take(1).subscribe(Bb,f.onError.bind(f),k)),m.getValues().forEach(function(b){var c;try{c=d(a,b)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){h=!0,(i||0===l.count())&&f.onCompleted()})),g.add(a.subscribe(function(a){var b=k++,e=new Gc;m.add(b,a),g.add(e);var h,j=function(){m.remove(b)&&0===m.count()&&i&&f.onCompleted(),g.remove(e)};try{h=c(a)}catch(n){return void f.onError(n)}e.setDisposable(h.take(1).subscribe(Bb,f.onError.bind(f),j)),l.getValues().forEach(function(b){var c;try{c=d(b,a)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){i=!0,(h||0===m.count())&&f.onCompleted()})),g},e)},ed.groupJoin=function(a,b,c,d){var e=this;return new ce(function(f){function g(a){return function(b){b.onError(a)}}var h=new Bc,i=new Ic(h),j=new Xd,k=new Xd,l=0,m=0;return h.add(e.subscribe(function(a){var c=new fe,e=l++;j.add(e,c);var m;try{m=d(a,yc(c,i))}catch(n){return j.getValues().forEach(g(n)),void f.onError(n)}f.onNext(m),k.getValues().forEach(function(a){c.onNext(a)});var o=new Gc;h.add(o);var p,q=function(){j.remove(e)&&c.onCompleted(),h.remove(o)};try{p=b(a)}catch(n){return j.getValues().forEach(g(n)),void f.onError(n)}o.setDisposable(p.take(1).subscribe(Bb,function(a){j.getValues().forEach(g(a)),f.onError(a)},q))},function(a){j.getValues().forEach(g(a)),f.onError(a)},f.onCompleted.bind(f))),h.add(a.subscribe(function(a){var b=m++;k.add(b,a);var d=new Gc;h.add(d);var e,i=function(){k.remove(b),h.remove(d)};try{e=c(a)}catch(l){return j.getValues().forEach(g(l)),void f.onError(l)}d.setDisposable(e.take(1).subscribe(Bb,function(a){j.getValues().forEach(g(a)),f.onError(a)},i)),j.getValues().forEach(function(b){b.onNext(a)})},function(a){j.getValues().forEach(g(a)),f.onError(a)})),i},e)},ed.buffer=function(){return this.window.apply(this,arguments).selectMany(function(a){return a.toArray()})},ed.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?gb.call(this,a):"function"==typeof a?hb.call(this,a):fb.call(this,a,b)},ed.pairwise=function(){var a=this;return new ce(function(b){var c,d=!1;return a.subscribe(function(a){d?b.onNext([c,a]):d=!0,c=a},b.onError.bind(b),b.onCompleted.bind(b))},a)},ed.partition=function(a,b){return[this.filter(a,b),this.filter(function(c,d,e){return!a.call(b,c,d,e)})]},ed.letBind=ed.let=function(a){return a(this)},kd["if"]=kd.ifThen=function(a,b,c){return od(function(){return c||(c=pd()),Ib(b)&&(b=md(b)),Ib(c)&&(c=md(c)),"function"==typeof c.now&&(c=pd(c)),a()?b:c})},kd["for"]=kd.forIn=function(a,b,c){return bd(a,b,c).concat()};var Yd=kd["while"]=kd.whileDo=function(a,b){return Ib(b)&&(b=md(b)),ib(a,b).concat()};ed.doWhile=function(a){return Dd([this,Yd(a,this)])},kd["case"]=kd.switchCase=function(a,b,c){return od(function(){Ib(c)&&(c=md(c)),c||(c=pd()),"function"==typeof c.now&&(c=pd(c));var d=b[a()];return Ib(d)&&(d=md(d)),d||c})},ed.expand=function(a,b){Cb(b)||(b=Oc);var c=this;return new ce(function(d){var e=[],f=new Hc,g=new Bc(f),h=0,i=!1,j=function(){var c=!1;e.length>0&&(c=!i,i=!0),c&&f.setDisposable(b.scheduleRecursive(function(b){var c;if(!(e.length>0))return void(i=!1);c=e.shift();var f=new Gc;g.add(f),f.setDisposable(c.subscribe(function(b){d.onNext(b);var c=null;try{c=a(b)}catch(f){d.onError(f)}e.push(c),h++,j()},d.onError.bind(d),function(){g.remove(f),h--,0===h&&d.onCompleted()})),b()}))};return e.push(c),h++,j(),g},this)},kd.forkJoin=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 ce(function(b){var c=a.length;if(0===c)return b.onCompleted(),Fc;for(var d=new Bc,e=!1,f=new Array(c),g=new Array(c),h=new Array(c),i=0;c>i;i++)!function(i){var j=a[i];Ib(j)&&(j=md(j)),d.add(j.subscribe(function(a){e||(f[i]=!0,h[i]=a)},function(a){e=!0,b.onError(a),d.dispose()},function(){if(!e){if(!f[i])return void b.onCompleted();g[i]=!0;for(var a=0;c>a;a++)if(!g[a])return;e=!0,b.onNext(h),b.onCompleted()}}))}(i);return d})},ed.forkJoin=function(a,b){var c=this;return new ce(function(d){var e,f,g=!1,h=!1,i=!1,j=!1,k=new Gc,l=new Gc;return Ib(a)&&(a=md(a)),k.setDisposable(c.subscribe(function(a){i=!0,e=a},function(a){l.dispose(),d.onError(a)},function(){if(g=!0,h)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),l.setDisposable(a.subscribe(function(a){j=!0,f=a},function(a){k.dispose(),d.onError(a)},function(){if(h=!0,g)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),new Bc(k,l)},c)},ed.manySelect=function(a,b){Cb(b)||(b=Oc);var c=this;return od(function(){var d;return c.map(function(a){var b=new Zd(a);return d&&d.onNext(a),d=b,b}).tap(Bb,function(a){d&&d.onError(a)},function(){d&&d.onCompleted()}).observeOn(b).map(a)},c)};var Zd=function(a){function b(a){var b=this,c=new Bc;return c.add(Pc.schedule(function(){a.onNext(b.head),c.add(b.tail.mergeAll().subscribe(a))})),c}function c(c){a.call(this,b),this.head=c,this.tail=new ge}return wc(c,a),xc(c.prototype,cd,{onCompleted:function(){this.onNext(kd.empty())},onError:function(a){this.onNext(kd.throwException(a))},onNext:function(a){this.tail.onNext(a),this.tail.onCompleted()}}),c}(kd),$d=vb.Map||function(){function b(){this._keys=[],this._values=[]}return b.prototype.get=function(b){var c=this._keys.indexOf(b);return-1!==c?this._values[c]:a},b.prototype.set=function(a,b){var c=this._keys.indexOf(a);-1!==c&&(this._values[c]=b),this._values[this._keys.push(a)-1]=b},b.prototype.forEach=function(a,b){for(var c=0,d=this._keys.length;d>c;c++)a.call(b,this._values[c],this._keys[c])},b}();jb.prototype.and=function(a){return new jb(this.patterns.concat(a))},jb.prototype.thenDo=function(a){return new kb(this,a)},kb.prototype.activate=function(a,b,c){for(var d=this,e=[],f=0,g=this.expression.patterns.length;g>f;f++)e.push(lb(a,this.expression.patterns[f],b.onError.bind(b)));var h=new mb(e,function(){var a;try{a=d.selector.apply(d,arguments)}catch(c){return void b.onError(c)}b.onNext(a)},function(){for(var a=0,b=e.length;b>a;a++)e[a].removeActivePlan(h);c(h)});for(f=0,g=e.length;g>f;f++)e[f].addActivePlan(h);return h},mb.prototype.dequeue=function(){this.joinObservers.forEach(function(a){a.queue.shift()})},mb.prototype.match=function(){var a,b,c=!0;for(a=0,b=this.joinObserverArray.length;b>a;a++)if(0===this.joinObserverArray[a].queue.length){c=!1;break}if(c){var d=[],e=!1;for(a=0,b=this.joinObserverArray.length;b>a;a++)d.push(this.joinObserverArray[a].queue[0]),"C"===this.joinObserverArray[a].queue[0].kind&&(e=!0);if(e)this.onCompleted();else{this.dequeue();var f=[];for(a=0,b=d.length;a<d.length;a++)f.push(d[a].value);this.onNext.apply(this,f)}}};var _d=function(a){function b(b,c){a.call(this),this.source=b,this.onError=c,this.queue=[],this.activePlans=[],this.subscription=new Gc,this.isDisposed=!1}wc(b,a);var c=b.prototype;return c.next=function(a){if(!this.isDisposed){if("E"===a.kind)return this.onError(a.exception);this.queue.push(a);for(var b=this.activePlans.slice(0),c=0,d=b.length;d>c;c++)b[c].match()}},c.error=Bb,c.completed=Bb,c.addActivePlan=function(a){this.activePlans.push(a)},c.subscribe=function(){this.subscription.setDisposable(this.source.materialize().subscribe(this))},c.removeActivePlan=function(a){this.activePlans.splice(this.activePlans.indexOf(a),1),0===this.activePlans.length&&this.dispose()},c.dispose=function(){a.prototype.dispose.call(this),this.isDisposed||(this.isDisposed=!0,this.subscription.dispose())},b}(fd);ed.and=function(a){return new jb([this,a])},ed.thenDo=function(a){return new jb([this]).thenDo(a)},kd.when=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 ce(function(b){var c=[],d=new $d,e=dd(function(a){b.onNext(a)},function(a){d.forEach(function(b){b.onError(a)}),b.onError(a)},function(){b.onCompleted()});try{for(var f=0,g=a.length;g>f;f++)c.push(a[f].activate(d,e,function(a){var d=c.indexOf(a);c.splice(d,1),0===c.length&&b.onCompleted()}))}catch(h){Ad(h).subscribe(b)}var i=new Bc;return d.forEach(function(a){a.subscribe(),i.add(a)}),i})};var ae=kd.interval=function(a,b){return qb(a,a,Cb(b)?b:Uc)},be=kd.timer=function(b,c,d){var e;return Cb(d)||(d=Uc),c!==a&&"number"==typeof c?e=c:Cb(c)&&(d=c),b instanceof Date&&e===a?nb(b.getTime(),d):b instanceof Date&&e!==a?(e=c,ob(b.getTime(),e,d)):e===a?pb(b,d):qb(b,e,d)};ed.delay=function(a,b){return Cb(b)||(b=Uc),a instanceof Date?sb(this,a.getTime(),b):rb(this,a,b)},ed.debounce=ed.throttleWithTimeout=function(a,b){Cb(b)||(b=Uc);var c=this;return new ce(function(d){var e,f=new Hc,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new Gc;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 Bc(i,f)},this)},ed.throttle=function(a,b){return this.debounce(a,b)},ed.windowWithTime=function(a,b,c){var d,e=this;return null==b&&(d=a),Cb(c)||(c=Uc),"number"==typeof b?d=b:Cb(b)&&(d=a,c=b),new ce(function(b){function f(){var a=new Gc,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 fe;k.push(a),b.onNext(yc(a,h))}e&&k.shift().onCompleted(),f()}))}var g,h,i=d,j=a,k=[],l=new Hc,m=0;return g=new Bc(l),h=new Ic(g),k.push(new fe),b.onNext(yc(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)},ed.windowWithTimeOrCount=function(a,b,c){var d=this;return Cb(c)||(c=Uc),new ce(function(e){function f(b){var d=new Gc;g.setDisposable(d),d.setDisposable(c.scheduleWithRelative(a,function(){if(b===k){j=0;var a=++k;l.onCompleted(),l=new fe,e.onNext(yc(l,i)),f(a)}}))}var g=new Hc,h=new Bc(g),i=new Ic(h),j=0,k=0,l=new fe;return e.onNext(yc(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 fe,e.onNext(yc(l,i))),d&&f(c)},function(a){l.onError(a),e.onError(a)},function(){l.onCompleted(),e.onCompleted()})),i},d)},ed.bufferWithTime=function(){return this.windowWithTime.apply(this,arguments).selectMany(function(a){return a.toArray()})},ed.bufferWithTimeOrCount=function(a,b,c){return this.windowWithTimeOrCount(a,b,c).selectMany(function(a){return a.toArray()})},ed.timeInterval=function(a){var b=this;return Cb(a)||(a=Uc),od(function(){var c=a.now();return b.map(function(b){var d=a.now(),e=d-c;return c=d,{value:b,interval:e}})})},ed.timestamp=function(a){return Cb(a)||(a=Uc),this.map(function(b){return{value:b,timestamp:a.now()}})},ed.sample=ed.throttleLatest=function(a,b){return Cb(b)||(b=Uc),"number"==typeof a?tb(this,ae(a,b)):tb(this,a)},ed.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=Ad(new Error(b||"Timeout"))),Cb(c)||(c=Uc);var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new ce(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(Ib(b)&&(b=md(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new Gc,j=new Hc,k=!1,l=new Hc;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 Bc(j,l)},d)},kd.generateWithAbsoluteTime=function(a,b,c,d,e,f){return Cb(f)||(f=Uc),new ce(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()})})},kd.generateWithRelativeTime=function(a,b,c,d,e,f){return Cb(f)||(f=Uc),new ce(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()})})},ed.delaySubscription=function(a,b){return this.delayWithSelector(be(a,Cb(b)?b:Uc),pd)},ed.delayWithSelector=function(a,b){var c,d,e=this;return"function"==typeof a?d=a:(c=a,d=b),new ce(function(a){var b=new Bc,f=!1,g=function(){f&&0===b.length&&a.onCompleted()},h=new Hc,i=function(){h.setDisposable(e.subscribe(function(c){var e;try{e=d(c)}catch(f){return void a.onError(f)}var h=new Gc;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 Bc(h,b)},this)},ed.timeoutWithSelector=function(a,b,c){1===arguments.length&&(b=a,a=wd()),c||(c=Ad(new Error("Timeout")));var d=this;return new ce(function(e){function f(a){function b(){return k===d}var d=k,f=new Gc;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 Hc,i=new Hc,j=new Gc;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(Ib(c)?md(c):c)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new Bc(h,i)},d)},ed.debounceWithSelector=function(a){var b=this;return new ce(function(c){var d,e=!1,f=new Hc,g=0,h=b.subscribe(function(b){var h;try{h=a(b)}catch(i){return void c.onError(i)}Ib(h)&&(h=md(h)),e=!0,d=b,g++;var j=g,k=new Gc;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 Bc(h,f)},b)},ed.throttleWithSelector=function(){return this.debounceWithSelector.apply(this,arguments)},ed.skipLastWithTime=function(a,b){Cb(b)||(b=Uc);var c=this;return new ce(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)},ed.takeLastWithTime=function(a,b){var c=this;return Cb(b)||(b=Uc),new ce(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)},ed.takeLastBufferWithTime=function(a,b){var c=this;return Cb(b)||(b=Uc),new ce(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)},ed.takeWithTime=function(a,b){var c=this;return Cb(b)||(b=Uc),new ce(function(d){return new Bc(b.scheduleWithRelative(a,function(){d.onCompleted()}),c.subscribe(d))},c)},ed.skipWithTime=function(a,b){var c=this;return Cb(b)||(b=Uc),new ce(function(d){var e=!1;return new Bc(b.scheduleWithRelative(a,function(){e=!0}),c.subscribe(function(a){e&&d.onNext(a)},d.onError.bind(d),d.onCompleted.bind(d)))},c)},ed.skipUntilWithTime=function(a,b){Cb(b)||(b=Uc);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new ce(function(e){var f=!1;return new Bc(b[d](a,function(){f=!0}),c.subscribe(function(a){f&&e.onNext(a)},function(a){e.onError(a)},function(){e.onCompleted()}))},c)},ed.takeUntilWithTime=function(a,b){Cb(b)||(b=Uc);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new ce(function(e){return new Bc(b[d](a,function(){e.onCompleted()}),c.subscribe(e))},c)},ed.throttleFirst=function(a,b){Cb(b)||(b=Uc);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new ce(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)},ed.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 ce(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)},ed.exclusive=function(){var a=this;return new ce(function(b){var c=!1,d=!1,e=new Gc,f=new Bc;return f.add(e),e.setDisposable(a.subscribe(function(a){if(!c){c=!0,Ib(a)&&(a=md(a));var e=new Gc;f.add(e),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){f.remove(e),c=!1,d&&1===f.length&&b.onCompleted()}))}},b.onError.bind(b),function(){d=!0,c||1!==f.length||b.onCompleted()})),f},this)},ed.exclusiveMap=function(a,b){var c=this,d=Yb(a,b,3);return new ce(function(a){var b=0,e=!1,f=!0,g=new Gc,h=new Bc;return h.add(g),g.setDisposable(c.subscribe(function(c){e||(e=!0,innerSubscription=new Gc,h.add(innerSubscription),Ib(c)&&(c=md(c)),innerSubscription.setDisposable(c.subscribe(function(e){var f;
5
- try{f=d(e,b++,c)}catch(g){return void a.onError(g)}a.onNext(f)},function(b){a.onError(b)},function(){h.remove(innerSubscription),e=!1,f&&1===h.length&&a.onCompleted()})))},function(b){a.onError(b)},function(){f=!0,1!==h.length||e||a.onCompleted()})),h},this)},Ab.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 e(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b),c)}function f(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b-this.now()),c)}function g(a,b){return b(),Fc}function h(b,g){this.clock=b,this.comparer=g,this.isEnabled=!1,this.queue=new zc(1024),a.call(this,c,d,e,f)}wc(h,a);var i=h.prototype;return i.add=b,i.toDateTimeOffset=b,i.toRelative=b,i.schedulePeriodicWithState=function(a,b,c){var d=new Nc(this,a,b,c);return d.start()},i.scheduleRelativeWithState=function(a,b,c){var d=this.add(this.clock,b);return this.scheduleAbsoluteWithState(a,d,c)},i.scheduleRelative=function(a,b){return this.scheduleRelativeWithState(b,a,g)},i.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)}},i.stop=function(){this.isEnabled=!1},i.advanceTo=function(a){var b=this.comparer(this.clock,a);if(this.comparer(this.clock,a)>0)throw new Error(Mb);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}},i.advanceBy=function(a){var b=this.add(this.clock,a),c=this.comparer(this.clock,b);if(c>0)throw new Error(Mb);0!==c&&this.advanceTo(b)},i.sleep=function(a){var b=this.add(this.clock,a);if(this.comparer(this.clock,b)>=0)throw new Error(Mb);this.clock=b},i.getNext=function(){for(;this.queue.length>0;){var a=this.queue.peek();if(!a.isCancelled())return a;this.queue.dequeue()}return null},i.scheduleAbsolute=function(a,b){return this.scheduleAbsoluteWithState(b,a,g)},i.scheduleAbsoluteWithState=function(a,b,c){function d(a,b){return e.queue.remove(f),c(a,b)}var e=this,f=new Jc(this,a,d,b,this.comparer);return this.queue.enqueue(f),f.disposable},h}(Kc),Ab.HistoricalScheduler=function(a){function b(b,c){var d=null==b?0:b,e=c||Gb;a.call(this,d,e)}wc(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}(Ab.VirtualTimeScheduler);var ce=Ab.AnonymousObservable=function(a){function b(a){return a&&"function"==typeof a.dispose?a:"function"==typeof a?Ec(a):Fc}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 de(a),e=[d,b];return Pc.scheduleRequired()?Pc.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return wc(d,a),d}(kd),de=function(a){function b(b){a.call(this),this.observer=b,this.m=new Gc}wc(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}(fd),ee=function(a){function b(a){return this.underlyingObservable.subscribe(a)}function c(c,d,e){a.call(this,b),this.key=c,this.underlyingObservable=e?new ce(function(a){return new Bc(e.getDisposable(),d.subscribe(a))}):d}return wc(c,a),c}(kd),fe=Ab.Subject=function(a){function d(a){return b(this),this.isStopped?this.hasError?(a.onError(this.error),Fc):(a.onCompleted(),Fc):(this.observers.push(a),new Td(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return wc(e,a),xc(e.prototype,cd.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 he(a,b)},e}(kd),ge=Ab.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(),Fc):(this.observers.push(a),new Td(this,a))}function e(){a.call(this,d),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return wc(e,a),xc(e.prototype,cd,{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}(kd),he=Ab.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 wc(c,a),xc(c.prototype,cd.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(kd);Ab.Pauser=function(a){function b(){a.call(this)}return wc(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(fe),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(vb.Rx=Ab,define(function(){return Ab})):wb&&xb?yb?(xb.exports=Ab).Rx=Ab:wb.Rx=Ab:vb.Rx=Ab;var ie=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(Nb&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(Rb)){for(var c=[],e=b;e;e=e.source)e.stack&&c.unshift(e.stack);c.unshift(a.stack);var f=c.join("\n"+Rb+"\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===Pb&&d>=Qb&&Ce>=d}function f(a){return-1!==a.indexOf("(module.js:")||-1!==a.indexOf("(node.js:")}function g(){if(Nb)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 Pb=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(!yc(a))return b;xc.nonEnumArgs&&a.length&&zc(a)&&(a=Cc.call(a));var c=xc.enumPrototypes&&"function"==typeof a,d=xc.enumErrorProps&&(a===sc||a instanceof Error);for(var e in a)c&&"prototype"==e||d&&("message"==e||"name"==e)||b.push(e);if(xc.nonEnumShadows&&a!==tc){var f=a.constructor,g=-1,h=ec;if(a===(f&&f.prototype))var i=a===uc?oc:a===sc?jc:pc.call(a),j=wc[i];for(;++g<h;)e=dc[g],j&&j[e]||!qc.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=pc.call(a),h=pc.call(b);if(g==fc&&(g=mc),h==fc&&(h=mc),g!=h)return!1;switch(g){case hc:case ic:return+a==+b;case lc:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case nc:case oc:return a==String(b)}var i=g==gc;if(!i){if(g!=mc||!xc.nodeClass&&(l(a)||l(b)))return!1;var j=!xc.argsObject&&zc(a)?Object:a.constructor,n=!xc.argsObject&&zc(b)?Object:b.constructor;if(!(j==n||qc.call(a,"constructor")&&qc.call(b,"constructor")||Mb(j)&&j instanceof j&&Mb(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 qc.call(f,e)?(p++,q=qc.call(a,e)&&m(a[e],b,c,d)):void 0}),q&&k(a,function(a,b,c){return qc.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 Ac.apply(this,arguments)}catch(a){return Gc.e=a,Gc}}function p(a){if(!Mb(a))throw new TypeError("fn must be a function");return Ac=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&&yb.isFinite(a)}function B(b){var c,d=b[Zb];if(!d&&"string"==typeof b)return c=new w(b),c[Zb]();if(!d&&b.length!==a)return c=new y(b),c[Zb]();if(!d)throw new TypeError("Object is not iterable");return b[Zb]()}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>Ed?Ed:b):b}function E(a,b){this.observer=a,this.parent=b}function F(a,b){return Wc(a)||(a=_c),new Gd(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 we(function(c){var d=new Qc,e=new Rc;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)}Kb(d)&&(d=xd(d));var g=new Qc;e.setDisposable(g),g.setDisposable(d.subscribe(c))},function(a){c.onCompleted(a)})),e},a)}function J(a,b){var c=this;return new we(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=cc(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return Kb(e)&&(e=xd(e)),(ac(e)||_b(e))&&(e=Fd(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=cc(b,c,3);return a.map(function(b,c){var e=d(b,c,a);return Kb(e)&&(e=xd(e)),(ac(e)||_b(e))&&(e=Fd(e)),e}).mergeAll()}function R(a,b,c){this.observer=a,this.predicate=b,this.source=c,this.i=0,this.isStopped=!1}function S(a,b,c){return new we(function(d){var e=!1,f=null,g=[];return a.subscribe(function(a){var h,i;try{i=b(a)}catch(j){return void d.onError(j)}if(h=0,e)try{h=c(i,f)}catch(k){return void d.onError(k)}else e=!0,f=i;h>0&&(f=i,g=[]),h>=0&&g.push(a)},function(a){d.onError(a)},function(){d.onNext(g),d.onCompleted()})},a)}function T(a){if(0===a.length)throw new Sb;return a[0]}function U(a,b,c,d){if(0>b)throw new Ub;return new we(function(e){var f=b;return a.subscribe(function(a){0===f--&&(e.onNext(a),e.onCompleted())},function(a){e.onError(a)},function(){c?(e.onNext(d),e.onCompleted()):e.onError(new Ub)})},a)}function V(a,b,c){return new we(function(d){var e=c,f=!1;return a.subscribe(function(a){f?d.onError(new Error("Sequence contains more than one element")):(e=a,f=!0)},function(a){d.onError(a)},function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Sb)})},a)}function W(a,b,c){return new we(function(d){return a.subscribe(function(a){d.onNext(a),d.onCompleted()},function(a){d.onError(a)},function(){b?(d.onNext(c),d.onCompleted()):d.onError(new Sb)})},a)}function X(a,b,c){return new we(function(d){var e=c,f=!1;return a.subscribe(function(a){e=a,f=!0},function(a){d.onError(a)},function(){f||b?(d.onNext(e),d.onCompleted()):d.onError(new Sb)})},a)}function Y(b,c,d,e){var f=cc(c,d,3);return new we(function(c){var d=0;return b.subscribe(function(a){var g;try{g=f(a,d,b)}catch(h){return void c.onError(h)}g?(c.onNext(e?d:a),c.onCompleted()):d++},function(a){c.onError(a)},function(){c.onNext(e?-1:a),c.onCompleted()})},b)}function Z(a,b){return Array.isArray(a)?$.call(b,a):cb(a)?de(a.call(b)):db(a)?de(a):bb(a)?_(a):Kb(a)?ab(a):typeof a===be?a:yc(a)||Array.isArray(a)?$.call(b,a):a}function $(a){var b=this;return function(c){function d(a,d){if(!e)try{if(a=Z(a,b),typeof a!==be)return h[d]=a,--g||c(null,h);a.call(b,function(a,b){if(!e){if(a)return e=!0,c(a);h[d]=b,--g||c(null,h)}})}catch(f){e=!0,c(f)}}var e,f=Object.keys(a),g=f.length,h=new a.constructor;if(!g)return void dd.schedule(function(){c(null,h)});for(var i=0,j=f.length;j>i;i++)d(a[f[i]],f[i])}}function _(a){return function(b){var c,d=!1;a.subscribe(function(a){c=a,d=!0},b,function(){d&&b(null,c)})}}function ab(a){return function(b){a.then(function(a){b(null,a)},b)}}function bb(a){return a&&typeof a.subscribe===be}function cb(a){return a&&a.constructor&&"GeneratorFunction"===a.constructor.name}function db(a){return a&&typeof a.next===be&&typeof a[ce]===be}function eb(a){a&&dd.schedule(function(){throw a})}function fb(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),Mc(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function gb(a,b,c){var d=new Jc;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(gb(a.item(e),b,c));else a&&d.add(fb(a,b,c));return d}function hb(a,b,c){return new we(function(d){function e(a,b){j[b]=a;var e;if(g[b]=!0,h||(h=g.every(Fb))){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 Jc(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)}function ib(a,b){return a.groupJoin(this,b,Bd,function(a,b){return b})}function jb(a){var b=this;return new we(function(c){var d=new ze,e=new Jc,f=new Sc(e);return c.onNext(Fc(d,f)),e.add(b.subscribe(function(a){d.onNext(a)},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),Kb(a)&&(a=xd(a)),e.add(a.subscribe(function(){d.onCompleted(),d=new ze,c.onNext(Fc(d,f))},function(a){d.onError(a),c.onError(a)},function(){d.onCompleted(),c.onCompleted()})),f},b)}function kb(a){var b=this;return new we(function(c){function d(){var b;try{b=a()}catch(f){return void c.onError(f)}Kb(b)&&(b=xd(b));var i=new Qc;e.setDisposable(i),i.setDisposable(b.take(1).subscribe(Eb,function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),h=new ze,c.onNext(Fc(h,g)),d()}))}var e=new Rc,f=new Jc(e),g=new Sc(f),h=new ze;return c.onNext(Fc(h,g)),f.add(b.subscribe(function(a){h.onNext(a)},function(a){h.onError(a),c.onError(a)},function(){h.onCompleted(),c.onCompleted()})),d(),g},b)}function lb(b,c){return new kd(function(){return new jd(function(){return b()?{done:!1,value:c}:{done:!0,value:a}})})}function mb(a){this.patterns=a}function nb(a,b){this.expression=a,this.selector=b}function ob(a,b,c){var d=a.get(b);if(!d){var e=new ue(b,c);return a.set(b,e),e}return d}function pb(a,b,c){this.joinObserverArray=a,this.onNext=b,this.onCompleted=c,this.joinObservers=new te;for(var d=0,e=this.joinObserverArray.length;e>d;d++){var f=this.joinObserverArray[d];this.joinObservers.set(f,f)}}function qb(a,b){return new we(function(c){return b.scheduleWithAbsolute(a,function(){c.onNext(0),c.onCompleted()})})}function rb(a,b,c){return new we(function(d){var e=a,f=Vc(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 sb(a,b){return new we(function(c){return b.scheduleWithRelative(Vc(a),function(){c.onNext(0),c.onCompleted()})})}function tb(a,b,c){return a===b?new we(function(a){return c.schedulePeriodicWithState(0,b,function(b){return a.onNext(b),b+1})}):zd(function(){return rb(c.now()+a,b,c)})}function ub(a,b,c){return new we(function(d){var e,f=!1,g=new Rc,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 Qc,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 Jc(e,g)},a)}function vb(a,b,c){return zd(function(){return ub(a,b-c.now(),c)})}function wb(a,b){return new we(function(c){function d(){g&&(g=!1,c.onNext(f)),e&&c.onCompleted()}var e,f,g;return new Jc(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 xb={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},yb=xb[typeof window]&&window||this,zb=xb[typeof exports]&&exports&&!exports.nodeType&&exports,Ab=xb[typeof module]&&module&&!module.nodeType&&module,Bb=Ab&&Ab.exports===zb&&zb,Cb=xb[typeof global]&&global;!Cb||Cb.global!==Cb&&Cb.window!==Cb||(yb=Cb);var Db={internals:{},config:{Promise:yb.Promise},helpers:{}},Eb=Db.helpers.noop=function(){},Fb=(Db.helpers.notDefined=function(a){return"undefined"==typeof a},Db.helpers.identity=function(a){return a}),Gb=(Db.helpers.pluck=function(a){return function(b){return b[a]}},Db.helpers.just=function(a){return function(){return a}},Db.helpers.defaultNow=Date.now),Hb=Db.helpers.defaultComparer=function(a,b){return Bc(a,b)},Ib=Db.helpers.defaultSubComparer=function(a,b){return a>b?1:b>a?-1:0},Jb=(Db.helpers.defaultKeySerializer=function(a){return a.toString()},Db.helpers.defaultError=function(a){throw a}),Kb=Db.helpers.isPromise=function(a){return!!a&&"function"==typeof a.then},Lb=(Db.helpers.asArray=function(){return Array.prototype.slice.call(arguments)},Db.helpers.not=function(a){return!a}),Mb=Db.helpers.isFunction=function(){var a=function(a){return"function"==typeof a||!1};return a(/x/)&&(a=function(a){return"function"==typeof a&&"[object Function]"==pc.call(a)}),a}();Db.config.longStackSupport=!1;var Nb=!1;try{throw new Error}catch(Ob){Nb=!!Ob.stack}var Pb,Qb=g(),Rb="From previous event:",Sb=Db.EmptyError=function(){this.message="Sequence contains no elements.",Error.call(this)};Sb.prototype=Error.prototype;var Tb=Db.ObjectDisposedError=function(){this.message="Object has been disposed",Error.call(this)};Tb.prototype=Error.prototype;var Ub=Db.ArgumentOutOfRangeError=function(){this.message="Argument out of range",Error.call(this)};Ub.prototype=Error.prototype;var Vb=Db.NotSupportedError=function(a){this.message=a||"This operation is not supported",Error.call(this)};Vb.prototype=Error.prototype;var Wb=Db.NotImplementedError=function(a){this.message=a||"This operation is not implemented",Error.call(this)};Wb.prototype=Error.prototype;var Xb=Db.helpers.notImplemented=function(){throw new Wb},Yb=Db.helpers.notSupported=function(){throw new Vb},Zb="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";yb.Set&&"function"==typeof(new yb.Set)["@@iterator"]&&(Zb="@@iterator");var $b=Db.doneEnumerator={done:!0,value:a},_b=Db.helpers.isIterable=function(b){return b[Zb]!==a},ac=Db.helpers.isArrayLike=function(b){return b&&b.length!==a};Db.helpers.iterator=Zb;var bc,cc=Db.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)}},dc=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],ec=dc.length,fc="[object Arguments]",gc="[object Array]",hc="[object Boolean]",ic="[object Date]",jc="[object Error]",kc="[object Function]",lc="[object Number]",mc="[object Object]",nc="[object RegExp]",oc="[object String]",pc=Object.prototype.toString,qc=Object.prototype.hasOwnProperty,rc=pc.call(arguments)==fc,sc=Error.prototype,tc=Object.prototype,uc=String.prototype,vc=tc.propertyIsEnumerable;try{bc=!(pc.call(document)==mc&&!({toString:0}+""))}catch(Ob){bc=!0}var wc={};wc[gc]=wc[ic]=wc[lc]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},wc[hc]=wc[oc]={constructor:!0,toString:!0,valueOf:!0},wc[jc]=wc[kc]=wc[nc]={constructor:!0,toString:!0},wc[mc]={constructor:!0};var xc={};!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);xc.enumErrorProps=vc.call(sc,"message")||vc.call(sc,"name"),xc.enumPrototypes=vc.call(a,"prototype"),xc.nonEnumArgs=0!=c,xc.nonEnumShadows=!/valueOf/.test(b)}(1);var yc=Db.internals.isObject=function(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1},zc=function(a){return a&&"object"==typeof a?pc.call(a)==fc:!1};rc||(zc=function(a){return a&&"object"==typeof a?qc.call(a,"callee"):!1});var Ac,Bc=Db.internals.isEqual=function(a,b){return m(a,b,[],[])},Cc=({}.hasOwnProperty,Array.prototype.slice),Dc=this.inherits=Db.internals.inherits=function(a,b){function c(){this.constructor=a}c.prototype=b.prototype,a.prototype=new c},Ec=Db.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]}},Fc=Db.internals.addRef=function(a,b){return new we(function(c){return new Jc(b.getDisposable(),a.subscribe(c))})},Gc={e:{}};r.prototype.compareTo=function(a){var b=this.value.compareTo(a.value);return 0===b&&(b=this.id-a.id),b};var Hc=Db.internals.PriorityQueue=function(a){this.items=new Array(a),this.length=0},Ic=Hc.prototype;Ic.isHigherPriority=function(a,b){return this.items[a].compareTo(this.items[b])<0},Ic.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)}}},Ic.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)}}},Ic.peek=function(){return this.items[0].value},Ic.removeAt=function(b){this.items[b]=this.items[--this.length],this.items[this.length]=a,this.heapify()},Ic.dequeue=function(){var a=this.peek();return this.removeAt(0),a},Ic.enqueue=function(a){var b=this.length++;this.items[b]=new r(Hc.count++,a),this.percolate(b)},Ic.remove=function(a){for(var b=0;b<this.length;b++)if(this.items[b].value===a)return this.removeAt(b),!0;return!1},Hc.count=0;var Jc=Db.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(!Oc(c[a]))throw new TypeError("Not a disposable");this.disposables=c,this.isDisposed=!1,this.length=c.length},Kc=Jc.prototype;Kc.add=function(a){this.isDisposed?a.dispose():(this.disposables.push(a),this.length++)},Kc.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},Kc.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 Lc=Db.Disposable=function(a){this.isDisposed=!1,this.action=a||Eb};Lc.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var Mc=Lc.create=function(a){return new Lc(a)},Nc=Lc.empty={dispose:Eb},Oc=Lc.isDisposable=function(a){return a&&Mb(a.dispose)},Pc=Lc.checkDisposed=function(a){if(a.isDisposed)throw new Tb},Qc=Db.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null};Qc.prototype.getDisposable=function(){return this.current},Qc.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()},Qc.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var Rc=Db.SerialDisposable=function(){this.isDisposed=!1,this.current=null};Rc.prototype.getDisposable=function(){return this.current},Rc.prototype.setDisposable=function(a){var b=this.isDisposed;if(!b){var c=this.current;this.current=a}c&&c.dispose(),b&&a&&a.dispose()},Rc.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var a=this.current;this.current=null}a&&a.dispose()};var Sc=Db.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?Nc:new a(this)},b}();t.prototype.dispose=function(){this.scheduler.scheduleWithState(this,u)};var Tc=Db.internals.ScheduledItem=function(a,b,c,d,e){this.scheduler=a,this.state=b,this.action=c,this.dueTime=d,this.comparer=e||Ib,this.disposable=new Qc};Tc.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},Tc.prototype.compareTo=function(a){return this.comparer(this.dueTime,a.dueTime)},Tc.prototype.isCancelled=function(){return this.disposable.isDisposed},Tc.prototype.invokeCore=function(){return this.action(this.scheduler,this.state)};var Uc=Db.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(),Nc}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=Gb,a.normalize=function(a){return 0>a&&(a=0),a},a}(),Vc=Uc.normalize,Wc=Uc.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),Nc});e||(f.add(g),d=!0)})}var d=b[0],e=b[1],f=new Jc;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),Nc});h||(g.add(i),f=!0)})}var e=b[0],f=b[1],g=new Jc;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")})}}(Uc.prototype),function(){Uc.prototype.schedulePeriodic=function(a,b){return this.schedulePeriodicWithState(null,a,b)},Uc.prototype.schedulePeriodicWithState=function(a,b,c){if("undefined"==typeof yb.setInterval)throw new Vb;b=Vc(b);var d=a,e=yb.setInterval(function(){d=c(d)},b);return Mc(function(){yb.clearInterval(e)})}}(Uc.prototype),function(a){a.catchError=a["catch"]=function(a){return new ed(this,a)}}(Uc.prototype);var Xc,Yc,Zc=Db.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 Qc;return this._cancel=b,b.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0,this._period,a.bind(this))),b},b}(),$c=Uc.immediate=function(){function a(a,b){return b(this,a)}return new Uc(Gb,a,Yb,Yb)}(),_c=Uc.currentThread=function(){function a(){for(;c.length>0;){var a=c.dequeue();!a.isCancelled()&&a.invoke()}}function b(b,d){var e=new Tc(this,b,d,this.now());if(c)c.enqueue(e);else{c=new Hc(4),c.enqueue(e);var f=p(a)();if(c=null,f===Gc)return q(f.e)}return e.disposable}var c,d=new Uc(Gb,b,Yb,Yb);return d.scheduleRequired=function(){return!c},d}(),ad=function(){var a,b=Eb;if(yb.setTimeout)a=yb.setTimeout,b=yb.clearTimeout;else{if(!yb.WScript)throw new Vb;a=function(a,b){yb.WScript.Sleep(b),a()}}return{setTimeout:a,clearTimeout:b}}(),bd=ad.setTimeout,cd=ad.clearTimeout;!function(){function a(b){if(f)bd(function(){a(b)},0);else{var c=e[b];if(c){f=!0;var d=p(c)();if(Yc(b),f=!1,d===Gc)return q(d.e)}}}function b(){if(!yb.postMessage||yb.importScripts)return!1;var a=!1,b=yb.onmessage;return yb.onmessage=function(){a=!0},yb.postMessage("","*"),yb.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;Yc=function(a){delete e[a]};var g=RegExp("^"+String(pc).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),h="function"==typeof(h=Cb&&Bb&&Cb.setImmediate)&&!g.test(h)&&h;if(Mb(h))Xc=function(b){var c=d++;return e[c]=b,h(function(){a(c)}),c};else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))Xc=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();yb.addEventListener?yb.addEventListener("message",c,!1):yb.attachEvent?yb.attachEvent("onmessage",c):yb.onmessage=c,Xc=function(a){var b=d++;return e[b]=a,yb.postMessage(i+currentId,"*"),b}}else if(yb.MessageChannel){var j=new yb.MessageChannel;j.port1.onmessage=function(b){a(b.data)},Xc=function(a){var b=d++;return e[b]=a,j.port2.postMessage(b),b}}else Xc="document"in yb&&"onreadystatechange"in yb.document.createElement("script")?function(b){var c=yb.document.createElement("script"),f=d++;return e[f]=b,c.onreadystatechange=function(){a(f),c.onreadystatechange=null,c.parentNode.removeChild(c),c=null},yb.document.documentElement.appendChild(c),f}:function(b){var c=d++;return e[c]=b,bd(function(){a(c)},0),c}}();var dd=Uc.timeout=Uc["default"]=function(){function a(a,b){var c=this,d=new Qc,e=Xc(function(){!d.isDisposed&&d.setDisposable(b(c,a))});return new Jc(d,Mc(function(){Yc(e)}))}function b(a,b,c){var d=this,e=Uc.normalize(b),f=new Qc;if(0===e)return d.scheduleWithState(a,c);var g=bd(function(){!f.isDisposed&&f.setDisposable(c(d,a))},e);return new Jc(f,Mc(function(){cd(g)}))}function c(a,b,c){return this.scheduleWithRelativeAndState(a,b-this.now(),c)}return new Uc(Gb,a,b,c)}(),ed=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 Dc(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 Nc}}},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 Qc;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}(Uc),fd=Db.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 Wc(a)||(a=$c),new we(function(c){return a.scheduleWithState(b,function(a,b){b._acceptObservable(c),"N"===b.kind&&c.onCompleted()})})},a}(),gd=fd.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 fd("N",d,null,a,b,c)}}(),hd=fd.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 fd("E",null,d,a,b,c)}}(),id=fd.createOnCompleted=function(){function a(a,b,c){return c()}function b(a){return a.onCompleted()}function c(){return"OnCompleted()"}return function(){return new fd("C",null,null,a,b,c)}}(),jd=Db.internals.Enumerator=function(a){this._next=a};jd.prototype.next=function(){return this._next()},jd.prototype[Zb]=function(){return this};var kd=Db.internals.Enumerable=function(a){this._iterator=a};kd.prototype[Zb]=function(){return this._iterator()},kd.prototype.concat=function(){var a=this;return new we(function(b){var c,d=a[Zb](),e=new Rc,f=$c.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;Kb(h)&&(h=xd(h));var i=new Qc;e.setDisposable(i),i.setDisposable(h.subscribe(function(a){b.onNext(a)},function(a){b.onError(a)},a))}});return new Jc(e,f,Mc(function(){c=!0}))})},kd.prototype.catchError=function(){var a=this;return new we(function(b){var c,d=a[Zb](),e=new Rc,f=$c.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;Kb(i)&&(i=xd(i));var j=new Qc;e.setDisposable(j),j.setDisposable(i.subscribe(function(a){b.onNext(a)},f,function(){b.onCompleted()}))}});return new Jc(e,f,Mc(function(){c=!0}))})},kd.prototype.catchErrorWhen=function(a){var b=this;return new we(function(c){var d,e,f=new ze,g=new ze,h=a(f),i=h.subscribe(g),j=b[Zb](),k=new Rc,l=$c.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;Kb(i)&&(i=xd(i));var l=new Qc,m=new Qc;k.setDisposable(new Jc(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 Jc(i,k,l,Mc(function(){d=!0}))})};var ld=kd.repeat=function(a,b){return null==b&&(b=-1),new kd(function(){var c=b;return new jd(function(){return 0===c?$b:(c>0&&c--,{done:!1,value:a})})})},md=kd.of=function(a,b,c){if(b)var d=cc(b,c,3);return new kd(function(){var c=-1;return new jd(function(){return++c<a.length?{done:!1,value:b?d(a[c],c,a):a[c]}:$b})})},nd=Db.Observer=function(){};nd.prototype.toNotifier=function(){var a=this;return function(b){return b.accept(a)}},nd.prototype.asObserver=function(){return new rd(this.onNext.bind(this),this.onError.bind(this),this.onCompleted.bind(this))},nd.prototype.checked=function(){return new sd(this)};var od=nd.create=function(a,b,c){return a||(a=Eb),b||(b=Jb),c||(c=Eb),new rd(a,b,c)};nd.fromNotifier=function(a,b){return new rd(function(c){return a.call(b,gd(c))},function(c){return a.call(b,hd(c))},function(){return a.call(b,id())})},nd.prototype.notifyOn=function(a){return new ud(a,this)},nd.prototype.makeSafe=function(a){return new AnonymousSafeObserver(this._onNext,this._onError,this._onCompleted,a)};var pd,qd=Db.internals.AbstractObserver=function(a){function b(){this.isStopped=!1,a.call(this)}return Dc(b,a),b.prototype.next=Xb,b.prototype.error=Xb,b.prototype.completed=Xb,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}(nd),rd=Db.AnonymousObserver=function(a){function b(b,c,d){a.call(this),this._onNext=b,this._onError=c,this._onCompleted=d}return Dc(b,a),b.prototype.next=function(a){this._onNext(a)
3
+ },b.prototype.error=function(a){this._onError(a)},b.prototype.completed=function(){this._onCompleted()},b}(qd),sd=function(a){function b(b){a.call(this),this._observer=b,this._state=0}Dc(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===Gc&&q(b.e)},c.onError=function(a){this.checkAccess();var b=p(this._observer.onError).call(this._observer,a);this._state=2,b===Gc&&q(b.e)},c.onCompleted=function(){this.checkAccess();var a=p(this._observer.onCompleted).call(this._observer);this._state=2,a===Gc&&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}(nd),td=Db.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 Rc}return Dc(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}(qd),ud=function(a){function b(b,c,d){a.call(this,b,c),this._cancel=d}return Dc(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}(td),vd=Db.Observable=function(){function a(a){if(Db.config.longStackSupport&&Nb){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 pd=a.prototype,pd.subscribe=pd.forEach=function(a,b,c){return this._subscribe("object"==typeof a?a:od(a,b,c))},pd.subscribeOnNext=function(a,b){return this._subscribe(od("undefined"!=typeof b?function(c){a.call(b,c)}:a))},pd.subscribeOnError=function(a,b){return this._subscribe(od(null,"undefined"!=typeof b?function(c){a.call(b,c)}:a))},pd.subscribeOnCompleted=function(a,b){return this._subscribe(od(null,null,"undefined"!=typeof b?function(){a.call(b)}:a))},a}(),wd=Db.ObservableBase=function(a){function b(a){return a&&Mb(a.dispose)?a:Mb(a)?Mc(a):Nc}function c(a,c){var d=c[0],e=c[1],f=p(e.subscribeCore).call(e,d);return f!==Gc||d.fail(Gc.e)?void d.setDisposable(b(f)):q(Gc.e)}function d(a){var b=new xe(a),d=[b,this];return _c.scheduleRequired()?_c.scheduleWithState(d,c):c(null,d),b}function e(){a.call(this,d)}return Dc(e,a),e.prototype.subscribeCore=Xb,e}(vd);pd.observeOn=function(a){var b=this;return new we(function(c){return b.subscribe(new ud(a,c))},b)},pd.subscribeOn=function(a){var b=this;return new we(function(c){var d=new Qc,e=new Rc;return e.setDisposable(d),d.setDisposable(a.schedule(function(){e.setDisposable(new t(a,b.subscribe(c)))})),e},b)};var xd=vd.fromPromise=function(a){return zd(function(){var b=new Db.AsyncSubject;return a.then(function(a){b.onNext(a),b.onCompleted()},b.onError.bind(b)),b})};pd.toPromise=function(a){if(a||(a=Db.config.Promise),!a)throw new Vb("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 yd=function(a){function b(b){this.source=b,a.call(this)}return Dc(b,a),b.prototype.subscribeCore=function(a){return this.source.subscribe(new v(a))},b}(wd);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)},pd.toArray=function(){return new yd(this)},vd.create=vd.createWithDisposable=function(a,b){return new we(a,b)};var zd=vd.defer=function(a){return new we(function(b){var c;try{c=a()}catch(d){return Qd(d).subscribe(b)}return Kb(c)&&(c=xd(c)),c.subscribe(b)})},Ad=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 Dc(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}(wd),Bd=vd.empty=function(a){return Wc(a)||(a=$c),new Ad(a)},Cd=function(a){function b(b,c,d){this.iterable=b,this.mapper=c,this.scheduler=d,a.call(this)}return Dc(b,a),b.prototype.subscribeCore=function(a){var b=new Dd(a,this);return b.run()},b}(wd),Dd=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}(),Ed=Math.pow(2,53)-1;w.prototype[Zb]=function(){return new x(this._s)},x.prototype[Zb]=function(){return this},x.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:$b},y.prototype[Zb]=function(){return new z(this._a)},z.prototype[Zb]=function(){return this},z.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:$b};var Fd=vd.from=function(a,b,c,d){if(null==a)throw new Error("iterable cannot be null.");if(b&&!Mb(b))throw new Error("mapFn when provided must be a function");if(b)var e=cc(b,c,2);return Wc(d)||(d=_c),new Cd(a,e,d)},Gd=function(a){function b(b,c){this.args=b,this.scheduler=c,a.call(this)}return Dc(b,a),b.prototype.subscribeCore=function(a){var b=new E(a,this);return b.run()},b}(wd);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 Hd=vd.fromArray=function(a,b){return Wc(b)||(b=_c),new Gd(a,b)};vd.generate=function(a,b,c,d,e){return Wc(e)||(e=_c),new we(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()})})},vd.of=function(){for(var a=arguments.length,b=new Array(a),c=0;a>c;c++)b[c]=arguments[c];return new Gd(b,_c)},vd.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 Gd(c,a)},vd.ofArrayChanges=function(a){if(!Array.isArray(a))throw new TypeError("Array.observe only accepts arrays.");if("function"!=typeof Array.observe&&"function"!=typeof Array.unobserve)throw new TypeError("Array.observe is not supported on your platform");return new we(function(b){function c(a){for(var c=0,d=a.length;d>c;c++)b.onNext(a[c])}return Array.observe(a,c),function(){Array.unobserve(a,c)}})},vd.ofObjectChanges=function(a){if(null==a)throw new TypeError("object must not be null or undefined.");if("function"!=typeof Object.observe&&"function"!=typeof Object.unobserve)throw new TypeError("Array.observe is not supported on your platform");return new we(function(b){function c(a){for(var c=0,d=a.length;d>c;c++)b.onNext(a[c])}return Object.observe(a,c),function(){Object.unobserve(a,c)}})};var Id=function(a){function b(){a.call(this)}return Dc(b,a),b.prototype.subscribeCore=function(){return Nc},b}(wd),Jd=vd.never=function(){return new Id},Kd=function(a){function b(b,c){this.obj=b,this.keys=Object.keys(b),this.scheduler=c,a.call(this)}return Dc(b,a),b.prototype.subscribeCore=function(a){var b=new G(a,this);return b.run()},b}(wd);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)},vd.pairs=function(a,b){return b||(b=_c),new Kd(a,b)};var Ld=function(a){function b(b,c,d){this.start=b,this.count=c,this.scheduler=d,a.call(this)}return Dc(b,a),b.prototype.subscribeCore=function(a){var b=new Md(a,this);return b.run()},b}(wd),Md=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}();vd.range=function(a,b,c){return Wc(c)||(c=_c),new Ld(a,b,c)};var Nd=function(a){function b(b,c,d){this.value=b,this.repeatCount=null==c?-1:c,this.scheduler=d,a.call(this)}return Dc(b,a),b.prototype.subscribeCore=function(a){var b=new H(a,this);return b.run()},b}(wd);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)},vd.repeat=function(a,b,c){return Wc(c)||(c=_c),new Nd(a,b,c)};var Od=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 Dc(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}(wd),Pd=(vd["return"]=vd.just=vd.returnValue=function(a,b){return Wc(b)||(b=$c),new Od(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 Dc(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}(wd)),Qd=vd["throw"]=vd.throwError=vd.throwException=function(a,b){return Wc(b)||(b=$c),new Pd(a,b)};vd.using=function(a,b){return new we(function(c){var d,e,f=Nc;try{d=a(),d&&(f=d),e=b(d)}catch(g){return new Jc(Qd(g).subscribe(c),f)}return new Jc(e.subscribe(c),f)})},pd.amb=function(a){var b=this;return new we(function(c){function d(){f||(f=g,j.dispose())}function e(){f||(f=h,i.dispose())}var f,g="L",h="R",i=new Qc,j=new Qc;return Kb(a)&&(a=xd(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 Jc(i,j)})},vd.amb=function(){function a(a,b){return a.amb(b)}var b=Jd(),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},pd["catch"]=pd.catchError=pd.catchException=function(a){return"function"==typeof a?I(this,a):Rd([this,a])};var Rd=vd.catchError=vd["catch"]=vd.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 md(a).catchError()};pd.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),Sd.apply(this,b)};var Sd=vd.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 we(function(a){function c(b){if(h[b]=!0,i||(i=h.every(Fb))){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(Fb)&&a.onCompleted()}function e(b){j[b]=!0,j.every(Fb)&&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 Qc;Kb(f)&&(f=xd(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 Jc(l)},this)};pd.concat=function(){for(var a=[],b=0,c=arguments.length;c>b;b++)a.push(arguments[b]);return a.unshift(this),Td.apply(null,a)};var Td=vd.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 md(a).concat()};pd.concatAll=pd.concatObservable=function(){return this.merge(1)};var Ud=function(a){function b(b,c){this.source=b,this.maxConcurrent=c,a.call(this)}return Dc(b,a),b.prototype.subscribeCore=function(a){var b=new Jc;return b.add(this.source.subscribe(new Vd(a,this.maxConcurrent,b))),b},b}(wd),Vd=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 Qc;this.g.add(c),Kb(a)&&(a=xd(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}();pd.merge=function(a){return"number"!=typeof a?Wd(this,a):new Ud(this,a)};var Wd=vd.merge=function(){var a,b,c=[],d=arguments.length;if(arguments[0])if(Wc(arguments[0]))for(a=arguments[0],b=1;d>b;b++)c.push(arguments[b]);else for(a=$c,b=0;d>b;b++)c.push(arguments[b]);else for(a=$c,b=1;d>b;b++)c.push(arguments[b]);return Array.isArray(c[0])&&(c=c[0]),F(a,c).mergeAll()},Xd=function(a){function b(b){this.source=b,a.call(this)}return Dc(b,a),b.prototype.subscribeCore=function(a){var b=new Jc,c=new Qc;return b.add(c),c.setDisposable(this.source.subscribe(new Yd(a,b))),b},b}(wd),Yd=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 Qc;this.g.add(c),Kb(a)&&(a=xd(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}();pd.mergeAll=pd.mergeObservable=function(){return new Xd(this)};var Zd=Db.CompositeError=function(a){this.name="NotImplementedError",this.innerErrors=a,this.message="This contains multiple errors. Check the innerErrors",Error.call(this)};Zd.prototype=Error.prototype,vd.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 we(function(a){function b(){0===g.length?a.onCompleted():a.onError(1===g.length?g[0]:new Zd(g))}var c=new Jc,e=new Qc,f=!1,g=[];return c.add(e),e.setDisposable(d.subscribe(function(d){var e=new Qc;c.add(e),Kb(d)&&(d=xd(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})},pd.onErrorResumeNext=function(a){if(!a)throw new Error("Second observable is required");return $d([this,a])};var $d=vd.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 we(function(b){var c=0,d=new Rc,e=$c.scheduleRecursive(function(e){var f,g;c<a.length?(f=a[c++],Kb(f)&&(f=xd(f)),g=new Qc,d.setDisposable(g),g.setDisposable(f.subscribe(b.onNext.bind(b),e,e))):b.onCompleted()});return new Jc(d,e)})};pd.skipUntil=function(a){var b=this;return new we(function(c){var d=!1,e=new Jc(b.subscribe(function(a){d&&c.onNext(a)},function(a){c.onError(a)},function(){d&&c.onCompleted()}));Kb(a)&&(a=xd(a));var f=new Qc;return e.add(f),f.setDisposable(a.subscribe(function(){d=!0,f.dispose()},function(a){c.onError(a)},function(){f.dispose()})),e},b)},pd["switch"]=pd.switchLatest=function(){var a=this;return new we(function(b){var c=!1,d=new Rc,e=!1,f=0,g=a.subscribe(function(a){var g=new Qc,h=++f;c=!0,d.setDisposable(g),Kb(a)&&(a=xd(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 Jc(g,d)},a)},pd.takeUntil=function(a){var b=this;return new we(function(c){return Kb(a)&&(a=xd(a)),new Jc(b.subscribe(c),a.subscribe(function(){c.onCompleted()},function(a){c.onError(a)},Eb))},b)},pd.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 we(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 Qc;Kb(d)&&(d=xd(d)),e.setDisposable(d.subscribe(function(a){i[c]=a,g[c]=!0,h=g.every(Fb)},a.onError.bind(a),function(){})),j[c]=e}(k);var l=new Qc;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 Jc(j)},this)},pd.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 we(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(Fb)&&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 Qc;Kb(e)&&(e=xd(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 Jc(j)},d)},vd.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)},vd.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 we(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(Fb))return void b.onCompleted()}function d(a){return g[a]=!0,g.every(Fb)?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 Qc,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 Jc(h)})},pd.asObservable=function(){var a=this;return new we(function(b){return a.subscribe(b)},this)},pd.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})},pd.dematerialize=function(){var a=this;return new we(function(b){return a.subscribe(function(a){return a.accept(b)},function(a){b.onError(a)},function(){b.onCompleted()})},this)},pd.distinctUntilChanged=function(a,b){var c=this;return b||(b=Hb),new we(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)},pd["do"]=pd.tap=pd.doAction=function(a,b,c){var d=this;return new we(function(e){var f=!a||Mb(a)?od(a||Eb,b||Eb,c||Eb):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)},pd.doOnNext=pd.tapOnNext=function(a,b){return this.tap("undefined"!=typeof b?function(c){a.call(b,c)}:a)},pd.doOnError=pd.tapOnError=function(a,b){return this.tap(Eb,"undefined"!=typeof b?function(c){a.call(b,c)}:a)},pd.doOnCompleted=pd.tapOnCompleted=function(a,b){return this.tap(Eb,null,"undefined"!=typeof b?function(){a.call(b)}:a)},pd["finally"]=pd.ensure=function(a){var b=this;return new we(function(c){var d;try{d=b.subscribe(c)}catch(e){throw a(),e}return Mc(function(){try{d.dispose()}catch(b){throw b}finally{a()}})},this)},pd.finallyAction=function(a){return this.ensure(a)},pd.ignoreElements=function(){var a=this;return new we(function(b){return a.subscribe(Eb,function(a){b.onError(a)},function(){b.onCompleted()})},a)},pd.materialize=function(){var a=this;return new we(function(b){return a.subscribe(function(a){b.onNext(gd(a))},function(a){b.onNext(hd(a)),b.onCompleted()},function(){b.onNext(id()),b.onCompleted()})},a)},pd.repeat=function(a){return ld(this,a).concat()},pd.retry=function(a){return ld(this,a).catchError()},pd.retryWhen=function(a){return ld(this).catchErrorWhen(a)},pd.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 we(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)},pd.skipLast=function(a){if(0>a)throw new Ub;var b=this;return new we(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)},pd.startWith=function(){var a,b=0;arguments.length&&Wc(arguments[0])?(a=arguments[0],b=1):a=$c;for(var c=[],d=b,e=arguments.length;e>d;d++)c.push(arguments[d]);return md([Hd(c,a),this]).concat()},pd.takeLast=function(a){if(0>a)throw new Ub;var b=this;return new we(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)},pd.takeLastBuffer=function(a){var b=this;return new we(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)},pd.windowWithCount=function(a,b){var c=this;if(+a||(a=0),1/0===Math.abs(a)&&(a=0),0>=a)throw new Ub;if(null==b&&(b=a),+b||(b=0),1/0===Math.abs(b)&&(b=0),0>=b)throw new Ub;return new we(function(d){function e(){var a=new ze;i.push(a),d.onNext(Fc(a,g))}var f=new Qc,g=new Sc(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)},pd.selectConcat=pd.concatMap=function(a,b,c){return Mb(a)&&Mb(b)?this.concatMap(function(c,d){var e=a(c,d);return Kb(e)&&(e=xd(e)),(ac(e)||_b(e))&&(e=Fd(e)),e.map(function(a,e){return b(c,a,d,e)})}):Mb(a)?M(this,a,c):M(this,function(){return a})},pd.concatMapObserver=pd.selectConcatObserver=function(a,b,c,d){var e=this,f=cc(a,d,2),g=cc(b,d,1),h=cc(c,d,0);return new we(function(a){var b=0;return e.subscribe(function(c){var d;try{d=f(c,b++)}catch(e){return void a.onError(e)}Kb(d)&&(d=xd(d)),a.onNext(d)},function(b){var c;try{c=g(b)}catch(d){return void a.onError(d)}Kb(c)&&(c=xd(c)),a.onNext(c),a.onCompleted()},function(){var b;try{b=h()}catch(c){return void a.onError(c)}Kb(b)&&(b=xd(b)),a.onNext(b),a.onCompleted()})},this).concatAll()},pd.defaultIfEmpty=function(b){var c=this;return b===a&&(b=null),new we(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},pd.distinct=function(a,b){var c=this;return b||(b=Hb),new we(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)},pd.groupBy=function(a,b,c){return this.groupByUntil(a,b,Jd,c)},pd.groupByUntil=function(a,b,c,d){var e=this;return b||(b=Fb),d||(d=Hb),new we(function(f){function g(a){return function(b){b.onError(a)}}var h=new qe(0,d),i=new Jc,j=new Sc(i);return i.add(e.subscribe(function(d){var e;try{e=a(d)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}var l=!1,m=h.tryGetValue(e);if(m||(m=new ze,h.set(e,m),l=!0),l){var n=new ye(e,m,j),o=new ye(e,m);try{duration=c(o)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}f.onNext(n);var p=new Qc;i.add(p);var q=function(){h.remove(e)&&m.onCompleted(),i.remove(p)};p.setDisposable(duration.take(1).subscribe(Eb,function(a){h.getValues().forEach(g(a)),f.onError(a)},q))}var r;try{r=b(d)}catch(k){return h.getValues().forEach(g(k)),void f.onError(k)}m.onNext(r)},function(a){h.getValues().forEach(g(a)),f.onError(a)},function(){h.getValues().forEach(function(a){a.onCompleted()}),f.onCompleted()})),j},e)};var _d=function(a){function b(b,c,d){this.source=b,this.selector=cc(c,d,3),a.call(this)}return Dc(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}(wd);P.prototype.onNext=function(a){if(!this.isStopped){var b=p(this.selector).call(this,a,this.i++,this.source);return b===Gc?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)},pd.map=pd.select=function(a,b){var c="function"==typeof a?a:function(){return a};return this instanceof _d?this.internalMap(c,b):new _d(this,c,b)},pd.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})},pd.selectMany=pd.flatMap=function(a,b,c){return Mb(a)&&Mb(b)?this.flatMap(function(c,d){var e=a(c,d);return Kb(e)&&(e=xd(e)),(ac(e)||_b(e))&&(e=Fd(e)),e.map(function(a,e){return b(c,a,d,e)})},c):Mb(a)?Q(this,a,c):Q(this,function(){return a})},pd.flatMapObserver=pd.selectManyObserver=function(a,b,c,d){var e=this;return new we(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)}Kb(c)&&(c=xd(c)),f.onNext(c)},function(a){var c;try{c=b.call(d,a)}catch(e){return void f.onError(e)}Kb(c)&&(c=xd(c)),f.onNext(c),f.onCompleted()},function(){var a;try{a=c.call(d)}catch(b){return void f.onError(b)}Kb(a)&&(a=xd(a)),f.onNext(a),f.onCompleted()})},e).mergeAll()},pd.selectSwitch=pd.flatMapLatest=pd.switchMap=function(a,b){return this.select(a,b).switchLatest()},pd.skip=function(a){if(0>a)throw new Ub;var b=this;return new we(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)},pd.skipWhile=function(a,b){var c=this,d=cc(a,b,3);return new we(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)},pd.take=function(a,b){if(0>a)throw new Ub;if(0===a)return Bd(b);var c=this;return new we(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)},pd.takeWhile=function(a,b){var c=this,d=cc(a,b,3);return new we(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 ae=function(a){function b(b,c,d){this.source=b,this.predicate=cc(c,d,3),a.call(this)}return Dc(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}(wd);R.prototype.onNext=function(a){if(!this.isStopped){var b=p(this.predicate).call(this,a,this.i++,this.source);return b===Gc?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)},pd.filter=pd.where=function(a,b){return this instanceof ae?this.internalFilter(a,b):new ae(this,a,b)},pd.aggregate=function(){var a,b,c=!1,d=this;return 2===arguments.length?(c=!0,b=arguments[0],a=arguments[1]):a=arguments[0],new we(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);
4
+ try{f?g=a(g,d):(g=c?a(b,d):d,f=!0)}catch(i){return e.onError(i)}},function(a){e.onError(a)},function(){h&&e.onNext(g),!h&&c&&e.onNext(b),!h&&!c&&e.onError(new Sb),e.onCompleted()})},d)},pd.reduce=function(a){var b,c=!1,d=this;return 2===arguments.length&&(c=!0,b=arguments[1]),new we(function(e){var f,g,h;return d.subscribe(function(d){!h&&(h=!0);try{f?g=a(g,d):(g=c?a(b,d):d,f=!0)}catch(i){return e.onError(i)}},function(a){e.onError(a)},function(){h&&e.onNext(g),!h&&c&&e.onNext(b),!h&&!c&&e.onError(new Sb),e.onCompleted()})},d)},pd.some=function(a,b){var c=this;return a?c.filter(a,b).some():new we(function(a){return c.subscribe(function(){a.onNext(!0),a.onCompleted()},function(b){a.onError(b)},function(){a.onNext(!1),a.onCompleted()})},c)},pd.any=function(){return this.some.apply(this,arguments)},pd.isEmpty=function(){return this.any().map(Lb)},pd.every=function(a,b){return this.filter(function(b){return!a(b)},b).some().map(Lb)},pd.all=function(){return this.every.apply(this,arguments)},pd.includes=function(a,b){function c(a,b){return 0===a&&0===b||a===b||isNaN(a)&&isNaN(b)}var d=this;return new we(function(e){var f=0,g=+b||0;return 1/0===Math.abs(g)&&(g=0),0>g?(e.onNext(!1),e.onCompleted(),Nc):d.subscribe(function(b){f++>=g&&c(b,a)&&(e.onNext(!0),e.onCompleted())},function(a){e.onError(a)},function(){e.onNext(!1),e.onCompleted()})},this)},pd.contains=function(a,b){pd.includes(a,b)},pd.count=function(a,b){return a?this.filter(a,b).count():this.reduce(function(a){return a+1},0)},pd.indexOf=function(a,b){var c=this;return new we(function(d){var e=0,f=+b||0;return 1/0===Math.abs(f)&&(f=0),0>f?(d.onNext(-1),d.onCompleted(),Nc):c.subscribe(function(b){e>=f&&b===a&&(d.onNext(e),d.onCompleted()),e++},function(a){d.onError(a)},function(){d.onNext(-1),d.onCompleted()})},c)},pd.sum=function(a,b){return a&&Mb(a)?this.map(a,b).sum():this.reduce(function(a,b){return a+b},0)},pd.minBy=function(a,b){return b||(b=Ib),S(this,a,function(a,c){return-1*b(a,c)})},pd.min=function(a){return this.minBy(Fb,a).map(function(a){return T(a)})},pd.maxBy=function(a,b){return b||(b=Ib),S(this,a,b)},pd.max=function(a){return this.maxBy(Fb,a).map(function(a){return T(a)})},pd.average=function(a,b){return a&&Mb(a)?this.map(a,b).average():this.reduce(function(a,b){return{sum:a.sum+b,count:a.count+1}},{sum:0,count:0}).map(function(a){if(0===a.count)throw new Sb;return a.sum/a.count})},pd.sequenceEqual=function(a,b){var c=this;return b||(b=Hb),new we(function(d){var e=!1,f=!1,g=[],h=[],i=c.subscribe(function(a){var c,e;if(h.length>0){e=h.shift();try{c=b(e,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else f?(d.onNext(!1),d.onCompleted()):g.push(a)},function(a){d.onError(a)},function(){e=!0,0===g.length&&(h.length>0?(d.onNext(!1),d.onCompleted()):f&&(d.onNext(!0),d.onCompleted()))});(ac(a)||_b(a))&&(a=Fd(a)),Kb(a)&&(a=xd(a));var j=a.subscribe(function(a){var c;if(g.length>0){var f=g.shift();try{c=b(f,a)}catch(i){return void d.onError(i)}c||(d.onNext(!1),d.onCompleted())}else e?(d.onNext(!1),d.onCompleted()):h.push(a)},function(a){d.onError(a)},function(){f=!0,0===h.length&&(g.length>0?(d.onNext(!1),d.onCompleted()):e&&(d.onNext(!0),d.onCompleted()))});return new Jc(i,j)},c)},pd.elementAt=function(a){return U(this,a,!1)},pd.elementAtOrDefault=function(a,b){return U(this,a,!0,b)},pd.single=function(a,b){return a&&Mb(a)?this.where(a,b).single():V(this,!1)},pd.singleOrDefault=function(a,b,c){return a&&Mb(a)?this.filter(a,c).singleOrDefault(null,b):V(this,!0,b)},pd.first=function(a,b){return a?this.where(a,b).first():W(this,!1)},pd.firstOrDefault=function(a,b){return a?this.where(a).firstOrDefault(null,b):W(this,!0,b)},pd.last=function(a,b){return a?this.where(a,b).last():X(this,!1)},pd.lastOrDefault=function(a,b,c){return a?this.where(a,c).lastOrDefault(null,b):X(this,!0,b)},pd.find=function(a,b){return Y(this,a,b,!1)},pd.findIndex=function(a,b){return Y(this,a,b,!0)},pd.toSet=function(){if("undefined"==typeof yb.Set)throw new TypeError;var a=this;return new we(function(b){var c=new yb.Set;return a.subscribe(function(a){c.add(a)},function(a){b.onError(a)},function(){b.onNext(c),b.onCompleted()})},a)},pd.toMap=function(a,b){if("undefined"==typeof yb.Map)throw new TypeError;var c=this;return new we(function(d){var e=new yb.Map;return c.subscribe(function(c){var f;try{f=a(c)}catch(g){return void d.onError(g)}var h=c;if(b)try{h=b(c)}catch(g){return void d.onError(g)}e.set(f,h)},function(a){d.onError(a)},function(){d.onNext(e),d.onCompleted()})},c)};var be="function",ce="throw",yc=Db.internals.isObject,de=Db.spawn=function(a){var b=cb(a);return function(c){function d(a,b){dd.schedule(c.bind(f,a,b))}function e(a,b){var c;if(arguments.length>2)for(var b=[],h=1,i=arguments.length;i>h;h++)b.push(arguments[h]);if(a)try{c=g[ce](a)}catch(j){return d(j)}if(!a)try{c=g.next(b)}catch(j){return d(j)}if(c.done)return d(null,c.value);if(c.value=Z(c.value,f),typeof c.value!==be)e(new TypeError("Rx.spawn only supports a function, Promise, Observable, Object or Array."));else{var k=!1;try{c.value.call(f,function(){k||(k=!0,e.apply(f,arguments))})}catch(j){dd.schedule(function(){k||(k=!0,e.call(f,j))})}}}var f=this,g=a;if(b){for(var h=[],i=0,j=arguments.length;j>i;i++)h.push(arguments[i]);var j=h.length,k=j&&typeof h[j-1]===be;c=k?h.pop():eb,g=a.apply(this,h)}else c=c||eb;e()}};vd.start=function(a,b,c){return ee(a,b,c)()};var ee=vd.toAsync=function(a,b,c){return Wc(c)||(c=dd),function(){var d=arguments,e=new Ae;return c.schedule(function(){var c;try{c=a.apply(b,d)}catch(f){return void e.onError(f)}e.onNext(c),e.onCompleted()}),e.asObservable()}};vd.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 we(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()}},vd.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 we(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()}},Db.config.useNativeEvents=!1,vd.fromEvent=function(a,b,c){return a.addListener?fe(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},c):Db.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new we(function(d){return gb(a,b,function(a){var b=a;if(c)try{b=c(arguments)}catch(e){return d.onError(e)}d.onNext(b)})}).publish().refCount():fe(function(c){a.on(b,c)},function(c){a.off(b,c)},c)};var fe=vd.fromEventPattern=function(a,b,c){return new we(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 Mc(function(){b&&b(e,f)})}).publish().refCount()};vd.startAsync=function(a){var b;try{b=a()}catch(c){return Qd(c)}return xd(b)};var ge=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=Nc,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=Nc)});return new Jc(c,d,e)}function c(c,d){this.source=c,this.controller=new ze,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b,c)}return Dc(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(vd);pd.pausable=function(a){return new ge(this,a)};var he=function(b){function c(b){var c,d=[],e=hb(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 ze,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,b.call(this,c,a)}return Dc(d,b),d.prototype.pause=function(){this.controller.onNext(!1)},d.prototype.resume=function(){this.controller.onNext(!0)},d}(vd);pd.pausableBuffered=function(a){return new he(this,a)};var ie=function(a){function b(a){return this.source.subscribe(a)}function c(c,d,e){a.call(this,b,c),this.subject=new je(d,e),this.source=c.multicast(this.subject).refCount()}return Dc(c,a),c.prototype.request=function(a){return this.subject.request(null==a?-1:a)},c}(vd),je=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 ze,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=Nc,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.scheduler=d||_c}return Dc(c,a),Ec(c.prototype,nd,{onCompleted:function(){this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length?this.queue.push(fd.createOnCompleted()):this.subject.onCompleted()},onError:function(a){this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length?this.queue.push(fd.createOnError(a)):this.subject.onError(a)},onNext:function(a){var b=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(fd.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=Mc(function(){b.requestedCount=0}))}),this.requestedDisposable},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=Nc}}),c}(vd);pd.controlled=function(a,b){return a&&Wc(a)&&(b=a,a=!0),null==a&&(a=!0),new ie(this,a,b)};var ke=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return dd.schedule(function(){b.source.request(1)}),this.subscription}function c(c){a.call(this,b,c),this.source=c}Dc(c,a);var d=function(a){function b(b,c,d){a.call(this),this.observer=b,this.observable=c,this.cancel=d}Dc(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){this.observer.onNext(a);var b=this;dd.schedule(function(){b.observable.source.request(1)})},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(qd);return c}(vd);ie.prototype.stopAndWait=function(){return new ke(this)};var le=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return dd.schedule(function(){b.source.request(b.windowSize)}),this.subscription}function c(c,d){a.call(this,b,c),this.source=c,this.windowSize=d}Dc(c,a);var d=function(a){function b(a,b,c){this.observer=a,this.observable=b,this.cancel=c,this.received=0}Dc(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){if(this.observer.onNext(a),this.received=++this.received%this.observable.windowSize,0===this.received){var b=this;dd.schedule(function(){b.observable.source.request(b.observable.windowSize)})}},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(qd);return c}(vd);ie.prototype.windowed=function(a){return new le(this,a)},pd.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},pd.multicast=function(a,b){var c=this;return"function"==typeof a?new we(function(d){var e=c.multicast(a());return new Jc(b(e).subscribe(d),e.connect())},c):new pe(c,a)},pd.publish=function(a){return a&&Mb(a)?this.multicast(function(){return new ze},a):this.multicast(new ze)},pd.share=function(){return this.publish().refCount()},pd.publishLast=function(a){return a&&Mb(a)?this.multicast(function(){return new Ae},a):this.multicast(new Ae)},pd.publishValue=function(a,b){return 2===arguments.length?this.multicast(function(){return new ne(b)},a):this.multicast(new ne(a))},pd.shareValue=function(a){return this.publishValue(a).refCount()},pd.replay=function(a,b,c,d){return a&&Mb(a)?this.multicast(function(){return new oe(b,c,d)},a):this.multicast(new oe(b,c,d))},pd.shareReplay=function(a,b,c){return this.replay(null,a,b,c).refCount()};var me=function(a,b){this.subject=a,this.observer=b};me.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 ne=Db.BehaviorSubject=function(a){function c(a){return Pc(this),this.isStopped?(this.hasError?a.onError(this.error):a.onCompleted(),Nc):(this.observers.push(a),a.onNext(this.value),new me(this,a))}function d(b){a.call(this,c),this.value=b,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return Dc(d,a),Ec(d.prototype,nd,{getValue:function(){if(Pc(this),this.hasError)throw this.error;return this.value},hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(Pc(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(Pc(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(Pc(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}(vd),oe=Db.ReplaySubject=function(a){function c(a,b){return Mc(function(){b.dispose(),!a.isDisposed&&a.observers.splice(a.observers.indexOf(b),1)})}function d(a){var b=new td(this.scheduler,a),d=c(this,b);Pc(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||_c,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,a.call(this,d)}var f=Math.pow(2,53)-1;return Dc(e,a),Ec(e.prototype,nd.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(Pc(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(Pc(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(Pc(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}(vd),pe=Db.ConnectableObservable=function(a){function b(b,c){var d,e=!1,f=b.asObservable();this.connect=function(){return e||(e=!0,d=new Jc(f.subscribe(c),Mc(function(){e=!1}))),d},a.call(this,function(a){return c.subscribe(a)})}return Dc(b,a),b.prototype.refCount=function(){var a,b=0,c=this;return new we(function(d){var e=1===++b,f=c.subscribe(d);return e&&(a=c.connect()),function(){f.dispose(),0===--b&&a.dispose()}})},b}(vd),qe=function(){function b(a){if(0===(1&a))return 2===a;for(var b=Math.sqrt(a),c=3;b>=c;){if(a%c===0)return!1;c+=2}return!0}function c(a){var c,d,e;for(c=0;c<h.length;++c)if(d=h[c],d>=a)return d;for(e=1|a;e<h[h.length-1];){if(b(e))return e;e+=2}return a}function d(a){var b=757602046;if(!a.length)return b;for(var c=0,d=a.length;d>c;c++){var e=a.charCodeAt(c);b=(b<<5)-b+e,b&=b}return b}function e(a){var b=668265261;return a=61^a^a>>>16,a+=a<<3,a^=a>>>4,a*=b,a^=a>>>15}function f(){return{key:null,value:null,next:0,hashCode:0}}function g(a,b){if(0>a)throw new Ub;a>0&&this._initialize(a),this.comparer=b||Hb,this.freeCount=0,this.size=0,this.freeList=-1}var h=[1,3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143,4194301,8388593,16777213,33554393,67108859,134217689,268435399,536870909,1073741789,2147483647],i="no such key",j="duplicate key",k=function(){var a=0;return function(b){if(null==b)throw new Error(i);if("string"==typeof b)return d(b);if("number"==typeof b)return e(b);if("boolean"==typeof b)return b===!0?1:0;if(b instanceof Date)return e(b.valueOf());if(b instanceof RegExp)return d(b.toString());if("function"==typeof b.valueOf){var c=b.valueOf();if("number"==typeof c)return e(c);if("string"==typeof c)return d(c)}if(b.hashCode)return b.hashCode();var f=17*a++;return b.hashCode=function(){return f},f}}(),l=g.prototype;return l._initialize=function(a){var b,d=c(a);for(this.buckets=new Array(d),this.entries=new Array(d),b=0;d>b;b++)this.buckets[b]=-1,this.entries[b]=f();this.freeList=-1},l.add=function(a,b){this._insert(a,b,!0)},l._insert=function(a,b,c){this.buckets||this._initialize(0);for(var d,e=2147483647&k(a),f=e%this.buckets.length,g=this.buckets[f];g>=0;g=this.entries[g].next)if(this.entries[g].hashCode===e&&this.comparer(this.entries[g].key,a)){if(c)throw new Error(j);return void(this.entries[g].value=b)}this.freeCount>0?(d=this.freeList,this.freeList=this.entries[d].next,--this.freeCount):(this.size===this.entries.length&&(this._resize(),f=e%this.buckets.length),d=this.size,++this.size),this.entries[d].hashCode=e,this.entries[d].next=this.buckets[f],this.entries[d].key=a,this.entries[d].value=b,this.buckets[f]=d},l._resize=function(){var a=c(2*this.size),b=new Array(a);for(e=0;e<b.length;++e)b[e]=-1;var d=new Array(a);for(e=0;e<this.size;++e)d[e]=this.entries[e];for(var e=this.size;a>e;++e)d[e]=f();for(var g=0;g<this.size;++g){var h=d[g].hashCode%a;d[g].next=b[h],b[h]=g}this.buckets=b,this.entries=d},l.remove=function(a){if(this.buckets)for(var b=2147483647&k(a),c=b%this.buckets.length,d=-1,e=this.buckets[c];e>=0;e=this.entries[e].next){if(this.entries[e].hashCode===b&&this.comparer(this.entries[e].key,a))return 0>d?this.buckets[c]=this.entries[e].next:this.entries[d].next=this.entries[e].next,this.entries[e].hashCode=-1,this.entries[e].next=this.freeList,this.entries[e].key=null,this.entries[e].value=null,this.freeList=e,++this.freeCount,!0;d=e}return!1},l.clear=function(){var a,b;if(!(this.size<=0)){for(a=0,b=this.buckets.length;b>a;++a)this.buckets[a]=-1;for(a=0;a<this.size;++a)this.entries[a]=f();this.freeList=-1,this.size=0}},l._findEntry=function(a){if(this.buckets)for(var b=2147483647&k(a),c=this.buckets[b%this.buckets.length];c>=0;c=this.entries[c].next)if(this.entries[c].hashCode===b&&this.comparer(this.entries[c].key,a))return c;return-1},l.count=function(){return this.size-this.freeCount},l.tryGetValue=function(b){var c=this._findEntry(b);return c>=0?this.entries[c].value:a},l.getValues=function(){var a=0,b=[];if(this.entries)for(var c=0;c<this.size;c++)this.entries[c].hashCode>=0&&(b[a++]=this.entries[c].value);return b},l.get=function(a){var b=this._findEntry(a);if(b>=0)return this.entries[b].value;throw new Error(i)},l.set=function(a,b){this._insert(a,b,!1)},l.containskey=function(a){return this._findEntry(a)>=0},g}();pd.join=function(a,b,c,d){var e=this;return new we(function(f){var g=new Jc,h=!1,i=!1,j=0,k=0,l=new qe,m=new qe;return g.add(e.subscribe(function(a){var c=j++,e=new Qc;l.add(c,a),g.add(e);var i,k=function(){l.remove(c)&&0===l.count()&&h&&f.onCompleted(),g.remove(e)};try{i=b(a)}catch(n){return void f.onError(n)}e.setDisposable(i.take(1).subscribe(Eb,f.onError.bind(f),k)),m.getValues().forEach(function(b){var c;try{c=d(a,b)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){h=!0,(i||0===l.count())&&f.onCompleted()})),g.add(a.subscribe(function(a){var b=k++,e=new Qc;m.add(b,a),g.add(e);var h,j=function(){m.remove(b)&&0===m.count()&&i&&f.onCompleted(),g.remove(e)};try{h=c(a)}catch(n){return void f.onError(n)}e.setDisposable(h.take(1).subscribe(Eb,f.onError.bind(f),j)),l.getValues().forEach(function(b){var c;try{c=d(b,a)}catch(e){return void f.onError(e)}f.onNext(c)})},f.onError.bind(f),function(){i=!0,(h||0===m.count())&&f.onCompleted()})),g},e)},pd.groupJoin=function(a,b,c,d){var e=this;return new we(function(f){function g(a){return function(b){b.onError(a)}}var h=new Jc,i=new Sc(h),j=new qe,k=new qe,l=0,m=0;return h.add(e.subscribe(function(a){var c=new ze,e=l++;j.add(e,c);var m;try{m=d(a,Fc(c,i))}catch(n){return j.getValues().forEach(g(n)),void f.onError(n)}f.onNext(m),k.getValues().forEach(function(a){c.onNext(a)});var o=new Qc;h.add(o);var p,q=function(){j.remove(e)&&c.onCompleted(),h.remove(o)};try{p=b(a)}catch(n){return j.getValues().forEach(g(n)),void f.onError(n)}o.setDisposable(p.take(1).subscribe(Eb,function(a){j.getValues().forEach(g(a)),f.onError(a)},q))},function(a){j.getValues().forEach(g(a)),f.onError(a)},f.onCompleted.bind(f))),h.add(a.subscribe(function(a){var b=m++;k.add(b,a);var d=new Qc;h.add(d);var e,i=function(){k.remove(b),h.remove(d)};try{e=c(a)}catch(l){return j.getValues().forEach(g(l)),void f.onError(l)}d.setDisposable(e.take(1).subscribe(Eb,function(a){j.getValues().forEach(g(a)),f.onError(a)},i)),j.getValues().forEach(function(b){b.onNext(a)})},function(a){j.getValues().forEach(g(a)),f.onError(a)})),i},e)},pd.buffer=function(){return this.window.apply(this,arguments).selectMany(function(a){return a.toArray()})},pd.window=function(a,b){return 1===arguments.length&&"function"!=typeof arguments[0]?jb.call(this,a):"function"==typeof a?kb.call(this,a):ib.call(this,a,b)},pd.pairwise=function(){var a=this;return new we(function(b){var c,d=!1;return a.subscribe(function(a){d?b.onNext([c,a]):d=!0,c=a},b.onError.bind(b),b.onCompleted.bind(b))},a)},pd.partition=function(a,b){return[this.filter(a,b),this.filter(function(c,d,e){return!a.call(b,c,d,e)})]},pd.letBind=pd.let=function(a){return a(this)},vd["if"]=vd.ifThen=function(a,b,c){return zd(function(){return c||(c=Bd()),Kb(b)&&(b=xd(b)),Kb(c)&&(c=xd(c)),"function"==typeof c.now&&(c=Bd(c)),a()?b:c})},vd["for"]=vd.forIn=function(a,b,c){return md(a,b,c).concat()};var re=vd["while"]=vd.whileDo=function(a,b){return Kb(b)&&(b=xd(b)),lb(a,b).concat()};pd.doWhile=function(a){return Td([this,re(a,this)])},vd["case"]=vd.switchCase=function(a,b,c){return zd(function(){Kb(c)&&(c=xd(c)),c||(c=Bd()),"function"==typeof c.now&&(c=Bd(c));var d=b[a()];return Kb(d)&&(d=xd(d)),d||c})},pd.expand=function(a,b){Wc(b)||(b=$c);var c=this;return new we(function(d){var e=[],f=new Rc,g=new Jc(f),h=0,i=!1,j=function(){var c=!1;e.length>0&&(c=!i,i=!0),c&&f.setDisposable(b.scheduleRecursive(function(b){var c;if(!(e.length>0))return void(i=!1);c=e.shift();var f=new Qc;g.add(f),f.setDisposable(c.subscribe(function(b){d.onNext(b);var c=null;try{c=a(b)}catch(f){d.onError(f)}e.push(c),h++,j()},d.onError.bind(d),function(){g.remove(f),h--,0===h&&d.onCompleted()})),b()}))};return e.push(c),h++,j(),g},this)},vd.forkJoin=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 we(function(b){var c=a.length;if(0===c)return b.onCompleted(),Nc;for(var d=new Jc,e=!1,f=new Array(c),g=new Array(c),h=new Array(c),i=0;c>i;i++)!function(i){var j=a[i];Kb(j)&&(j=xd(j)),d.add(j.subscribe(function(a){e||(f[i]=!0,h[i]=a)},function(a){e=!0,b.onError(a),d.dispose()},function(){if(!e){if(!f[i])return void b.onCompleted();g[i]=!0;for(var a=0;c>a;a++)if(!g[a])return;e=!0,b.onNext(h),b.onCompleted()}}))}(i);return d})},pd.forkJoin=function(a,b){var c=this;return new we(function(d){var e,f,g=!1,h=!1,i=!1,j=!1,k=new Qc,l=new Qc;return Kb(a)&&(a=xd(a)),k.setDisposable(c.subscribe(function(a){i=!0,e=a},function(a){l.dispose(),d.onError(a)},function(){if(g=!0,h)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),l.setDisposable(a.subscribe(function(a){j=!0,f=a},function(a){k.dispose(),d.onError(a)},function(){if(h=!0,g)if(i)if(j){var a;try{a=b(e,f)}catch(c){return void d.onError(c)}d.onNext(a),d.onCompleted()}else d.onCompleted();else d.onCompleted()})),new Jc(k,l)},c)},pd.manySelect=function(a,b){Wc(b)||(b=$c);var c=this;return zd(function(){var d;return c.map(function(a){var b=new se(a);return d&&d.onNext(a),d=b,b}).tap(Eb,function(a){d&&d.onError(a)},function(){d&&d.onCompleted()}).observeOn(b).map(a)},c)};var se=function(a){function b(a){var b=this,c=new Jc;return c.add(_c.schedule(function(){a.onNext(b.head),c.add(b.tail.mergeAll().subscribe(a))})),c}function c(c){a.call(this,b),this.head=c,this.tail=new Ae}return Dc(c,a),Ec(c.prototype,nd,{onCompleted:function(){this.onNext(vd.empty())},onError:function(a){this.onNext(vd.throwError(a))},onNext:function(a){this.tail.onNext(a),this.tail.onCompleted()}}),c}(vd),te=yb.Map||function(){function b(){this._keys=[],this._values=[]}return b.prototype.get=function(b){var c=this._keys.indexOf(b);return-1!==c?this._values[c]:a},b.prototype.set=function(a,b){var c=this._keys.indexOf(a);-1!==c&&(this._values[c]=b),this._values[this._keys.push(a)-1]=b},b.prototype.forEach=function(a,b){for(var c=0,d=this._keys.length;d>c;c++)a.call(b,this._values[c],this._keys[c])},b}();mb.prototype.and=function(a){return new mb(this.patterns.concat(a))},mb.prototype.thenDo=function(a){return new nb(this,a)},nb.prototype.activate=function(a,b,c){for(var d=this,e=[],f=0,g=this.expression.patterns.length;g>f;f++)e.push(ob(a,this.expression.patterns[f],b.onError.bind(b)));var h=new pb(e,function(){var a;try{a=d.selector.apply(d,arguments)}catch(c){return void b.onError(c)}b.onNext(a)},function(){for(var a=0,b=e.length;b>a;a++)e[a].removeActivePlan(h);c(h)});for(f=0,g=e.length;g>f;f++)e[f].addActivePlan(h);return h},pb.prototype.dequeue=function(){this.joinObservers.forEach(function(a){a.queue.shift()})},pb.prototype.match=function(){var a,b,c=!0;for(a=0,b=this.joinObserverArray.length;b>a;a++)if(0===this.joinObserverArray[a].queue.length){c=!1;break}if(c){var d=[],e=!1;for(a=0,b=this.joinObserverArray.length;b>a;a++)d.push(this.joinObserverArray[a].queue[0]),"C"===this.joinObserverArray[a].queue[0].kind&&(e=!0);if(e)this.onCompleted();else{this.dequeue();var f=[];for(a=0,b=d.length;a<d.length;a++)f.push(d[a].value);this.onNext.apply(this,f)}}};var ue=function(a){function b(b,c){a.call(this),this.source=b,this.onError=c,this.queue=[],this.activePlans=[],this.subscription=new Qc,this.isDisposed=!1}Dc(b,a);var c=b.prototype;return c.next=function(a){if(!this.isDisposed){if("E"===a.kind)return this.onError(a.exception);this.queue.push(a);for(var b=this.activePlans.slice(0),c=0,d=b.length;d>c;c++)b[c].match()}},c.error=Eb,c.completed=Eb,c.addActivePlan=function(a){this.activePlans.push(a)},c.subscribe=function(){this.subscription.setDisposable(this.source.materialize().subscribe(this))},c.removeActivePlan=function(a){this.activePlans.splice(this.activePlans.indexOf(a),1),0===this.activePlans.length&&this.dispose()},c.dispose=function(){a.prototype.dispose.call(this),this.isDisposed||(this.isDisposed=!0,this.subscription.dispose())},b}(qd);pd.and=function(a){return new mb([this,a])},pd.thenDo=function(a){return new mb([this]).thenDo(a)},vd.when=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 we(function(b){var c=[],d=new te,e=od(function(a){b.onNext(a)},function(a){d.forEach(function(b){b.onError(a)}),b.onError(a)},function(){b.onCompleted()});try{for(var f=0,g=a.length;g>f;f++)c.push(a[f].activate(d,e,function(a){var d=c.indexOf(a);c.splice(d,1),0===c.length&&b.onCompleted()}))}catch(h){Qd(h).subscribe(b)}var i=new Jc;return d.forEach(function(a){a.subscribe(),i.add(a)}),i})};{var ve=vd.interval=function(a,b){return tb(a,a,Wc(b)?b:dd)};vd.timer=function(b,c,d){var e;return Wc(d)||(d=dd),c!==a&&"number"==typeof c?e=c:Wc(c)&&(d=c),b instanceof Date&&e===a?qb(b.getTime(),d):b instanceof Date&&e!==a?(e=c,rb(b.getTime(),e,d)):e===a?sb(b,d):tb(b,e,d)}}pd.delay=function(a,b){return Wc(b)||(b=dd),a instanceof Date?vb(this,a.getTime(),b):ub(this,a,b)},pd.debounce=pd.throttleWithTimeout=function(a,b){Wc(b)||(b=dd);var c=this;return new we(function(d){var e,f=new Rc,g=!1,h=0,i=c.subscribe(function(c){g=!0,e=c,h++;var i=h,j=new Qc;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 Jc(i,f)},this)},pd.throttle=function(a,b){return this.debounce(a,b)},pd.windowWithTime=function(a,b,c){var d,e=this;return null==b&&(d=a),Wc(c)||(c=dd),"number"==typeof b?d=b:Wc(b)&&(d=a,c=b),new we(function(b){function f(){var a=new Qc,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 ze;k.push(a),b.onNext(Fc(a,h))}e&&k.shift().onCompleted(),f()}))}var g,h,i=d,j=a,k=[],l=new Rc,m=0;return g=new Jc(l),h=new Sc(g),k.push(new ze),b.onNext(Fc(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)},pd.windowWithTimeOrCount=function(a,b,c){var d=this;return Wc(c)||(c=dd),new we(function(e){function f(b){var d=new Qc;g.setDisposable(d),d.setDisposable(c.scheduleWithRelative(a,function(){if(b===k){j=0;var a=++k;l.onCompleted(),l=new ze,e.onNext(Fc(l,i)),f(a)}}))}var g=new Rc,h=new Jc(g),i=new Sc(h),j=0,k=0,l=new ze;return e.onNext(Fc(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 ze,e.onNext(Fc(l,i))),d&&f(c)},function(a){l.onError(a),e.onError(a)},function(){l.onCompleted(),e.onCompleted()})),i},d)},pd.bufferWithTime=function(){return this.windowWithTime.apply(this,arguments).selectMany(function(a){return a.toArray()})},pd.bufferWithTimeOrCount=function(a,b,c){return this.windowWithTimeOrCount(a,b,c).selectMany(function(a){return a.toArray()})},pd.timeInterval=function(a){var b=this;return Wc(a)||(a=dd),zd(function(){var c=a.now();return b.map(function(b){var d=a.now(),e=d-c;return c=d,{value:b,interval:e}})})},pd.timestamp=function(a){return Wc(a)||(a=dd),this.map(function(b){return{value:b,timestamp:a.now()}})},pd.sample=pd.throttleLatest=function(a,b){return Wc(b)||(b=dd),"number"==typeof a?wb(this,ve(a,b)):wb(this,a)},pd.timeout=function(a,b,c){(null==b||"string"==typeof b)&&(b=Qd(new Error(b||"Timeout"))),Wc(c)||(c=dd);
5
+ var d=this,e=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new we(function(f){function g(){var d=h;l.setDisposable(c[e](a,function(){h===d&&(Kb(b)&&(b=xd(b)),j.setDisposable(b.subscribe(f)))}))}var h=0,i=new Qc,j=new Rc,k=!1,l=new Rc;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 Jc(j,l)},d)},vd.generateWithAbsoluteTime=function(a,b,c,d,e,f){return Wc(f)||(f=dd),new we(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()})})},vd.generateWithRelativeTime=function(a,b,c,d,e,f){return Wc(f)||(f=dd),new we(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()})})},pd.delaySubscription=function(a,b){var c=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative",d=this;return Wc(b)||(b=dd),new we(function(e){var f=new Rc;return f.setDisposable(b[c](a,function(){f.setDisposable(d.subscribe(e))})),f},this)},pd.delayWithSelector=function(a,b){var c,d,e=this;return Mb(a)?d=a:(c=a,d=b),new we(function(a){function b(){i.setDisposable(e.subscribe(function(b){var c=p(d)(b);if(c===Gc)return a.onError(c.e);var e=new Qc;g.add(e),e.setDisposable(c.subscribe(function(){a.onNext(b),g.remove(e),f()},function(b){a.onError(b)},function(){a.onNext(b),g.remove(e),f()}))},function(b){a.onError(b)},function(){h=!0,i.dispose(),f()}))}function f(){h&&0===g.length&&a.onCompleted()}var g=new Jc,h=!1,i=new Rc;return c?i.setDisposable(c.subscribe(b,function(b){a.onError(b)},b)):b(),new Jc(i,g)},this)},pd.timeoutWithSelector=function(a,b,c){1===arguments.length&&(b=a,a=Jd()),c||(c=Qd(new Error("Timeout")));var d=this;return new we(function(e){function f(a){function b(){return k===d}var d=k,f=new Qc;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 Rc,i=new Rc,j=new Qc;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(Kb(c)?xd(c):c)}},function(a){g()&&e.onError(a)},function(){g()&&e.onCompleted()})),new Jc(h,i)},d)},pd.debounceWithSelector=function(a){var b=this;return new we(function(c){var d,e=!1,f=new Rc,g=0,h=b.subscribe(function(b){var h;try{h=a(b)}catch(i){return void c.onError(i)}Kb(h)&&(h=xd(h)),e=!0,d=b,g++;var j=g,k=new Qc;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 Jc(h,f)},b)},pd.throttleWithSelector=function(a){return this.debounceWithSelector(a)},pd.skipLastWithTime=function(a,b){Wc(b)||(b=dd);var c=this;return new we(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)},pd.takeLastWithTime=function(a,b){var c=this;return Wc(b)||(b=dd),new we(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)},pd.takeLastBufferWithTime=function(a,b){var c=this;return Wc(b)||(b=dd),new we(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)},pd.takeWithTime=function(a,b){var c=this;return Wc(b)||(b=dd),new we(function(d){return new Jc(b.scheduleWithRelative(a,function(){d.onCompleted()}),c.subscribe(d))},c)},pd.skipWithTime=function(a,b){var c=this;return Wc(b)||(b=dd),new we(function(d){var e=!1;return new Jc(b.scheduleWithRelative(a,function(){e=!0}),c.subscribe(function(a){e&&d.onNext(a)},d.onError.bind(d),d.onCompleted.bind(d)))},c)},pd.skipUntilWithTime=function(a,b){Wc(b)||(b=dd);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new we(function(e){var f=!1;return new Jc(b[d](a,function(){f=!0}),c.subscribe(function(a){f&&e.onNext(a)},function(a){e.onError(a)},function(){e.onCompleted()}))},c)},pd.takeUntilWithTime=function(a,b){Wc(b)||(b=dd);var c=this,d=a instanceof Date?"scheduleWithAbsolute":"scheduleWithRelative";return new we(function(e){return new Jc(b[d](a,function(){e.onCompleted()}),c.subscribe(e))},c)},pd.throttleFirst=function(a,b){Wc(b)||(b=dd);var c=+a||0;if(0>=c)throw new RangeError("windowDuration cannot be less or equal zero.");var d=this;return new we(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)},pd.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 we(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)},pd.exclusive=function(){var a=this;return new we(function(b){var c=!1,d=!1,e=new Qc,f=new Jc;return f.add(e),e.setDisposable(a.subscribe(function(a){if(!c){c=!0,Kb(a)&&(a=xd(a));var e=new Qc;f.add(e),e.setDisposable(a.subscribe(b.onNext.bind(b),b.onError.bind(b),function(){f.remove(e),c=!1,d&&1===f.length&&b.onCompleted()}))}},b.onError.bind(b),function(){d=!0,c||1!==f.length||b.onCompleted()})),f},this)},pd.exclusiveMap=function(a,b){var c=this,d=cc(a,b,3);return new we(function(a){var b=0,e=!1,f=!0,g=new Qc,h=new Jc;return h.add(g),g.setDisposable(c.subscribe(function(c){e||(e=!0,innerSubscription=new Qc,h.add(innerSubscription),Kb(c)&&(c=xd(c)),innerSubscription.setDisposable(c.subscribe(function(e){var f;try{f=d(e,b++,c)}catch(g){return void a.onError(g)}a.onNext(f)},function(b){a.onError(b)},function(){h.remove(innerSubscription),e=!1,f&&1===h.length&&a.onCompleted()})))},function(b){a.onError(b)},function(){f=!0,1!==h.length||e||a.onCompleted()})),h},this)},Db.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 e(a,b,c){return this.scheduleRelativeWithState(a,this.toRelative(b-this.now()),c)}function f(a,b){return b(),Nc}function g(f,g){this.clock=f,this.comparer=g,this.isEnabled=!1,this.queue=new Hc(1024),a.call(this,b,c,d,e)}Dc(g,a);var h=g.prototype;return h.add=Xb,h.toDateTimeOffset=Xb,h.toRelative=Xb,h.schedulePeriodicWithState=function(a,b,c){var d=new Zc(this,a,b,c);return d.start()},h.scheduleRelativeWithState=function(a,b,c){var d=this.add(this.clock,b);return this.scheduleAbsoluteWithState(a,d,c)},h.scheduleRelative=function(a,b){return this.scheduleRelativeWithState(b,a,f)},h.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)}},h.stop=function(){this.isEnabled=!1},h.advanceTo=function(a){var b=this.comparer(this.clock,a);if(this.comparer(this.clock,a)>0)throw new Ub;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}},h.advanceBy=function(a){var b=this.add(this.clock,a),c=this.comparer(this.clock,b);if(c>0)throw new Ub;0!==c&&this.advanceTo(b)},h.sleep=function(a){var b=this.add(this.clock,a);if(this.comparer(this.clock,b)>=0)throw new Ub;this.clock=b},h.getNext=function(){for(;this.queue.length>0;){var a=this.queue.peek();if(!a.isCancelled())return a;this.queue.dequeue()}return null},h.scheduleAbsolute=function(a,b){return this.scheduleAbsoluteWithState(b,a,f)},h.scheduleAbsoluteWithState=function(a,b,c){function d(a,b){return e.queue.remove(f),c(a,b)}var e=this,f=new Tc(this,a,d,b,this.comparer);return this.queue.enqueue(f),f.disposable},g}(Uc),Db.HistoricalScheduler=function(a){function b(b,c){var d=null==b?0:b,e=c||Ib;a.call(this,d,e)}Dc(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}(Db.VirtualTimeScheduler);var we=Db.AnonymousObservable=function(a){function b(a){return a&&Mb(a.dispose)?a:Mb(a)?Mc(a):Nc}function c(a,c){var d=c[0],e=c[1],f=p(e)(d);return f!==Gc||d.fail(Gc.e)?void d.setDisposable(b(f)):q(Gc.e)}function d(b,d){function e(a){var d=new xe(a),e=[d,b];return _c.scheduleRequired()?_c.scheduleWithState(e,c):c(null,e),d}this.source=d,a.call(this,e)}return Dc(d,a),d}(vd),xe=function(a){function b(b){a.call(this),this.observer=b,this.m=new Qc}Dc(b,a);var c=b.prototype;return c.next=function(a){var b=p(this.observer.onNext).call(this.observer,a);b===Gc&&(this.dispose(),q(b.e))},c.error=function(a){var b=p(this.observer.onError).call(this.observer,a);this.dispose(),b===Gc&&q(b.e)},c.completed=function(){var a=p(this.observer.onCompleted).call(this.observer);this.dispose(),a===Gc&&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}(qd),ye=function(a){function b(a){return this.underlyingObservable.subscribe(a)}function c(c,d,e){a.call(this,b),this.key=c,this.underlyingObservable=e?new we(function(a){return new Jc(e.getDisposable(),d.subscribe(a))}):d}return Dc(c,a),c}(vd),ze=Db.Subject=function(a){function c(a){return Pc(this),this.isStopped?this.hasError?(a.onError(this.error),Nc):(a.onCompleted(),Nc):(this.observers.push(a),new me(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return Dc(d,a),Ec(d.prototype,nd.prototype,{hasObservers:function(){return this.observers.length>0},onCompleted:function(){if(Pc(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(Pc(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(Pc(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 Be(a,b)},d}(vd),Ae=Db.AsyncSubject=function(a){function c(a){return Pc(this),this.isStopped?(this.hasError?a.onError(this.error):this.hasValue?(a.onNext(this.value),a.onCompleted()):a.onCompleted(),Nc):(this.observers.push(a),new me(this,a))}function d(){a.call(this,c),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return Dc(d,a),Ec(d.prototype,nd,{hasObservers:function(){return Pc(this),this.observers.length>0},onCompleted:function(){var a,c;if(Pc(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(Pc(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){Pc(this),this.isStopped||(this.value=a,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.exception=null,this.value=null}}),d}(vd),Be=Db.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 Dc(c,a),Ec(c.prototype,nd.prototype,{onCompleted:function(){this.observer.onCompleted()},onError:function(a){this.observer.onError(a)},onNext:function(a){this.observer.onNext(a)}}),c}(vd);Db.Pauser=function(a){function b(){a.call(this)}return Dc(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(ze),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(yb.Rx=Db,define(function(){return Db})):zb&&Ab?Bb?(Ab.exports=Db).Rx=Db:zb.Rx=Db:yb.Rx=Db;var Ce=g()}).call(this);
6
6
  //# sourceMappingURL=rx.all.map
@@ -37,14 +37,14 @@
37
37
  var Observable = Rx.Observable,
38
38
  observableProto = Observable.prototype,
39
39
  observableFromPromise = Observable.fromPromise,
40
- observableThrow = Observable.throwException,
40
+ observableThrow = Observable.throwError,
41
41
  AnonymousObservable = Rx.AnonymousObservable,
42
42
  AsyncSubject = Rx.AsyncSubject,
43
43
  disposableCreate = Rx.Disposable.create,
44
44
  CompositeDisposable = Rx.CompositeDisposable,
45
45
  immediateScheduler = Rx.Scheduler.immediate,
46
- timeoutScheduler = Rx.Scheduler.timeout,
47
- isScheduler = Rx.helpers.isScheduler,
46
+ timeoutScheduler = Rx.Scheduler['default'],
47
+ isScheduler = Rx.Scheduler.isScheduler,
48
48
  slice = Array.prototype.slice;
49
49
 
50
50
  var fnString = 'function',
@@ -300,17 +300,19 @@
300
300
  */
301
301
  Observable.fromCallback = function (func, context, selector) {
302
302
  return function () {
303
- for(var args = [], i = 0, len = arguments.length; i < len; i++) { args.push(arguments[i]); }
303
+ var len = arguments.length, args = new Array(len)
304
+ for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
304
305
 
305
306
  return new AnonymousObservable(function (observer) {
306
307
  function handler() {
307
- var results = arguments;
308
+ var len = arguments.length, results = new Array(len);
309
+ for(var i = 0; i < len; i++) { results[i] = arguments[i]; }
308
310
 
309
311
  if (selector) {
310
312
  try {
311
- results = selector(results);
312
- } catch (err) {
313
- return observer.onError(err);
313
+ results = selector.apply(context, results);
314
+ } catch (e) {
315
+ return observer.onError(e);
314
316
  }
315
317
 
316
318
  observer.onNext(results);
@@ -340,7 +342,8 @@
340
342
  */
341
343
  Observable.fromNodeCallback = function (func, context, selector) {
342
344
  return function () {
343
- for(var args = [], i = 0, len = arguments.length; i < len; i++) { args.push(arguments[i]); }
345
+ var len = arguments.length, args = new Array(len);
346
+ for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
344
347
 
345
348
  return new AnonymousObservable(function (observer) {
346
349
  function handler(err) {
@@ -349,11 +352,12 @@
349
352
  return;
350
353
  }
351
354
 
352
- for(var results = [], i = 1, len = arguments.length; i < len; i++) { results.push(arguments[i]); }
355
+ var len = arguments.length, results = [];
356
+ for(var i = 1; i < len; i++) { results[i - 1] = arguments[i]; }
353
357
 
354
358
  if (selector) {
355
359
  try {
356
- results = selector(results);
360
+ results = selector.apply(context, results);
357
361
  } catch (e) {
358
362
  return observer.onError(e);
359
363
  }
@@ -514,8 +518,7 @@
514
518
  try {
515
519
  results = selector(arguments);
516
520
  } catch (err) {
517
- observer.onError(err);
518
- return
521
+ return observer.onError(err);
519
522
  }
520
523
  }
521
524
 
@@ -539,8 +542,7 @@
539
542
  try {
540
543
  result = selector(arguments);
541
544
  } catch (err) {
542
- observer.onError(err);
543
- return;
545
+ return observer.onError(err);
544
546
  }
545
547
  }
546
548
  observer.onNext(result);
@@ -1 +1 @@
1
- {"version":3,"file":"rx.async.compat.min.js","sources":["rx.async.compat.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","toThunk","obj","ctx","Array","isArray","objectToThunk","isGeneratorFunction","observableSpawn","isGenerator","isObservable","observableToThunk","isPromise","promiseToThunk","fnString","isObject","done","run","fn","key","finished","results","pending","err","res","e","keys","Object","length","constructor","timeoutScheduler","schedule","i","len","observable","value","hasValue","subscribe","v","promise","then","name","next","throwString","handleError","fixEvent","event","stopPropagation","cancelBubble","preventDefault","bubbledKeyCode","keyCode","ctrlKey","defaultPrevented","returnValue","modified","target","srcElement","type","relatedTarget","fromElement","toElement","c","charCode","keyChar","String","fromCharCode","createListener","element","handler","addEventListener","disposableCreate","removeEventListener","attachEvent","innerHandler","detachEvent","createEventListener","el","eventName","disposables","CompositeDisposable","prototype","toString","add","item","Observable","observableFromPromise","fromPromise","observableThrow","throwException","AnonymousObservable","AsyncSubject","Disposable","create","Scheduler","immediate","timeout","isScheduler","helpers","slice","internals","spawn","isGenFun","exit","bind","ret","arguments","push","gen","TypeError","called","apply","args","hasCallback","pop","start","func","context","scheduler","observableToAsync","toAsync","subject","result","onError","onNext","onCompleted","asObservable","fromCallback","selector","observer","publishLast","refCount","fromNodeCallback","config","useNativeEvents","fromEvent","addListener","fromEventPattern","h","removeListener","on","off","publish","addHandler","removeHandler","startAsync","functionAsync"],"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,OAEzE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E,IAAI/D,EAAW4D,IACtCV,GA+BR,IAAIS,GAAmBpD,EAAWoD,iBAAmB,SAAUM,EAAYC,EAAehB,GACxF,MAAO,IAAItC,GAAoB,SAAUuC,GACvC,QAASvD,GAAcjD,GACrB,GAAIiG,GAASjG,CACb,IAAIuG,EACF,IACEN,EAASM,EAAStB,WAClB,MAAOnF,GAEP,WADA0G,GAASN,QAAQpG,GAIrB0G,EAASL,OAAOF,GAGlB,GAAIpE,GAAcyF,EAAWrE,EAC7B,OAAOH,GAAiB,WAClByE,GACFA,EAActE,EAAcpB,OAG/BwF,UAAUX,WAkBb,OAVF9C,GAAW4D,WAAa,SAAUC,GAChC,GAAI3G,EACJ,KACEA,EAAU2G,IACV,MAAOzH,GACP,MAAO+D,GAAgB/D,GAEzB,MAAO6D,GAAsB/C,IAGtB1C"}
1
+ {"version":3,"file":"rx.async.compat.min.js","sources":["rx.async.compat.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","toThunk","obj","ctx","Array","isArray","objectToThunk","isGeneratorFunction","observableSpawn","isGenerator","isObservable","observableToThunk","isPromise","promiseToThunk","fnString","isObject","done","run","fn","key","finished","results","pending","err","res","e","keys","Object","length","constructor","timeoutScheduler","schedule","i","len","observable","value","hasValue","subscribe","v","promise","then","name","next","throwString","handleError","fixEvent","event","stopPropagation","cancelBubble","preventDefault","bubbledKeyCode","keyCode","ctrlKey","defaultPrevented","returnValue","modified","target","srcElement","type","relatedTarget","fromElement","toElement","c","charCode","keyChar","String","fromCharCode","createListener","element","handler","addEventListener","disposableCreate","removeEventListener","attachEvent","innerHandler","detachEvent","createEventListener","el","eventName","disposables","CompositeDisposable","prototype","toString","add","item","Observable","observableFromPromise","fromPromise","observableThrow","throwError","AnonymousObservable","AsyncSubject","Disposable","create","Scheduler","immediate","isScheduler","slice","internals","spawn","isGenFun","exit","bind","ret","arguments","push","gen","TypeError","called","apply","args","hasCallback","pop","start","func","context","scheduler","observableToAsync","toAsync","subject","result","onError","onNext","onCompleted","asObservable","fromCallback","selector","observer","publishLast","refCount","fromNodeCallback","config","useNativeEvents","fromEvent","addListener","fromEventPattern","h","removeListener","on","off","publish","addHandler","removeHandler","startAsync","functionAsync"],"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,aAAc,WAAY,SAAUE,EAAIR,GAE5C,MADAJ,GAAKY,GAAKpB,EAAQQ,EAAMI,EAASQ,GAC1BZ,EAAKY,KAES,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,GAoBhC,QAASI,GAAQC,EAAKC,GACpB,MAAIC,OAAMC,QAAQH,GAAgBI,EAAcP,KAAKI,EAAKD,GACtDK,EAAoBL,GAAeM,EAAgBN,EAAIH,KAAKI,IAC5DM,EAAYP,GAAgBM,EAAgBN,GAC5CQ,EAAaR,GAAeS,EAAkBT,GAC9CU,UAAUV,GAAeW,EAAeX,SACjCA,KAAQY,EAAmBZ,EAClCa,EAASb,IAAQE,MAAMC,QAAQH,GAAeI,EAAcP,KAAKI,EAAKD,GAEnEA,EAGT,QAASI,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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.binding","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){function d(a,b){return Array.isArray(a)?e.call(b,a):i(a)?A(a.call(b)):j(a)?A(a):h(a)?f(a):isPromise(a)?g(a):typeof a===x?a:z(a)||Array.isArray(a)?e.call(b,a):a}function e(a){var b=this;return function(c){function e(a,e){if(!f)try{if(a=d(a,b),typeof a!==x)return i[e]=a,--h||c(null,i);a.call(b,function(a,b){if(!f){if(a)return f=!0,c(a);i[e]=b,--h||c(null,i)}})}catch(g){f=!0,c(g)}}var f,g=Object.keys(a),h=g.length,i=new a.constructor;if(!h)return void v.schedule(function(){c(null,i)});for(var j=0,k=g.length;k>j;j++)e(a[g[j]],g[j])}}function f(a){return function(b){var c,d=!1;a.subscribe(function(a){c=a,d=!0},b,function(){d&&b(null,c)})}}function g(a){return function(b){a.then(function(a){b(null,a)},b)}}function h(a){return a&&typeof a.subscribe===x}function i(a){return a&&a.constructor&&"GeneratorFunction"===a.constructor.name}function j(a){return a&&typeof a.next===x&&typeof a[y]===x}function k(a){a&&v.schedule(function(){throw a})}function l(b){var c=function(){this.cancelBubble=!0},d=function(){if(this.bubbledKeyCode=this.keyCode,this.ctrlKey)try{this.keyCode=0}catch(a){}this.defaultPrevented=!0,this.returnValue=!1,this.modified=!0};if(b||(b=a.event),!b.target)switch(b.target=b.target||b.srcElement,"mouseover"==b.type&&(b.relatedTarget=b.fromElement),"mouseout"==b.type&&(b.relatedTarget=b.toElement),b.stopPropagation||(b.stopPropagation=c,b.preventDefault=d),b.type){case"keypress":var e="charCode"in b?b.charCode:b.keyCode;10==e?(e=0,b.keyCode=13):13==e||27==e?e=0:3==e&&(e=99),b.charCode=e,b.keyChar=b.charCode?String.fromCharCode(b.charCode):""}return b}function m(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),t(function(){a.removeEventListener(b,c,!1)});if(a.attachEvent){var d=function(a){c(l(a))};return a.attachEvent("on"+b,d),t(function(){a.detachEvent("on"+b,d)})}return a["on"+b]=c,t(function(){a["on"+b]=null})}function n(a,b,c){var d=new u;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(n(a.item(e),b,c));else a&&d.add(m(a,b,c));return d}var o=c.Observable,p=(o.prototype,o.fromPromise),q=o.throwException,r=c.AnonymousObservable,s=c.AsyncSubject,t=c.Disposable.create,u=c.CompositeDisposable,v=(c.Scheduler.immediate,c.Scheduler.timeout),w=c.helpers.isScheduler,x=(Array.prototype.slice,"function"),y="throw",z=c.internals.isObject,A=c.spawn=function(a){var b=i(a);return function(c){function e(a,b){v.schedule(c.bind(g,a,b))}function f(a,b){var c;if(arguments.length>2)for(var b=[],i=1,j=arguments.length;j>i;i++)b.push(arguments[i]);if(a)try{c=h[y](a)}catch(k){return e(k)}if(!a)try{c=h.next(b)}catch(k){return e(k)}if(c.done)return e(null,c.value);if(c.value=d(c.value,g),typeof c.value!==x)f(new TypeError("Rx.spawn only supports a function, Promise, Observable, Object or Array."));else{var l=!1;try{c.value.call(g,function(){l||(l=!0,f.apply(g,arguments))})}catch(k){v.schedule(function(){l||(l=!0,f.call(g,k))})}}}var g=this,h=a;if(b){for(var i=[],j=0,l=arguments.length;l>j;j++)i.push(arguments[j]);var l=i.length,m=l&&typeof i[l-1]===x;c=m?i.pop():k,h=a.apply(this,i)}else c=c||k;f()}};o.start=function(a,b,c){return B(a,b,c)()};var B=o.toAsync=function(a,b,c){return w(c)||(c=v),function(){var d=arguments,e=new s;return c.schedule(function(){var c;try{c=a.apply(b,d)}catch(f){return void e.onError(f)}e.onNext(c),e.onCompleted()}),e.asObservable()}};o.fromCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new r(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()}},o.fromNodeCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new r(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()}},c.config.useNativeEvents=!1,o.fromEvent=function(a,b,d){return a.addListener?C(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},d):c.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new r(function(c){return n(a,b,function(a){var b=a;if(d)try{b=d(arguments)}catch(e){return void c.onError(e)}c.onNext(b)})}).publish().refCount():C(function(c){a.on(b,c)},function(c){a.off(b,c)},d)};var C=o.fromEventPattern=function(a,b,c){return new r(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 t(function(){b&&b(e,f)})}).publish().refCount()};return o.startAsync=function(a){var b;try{b=a()}catch(c){return q(c)}return p(b)},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.binding","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){function d(a,b){return Array.isArray(a)?e.call(b,a):i(a)?A(a.call(b)):j(a)?A(a):h(a)?f(a):isPromise(a)?g(a):typeof a===x?a:z(a)||Array.isArray(a)?e.call(b,a):a}function e(a){var b=this;return function(c){function e(a,e){if(!f)try{if(a=d(a,b),typeof a!==x)return i[e]=a,--h||c(null,i);a.call(b,function(a,b){if(!f){if(a)return f=!0,c(a);i[e]=b,--h||c(null,i)}})}catch(g){f=!0,c(g)}}var f,g=Object.keys(a),h=g.length,i=new a.constructor;if(!h)return void v.schedule(function(){c(null,i)});for(var j=0,k=g.length;k>j;j++)e(a[g[j]],g[j])}}function f(a){return function(b){var c,d=!1;a.subscribe(function(a){c=a,d=!0},b,function(){d&&b(null,c)})}}function g(a){return function(b){a.then(function(a){b(null,a)},b)}}function h(a){return a&&typeof a.subscribe===x}function i(a){return a&&a.constructor&&"GeneratorFunction"===a.constructor.name}function j(a){return a&&typeof a.next===x&&typeof a[y]===x}function k(a){a&&v.schedule(function(){throw a})}function l(b){var c=function(){this.cancelBubble=!0},d=function(){if(this.bubbledKeyCode=this.keyCode,this.ctrlKey)try{this.keyCode=0}catch(a){}this.defaultPrevented=!0,this.returnValue=!1,this.modified=!0};if(b||(b=a.event),!b.target)switch(b.target=b.target||b.srcElement,"mouseover"==b.type&&(b.relatedTarget=b.fromElement),"mouseout"==b.type&&(b.relatedTarget=b.toElement),b.stopPropagation||(b.stopPropagation=c,b.preventDefault=d),b.type){case"keypress":var e="charCode"in b?b.charCode:b.keyCode;10==e?(e=0,b.keyCode=13):13==e||27==e?e=0:3==e&&(e=99),b.charCode=e,b.keyChar=b.charCode?String.fromCharCode(b.charCode):""}return b}function m(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),t(function(){a.removeEventListener(b,c,!1)});if(a.attachEvent){var d=function(a){c(l(a))};return a.attachEvent("on"+b,d),t(function(){a.detachEvent("on"+b,d)})}return a["on"+b]=c,t(function(){a["on"+b]=null})}function n(a,b,c){var d=new u;if("[object NodeList]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)d.add(n(a.item(e),b,c));else a&&d.add(m(a,b,c));return d}var o=c.Observable,p=(o.prototype,o.fromPromise),q=o.throwError,r=c.AnonymousObservable,s=c.AsyncSubject,t=c.Disposable.create,u=c.CompositeDisposable,v=(c.Scheduler.immediate,c.Scheduler["default"]),w=c.Scheduler.isScheduler,x=(Array.prototype.slice,"function"),y="throw",z=c.internals.isObject,A=c.spawn=function(a){var b=i(a);return function(c){function e(a,b){v.schedule(c.bind(g,a,b))}function f(a,b){var c;if(arguments.length>2)for(var b=[],i=1,j=arguments.length;j>i;i++)b.push(arguments[i]);if(a)try{c=h[y](a)}catch(k){return e(k)}if(!a)try{c=h.next(b)}catch(k){return e(k)}if(c.done)return e(null,c.value);if(c.value=d(c.value,g),typeof c.value!==x)f(new TypeError("Rx.spawn only supports a function, Promise, Observable, Object or Array."));else{var l=!1;try{c.value.call(g,function(){l||(l=!0,f.apply(g,arguments))})}catch(k){v.schedule(function(){l||(l=!0,f.call(g,k))})}}}var g=this,h=a;if(b){for(var i=[],j=0,l=arguments.length;l>j;j++)i.push(arguments[j]);var l=i.length,m=l&&typeof i[l-1]===x;c=m?i.pop():k,h=a.apply(this,i)}else c=c||k;f()}};o.start=function(a,b,c){return B(a,b,c)()};var B=o.toAsync=function(a,b,c){return w(c)||(c=v),function(){var d=arguments,e=new s;return c.schedule(function(){var c;try{c=a.apply(b,d)}catch(f){return void e.onError(f)}e.onNext(c),e.onCompleted()}),e.asObservable()}};o.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 r(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()}},o.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 r(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()}},c.config.useNativeEvents=!1,o.fromEvent=function(a,b,d){return a.addListener?C(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},d):c.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new r(function(c){return n(a,b,function(a){var b=a;if(d)try{b=d(arguments)}catch(e){return c.onError(e)}c.onNext(b)})}).publish().refCount():C(function(c){a.on(b,c)},function(c){a.off(b,c)},d)};var C=o.fromEventPattern=function(a,b,c){return new r(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 t(function(){b&&b(e,f)})}).publish().refCount()};return o.startAsync=function(a){var b;try{b=a()}catch(c){return q(c)}return p(b)},c});
3
3
  //# sourceMappingURL=rx.async.compat.map
@@ -37,14 +37,14 @@
37
37
  var Observable = Rx.Observable,
38
38
  observableProto = Observable.prototype,
39
39
  observableFromPromise = Observable.fromPromise,
40
- observableThrow = Observable.throwException,
40
+ observableThrow = Observable.throwError,
41
41
  AnonymousObservable = Rx.AnonymousObservable,
42
42
  AsyncSubject = Rx.AsyncSubject,
43
43
  disposableCreate = Rx.Disposable.create,
44
44
  CompositeDisposable = Rx.CompositeDisposable,
45
45
  immediateScheduler = Rx.Scheduler.immediate,
46
- timeoutScheduler = Rx.Scheduler.timeout,
47
- isScheduler = Rx.helpers.isScheduler,
46
+ timeoutScheduler = Rx.Scheduler['default'],
47
+ isScheduler = Rx.Scheduler.isScheduler,
48
48
  slice = Array.prototype.slice;
49
49
 
50
50
  var fnString = 'function',
@@ -300,17 +300,19 @@
300
300
  */
301
301
  Observable.fromCallback = function (func, context, selector) {
302
302
  return function () {
303
- for(var args = [], i = 0, len = arguments.length; i < len; i++) { args.push(arguments[i]); }
303
+ var len = arguments.length, args = new Array(len)
304
+ for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
304
305
 
305
306
  return new AnonymousObservable(function (observer) {
306
307
  function handler() {
307
- var results = arguments;
308
+ var len = arguments.length, results = new Array(len);
309
+ for(var i = 0; i < len; i++) { results[i] = arguments[i]; }
308
310
 
309
311
  if (selector) {
310
312
  try {
311
- results = selector(results);
312
- } catch (err) {
313
- return observer.onError(err);
313
+ results = selector.apply(context, results);
314
+ } catch (e) {
315
+ return observer.onError(e);
314
316
  }
315
317
 
316
318
  observer.onNext(results);
@@ -340,7 +342,8 @@
340
342
  */
341
343
  Observable.fromNodeCallback = function (func, context, selector) {
342
344
  return function () {
343
- for(var args = [], i = 0, len = arguments.length; i < len; i++) { args.push(arguments[i]); }
345
+ var len = arguments.length, args = new Array(len);
346
+ for(var i = 0; i < len; i++) { args[i] = arguments[i]; }
344
347
 
345
348
  return new AnonymousObservable(function (observer) {
346
349
  function handler(err) {
@@ -349,11 +352,12 @@
349
352
  return;
350
353
  }
351
354
 
352
- for(var results = [], i = 1, len = arguments.length; i < len; i++) { results.push(arguments[i]); }
355
+ var len = arguments.length, results = [];
356
+ for(var i = 1; i < len; i++) { results[i - 1] = arguments[i]; }
353
357
 
354
358
  if (selector) {
355
359
  try {
356
- results = selector(results);
360
+ results = selector.apply(context, results);
357
361
  } catch (e) {
358
362
  return observer.onError(e);
359
363
  }
@@ -446,8 +450,7 @@
446
450
  try {
447
451
  results = selector(arguments);
448
452
  } catch (err) {
449
- observer.onError(err);
450
- return
453
+ return observer.onError(err);
451
454
  }
452
455
  }
453
456
 
@@ -471,8 +474,7 @@
471
474
  try {
472
475
  result = selector(arguments);
473
476
  } catch (err) {
474
- observer.onError(err);
475
- return;
477
+ return observer.onError(err);
476
478
  }
477
479
  }
478
480
  observer.onNext(result);
@@ -1 +1 @@
1
- {"version":3,"file":"rx.async.min.js","sources":["rx.async.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","toThunk","obj","ctx","Array","isArray","objectToThunk","isGeneratorFunction","observableSpawn","isGenerator","isObservable","observableToThunk","isPromise","promiseToThunk","fnString","isObject","done","run","fn","key","finished","results","pending","err","res","e","keys","Object","length","constructor","timeoutScheduler","schedule","i","len","observable","value","hasValue","subscribe","v","promise","then","name","next","throwString","handleError","createListener","element","handler","addEventListener","disposableCreate","removeEventListener","Error","createEventListener","el","eventName","disposables","CompositeDisposable","prototype","toString","add","item","Observable","observableFromPromise","fromPromise","observableThrow","throwException","AnonymousObservable","AsyncSubject","Disposable","create","Scheduler","immediate","timeout","isScheduler","helpers","slice","internals","spawn","isGenFun","exit","bind","ret","arguments","push","gen","TypeError","called","apply","args","hasCallback","pop","start","func","context","scheduler","observableToAsync","toAsync","subject","result","onError","onNext","onCompleted","asObservable","fromCallback","selector","observer","publishLast","refCount","fromNodeCallback","config","useNativeEvents","fromEvent","addListener","fromEventPattern","h","removeListener","on","off","publish","addHandler","removeHandler","innerHandler","returnValue","startAsync","functionAsync"],"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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AO/E,OAEnBiG,UAAUX,WAxBFM,EACL,SAAUC,GAAKpE,EAAQsE,GAAG9D,EAAW4D,IACrC,SAAUA,GAAKpE,EAAQuE,IAAI/D,EAAW4D,IACtCV,GA+BR,IAAIS,GAAmBpD,EAAWoD,iBAAmB,SAAUM,EAAYC,EAAehB,GACxF,MAAO,IAAItC,GAAoB,SAAUuC,GACvC,QAASgB,GAAchG,GACrB,GAAIyE,GAASzE,CACb,IAAI+E,EACF,IACEN,EAASM,EAAStB,WAClB,MAAO3D,GAEP,WADAkF,GAASN,QAAQ5E,GAIrBkF,EAASL,OAAOF,GAGlB,GAAIwB,GAAcH,EAAWE,EAC7B,OAAOxE,GAAiB,WAClBuE,GACFA,EAAcC,EAAcC,OAG/BJ,UAAUX,WAkBb,OAVF9C,GAAW8D,WAAa,SAAUC,GAChC,GAAIrF,EACJ,KACEA,EAAUqF,IACV,MAAOnG,GACP,MAAOuC,GAAgBvC,GAEzB,MAAOqC,GAAsBvB,IAGtB1C"}
1
+ {"version":3,"file":"rx.async.min.js","sources":["rx.async.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","toThunk","obj","ctx","Array","isArray","objectToThunk","isGeneratorFunction","observableSpawn","isGenerator","isObservable","observableToThunk","isPromise","promiseToThunk","fnString","isObject","done","run","fn","key","finished","results","pending","err","res","e","keys","Object","length","constructor","timeoutScheduler","schedule","i","len","observable","value","hasValue","subscribe","v","promise","then","name","next","throwString","handleError","createListener","element","handler","addEventListener","disposableCreate","removeEventListener","Error","createEventListener","el","eventName","disposables","CompositeDisposable","prototype","toString","add","item","Observable","observableFromPromise","fromPromise","observableThrow","throwError","AnonymousObservable","AsyncSubject","Disposable","create","Scheduler","immediate","isScheduler","slice","internals","spawn","isGenFun","exit","bind","ret","arguments","push","gen","TypeError","called","apply","args","hasCallback","pop","start","func","context","scheduler","observableToAsync","toAsync","subject","result","onError","onNext","onCompleted","asObservable","fromCallback","selector","observer","publishLast","refCount","fromNodeCallback","config","useNativeEvents","fromEvent","addListener","fromEventPattern","h","removeListener","on","off","publish","addHandler","removeHandler","innerHandler","returnValue","startAsync","functionAsync"],"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,aAAc,WAAY,SAAUE,EAAIR,GAE5C,MADAJ,GAAKY,GAAKpB,EAAQQ,EAAMI,EAASQ,GAC1BZ,EAAKY,KAES,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,GAoBhC,QAASI,GAAQC,EAAKC,GACpB,MAAIC,OAAMC,QAAQH,GAAgBI,EAAcP,KAAKI,EAAKD,GACtDK,EAAoBL,GAAeM,EAAgBN,EAAIH,KAAKI,IAC5DM,EAAYP,GAAgBM,EAAgBN,GAC5CQ,EAAaR,GAAeS,EAAkBT,GAC9CU,UAAUV,GAAeW,EAAeX,SACjCA,KAAQY,EAAmBZ,EAClCa,EAASb,IAAQE,MAAMC,QAAQH,GAAeI,EAAcP,KAAKI,EAAKD,GAEnEA,EAGT,QAASI,GAAcJ,GACrB,GAAIC,GAAMhB,IAEV,OAAO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P,MAAOuC,GAAgBvC,GAEzB,MAAOqC,GAAsBvB,IAGtB1C"}
@@ -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.binding","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){function d(a,b){return Array.isArray(a)?e.call(b,a):i(a)?z(a.call(b)):j(a)?z(a):h(a)?f(a):isPromise(a)?g(a):typeof a===w?a:y(a)||Array.isArray(a)?e.call(b,a):a}function e(a){var b=this;return function(c){function e(a,e){if(!f)try{if(a=d(a,b),typeof a!==w)return i[e]=a,--h||c(null,i);a.call(b,function(a,b){if(!f){if(a)return f=!0,c(a);i[e]=b,--h||c(null,i)}})}catch(g){f=!0,c(g)}}var f,g=Object.keys(a),h=g.length,i=new a.constructor;if(!h)return void u.schedule(function(){c(null,i)});for(var j=0,k=g.length;k>j;j++)e(a[g[j]],g[j])}}function f(a){return function(b){var c,d=!1;a.subscribe(function(a){c=a,d=!0},b,function(){d&&b(null,c)})}}function g(a){return function(b){a.then(function(a){b(null,a)},b)}}function h(a){return a&&typeof a.subscribe===w}function i(a){return a&&a.constructor&&"GeneratorFunction"===a.constructor.name}function j(a){return a&&typeof a.next===w&&typeof a[x]===w}function k(a){a&&u.schedule(function(){throw a})}function l(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),s(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function m(a,b,c){var d=new t;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}var n=c.Observable,o=(n.prototype,n.fromPromise),p=n.throwException,q=c.AnonymousObservable,r=c.AsyncSubject,s=c.Disposable.create,t=c.CompositeDisposable,u=(c.Scheduler.immediate,c.Scheduler.timeout),v=c.helpers.isScheduler,w=(Array.prototype.slice,"function"),x="throw",y=c.internals.isObject,z=c.spawn=function(a){var b=i(a);return function(c){function e(a,b){u.schedule(c.bind(g,a,b))}function f(a,b){var c;if(arguments.length>2)for(var b=[],i=1,j=arguments.length;j>i;i++)b.push(arguments[i]);if(a)try{c=h[x](a)}catch(k){return e(k)}if(!a)try{c=h.next(b)}catch(k){return e(k)}if(c.done)return e(null,c.value);if(c.value=d(c.value,g),typeof c.value!==w)f(new TypeError("Rx.spawn only supports a function, Promise, Observable, Object or Array."));else{var l=!1;try{c.value.call(g,function(){l||(l=!0,f.apply(g,arguments))})}catch(k){u.schedule(function(){l||(l=!0,f.call(g,k))})}}}var g=this,h=a;if(b){for(var i=[],j=0,l=arguments.length;l>j;j++)i.push(arguments[j]);var l=i.length,m=l&&typeof i[l-1]===w;c=m?i.pop():k,h=a.apply(this,i)}else c=c||k;f()}};n.start=function(a,b,c){return A(a,b,c)()};var A=n.toAsync=function(a,b,c){return v(c)||(c=u),function(){var d=arguments,e=new r;return c.schedule(function(){var c;try{c=a.apply(b,d)}catch(f){return void e.onError(f)}e.onNext(c),e.onCompleted()}),e.asObservable()}};n.fromCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new q(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()}},n.fromNodeCallback=function(a,b,c){return function(){for(var d=[],e=0,f=arguments.length;f>e;e++)d.push(arguments[e]);return new q(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()}},c.config.useNativeEvents=!1,n.fromEvent=function(a,b,d){return a.addListener?B(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},d):c.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new q(function(c){return m(a,b,function(a){var b=a;if(d)try{b=d(arguments)}catch(e){return void c.onError(e)}c.onNext(b)})}).publish().refCount():B(function(c){a.on(b,c)},function(c){a.off(b,c)},d)};var B=n.fromEventPattern=function(a,b,c){return new q(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 s(function(){b&&b(e,f)})}).publish().refCount()};return n.startAsync=function(a){var b;try{b=a()}catch(c){return p(c)}return o(b)},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.binding","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){function d(a,b){return Array.isArray(a)?e.call(b,a):i(a)?z(a.call(b)):j(a)?z(a):h(a)?f(a):isPromise(a)?g(a):typeof a===w?a:y(a)||Array.isArray(a)?e.call(b,a):a}function e(a){var b=this;return function(c){function e(a,e){if(!f)try{if(a=d(a,b),typeof a!==w)return i[e]=a,--h||c(null,i);a.call(b,function(a,b){if(!f){if(a)return f=!0,c(a);i[e]=b,--h||c(null,i)}})}catch(g){f=!0,c(g)}}var f,g=Object.keys(a),h=g.length,i=new a.constructor;if(!h)return void u.schedule(function(){c(null,i)});for(var j=0,k=g.length;k>j;j++)e(a[g[j]],g[j])}}function f(a){return function(b){var c,d=!1;a.subscribe(function(a){c=a,d=!0},b,function(){d&&b(null,c)})}}function g(a){return function(b){a.then(function(a){b(null,a)},b)}}function h(a){return a&&typeof a.subscribe===w}function i(a){return a&&a.constructor&&"GeneratorFunction"===a.constructor.name}function j(a){return a&&typeof a.next===w&&typeof a[x]===w}function k(a){a&&u.schedule(function(){throw a})}function l(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1),s(function(){a.removeEventListener(b,c,!1)});throw new Error("No listener found")}function m(a,b,c){var d=new t;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}var n=c.Observable,o=(n.prototype,n.fromPromise),p=n.throwError,q=c.AnonymousObservable,r=c.AsyncSubject,s=c.Disposable.create,t=c.CompositeDisposable,u=(c.Scheduler.immediate,c.Scheduler["default"]),v=c.Scheduler.isScheduler,w=(Array.prototype.slice,"function"),x="throw",y=c.internals.isObject,z=c.spawn=function(a){var b=i(a);return function(c){function e(a,b){u.schedule(c.bind(g,a,b))}function f(a,b){var c;if(arguments.length>2)for(var b=[],i=1,j=arguments.length;j>i;i++)b.push(arguments[i]);if(a)try{c=h[x](a)}catch(k){return e(k)}if(!a)try{c=h.next(b)}catch(k){return e(k)}if(c.done)return e(null,c.value);if(c.value=d(c.value,g),typeof c.value!==w)f(new TypeError("Rx.spawn only supports a function, Promise, Observable, Object or Array."));else{var l=!1;try{c.value.call(g,function(){l||(l=!0,f.apply(g,arguments))})}catch(k){u.schedule(function(){l||(l=!0,f.call(g,k))})}}}var g=this,h=a;if(b){for(var i=[],j=0,l=arguments.length;l>j;j++)i.push(arguments[j]);var l=i.length,m=l&&typeof i[l-1]===w;c=m?i.pop():k,h=a.apply(this,i)}else c=c||k;f()}};n.start=function(a,b,c){return A(a,b,c)()};var A=n.toAsync=function(a,b,c){return v(c)||(c=u),function(){var d=arguments,e=new r;return c.schedule(function(){var c;try{c=a.apply(b,d)}catch(f){return void e.onError(f)}e.onNext(c),e.onCompleted()}),e.asObservable()}};n.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 q(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()}},n.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 q(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()}},c.config.useNativeEvents=!1,n.fromEvent=function(a,b,d){return a.addListener?B(function(c){a.addListener(b,c)},function(c){a.removeListener(b,c)},d):c.config.useNativeEvents||"function"!=typeof a.on||"function"!=typeof a.off?new q(function(c){return m(a,b,function(a){var b=a;if(d)try{b=d(arguments)}catch(e){return c.onError(e)}c.onNext(b)})}).publish().refCount():B(function(c){a.on(b,c)},function(c){a.off(b,c)},d)};var B=n.fromEventPattern=function(a,b,c){return new q(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 s(function(){b&&b(e,f)})}).publish().refCount()};return n.startAsync=function(a){var b;try{b=a()}catch(c){return p(c)}return o(b)},c});
3
3
  //# sourceMappingURL=rx.async.map
@@ -38,6 +38,7 @@
38
38
  AnonymousObservable = Rx.AnonymousObservable,
39
39
  AbstractObserver = Rx.internals.AbstractObserver,
40
40
  CompositeDisposable = Rx.CompositeDisposable,
41
+ Notification = Rx.Notification,
41
42
  Subject = Rx.Subject,
42
43
  Observer = Rx.Observer,
43
44
  disposableEmpty = Rx.Disposable.empty,
@@ -46,10 +47,9 @@
46
47
  addProperties = Rx.internals.addProperties,
47
48
  timeoutScheduler = Rx.Scheduler.timeout,
48
49
  currentThreadScheduler = Rx.Scheduler.currentThread,
49
- identity = Rx.helpers.identity;
50
-
51
- var objectDisposed = 'Object has been disposed';
52
- function checkDisposed() { if (this.isDisposed) { throw new Error(objectDisposed); } }
50
+ identity = Rx.helpers.identity,
51
+ isScheduler = Rx.Scheduler.isScheduler,
52
+ checkDisposed = Rx.Disposable.checkDisposed;
53
53
 
54
54
  /**
55
55
  * Used to pause and resume streams.
@@ -290,15 +290,14 @@
290
290
  return this.source.subscribe(observer);
291
291
  }
292
292
 
293
- function ControlledObservable (source, enableQueue) {
293
+ function ControlledObservable (source, enableQueue, scheduler) {
294
294
  __super__.call(this, subscribe, source);
295
- this.subject = new ControlledSubject(enableQueue);
295
+ this.subject = new ControlledSubject(enableQueue, scheduler);
296
296
  this.source = source.multicast(this.subject).refCount();
297
297
  }
298
298
 
299
299
  ControlledObservable.prototype.request = function (numberOfItems) {
300
- if (numberOfItems == null) { numberOfItems = -1; }
301
- return this.subject.request(numberOfItems);
300
+ return this.subject.request(numberOfItems == null ? -1 : numberOfItems);
302
301
  };
303
302
 
304
303
  return ControlledObservable;
@@ -313,7 +312,7 @@
313
312
 
314
313
  inherits(ControlledSubject, __super__);
315
314
 
316
- function ControlledSubject(enableQueue) {
315
+ function ControlledSubject(enableQueue, scheduler) {
317
316
  enableQueue == null && (enableQueue = true);
318
317
 
319
318
  __super__.call(this, subscribe);
@@ -325,24 +324,32 @@
325
324
  this.error = null;
326
325
  this.hasFailed = false;
327
326
  this.hasCompleted = false;
328
- this.controlledDisposable = disposableEmpty;
327
+ this.scheduler = scheduler || currentThreadScheduler;
329
328
  }
330
329
 
331
330
  addProperties(ControlledSubject.prototype, Observer, {
332
331
  onCompleted: function () {
333
332
  this.hasCompleted = true;
334
- (!this.enableQueue || this.queue.length === 0) && this.subject.onCompleted();
333
+ if (!this.enableQueue || this.queue.length === 0) {
334
+ this.subject.onCompleted();
335
+ } else {
336
+ this.queue.push(Notification.createOnCompleted());
337
+ }
335
338
  },
336
339
  onError: function (error) {
337
340
  this.hasFailed = true;
338
341
  this.error = error;
339
- (!this.enableQueue || this.queue.length === 0) && this.subject.onError(error);
342
+ if (!this.enableQueue || this.queue.length === 0) {
343
+ this.subject.onError(error);
344
+ } else {
345
+ this.queue.push(Notification.createOnError(error));
346
+ }
340
347
  },
341
348
  onNext: function (value) {
342
349
  var hasRequested = false;
343
350
 
344
351
  if (this.requestedCount === 0) {
345
- this.enableQueue && this.queue.push(value);
352
+ this.enableQueue && this.queue.push(Notification.createOnNext(value));
346
353
  } else {
347
354
  (this.requestedCount !== -1 && this.requestedCount-- === 0) && this.disposeCurrentRequest();
348
355
  hasRequested = true;
@@ -351,43 +358,39 @@
351
358
  },
352
359
  _processRequest: function (numberOfItems) {
353
360
  if (this.enableQueue) {
354
- while (this.queue.length >= numberOfItems && numberOfItems > 0) {
355
- this.subject.onNext(this.queue.shift());
356
- numberOfItems--;
361
+ while ((this.queue.length >= numberOfItems && numberOfItems > 0) ||
362
+ (this.queue.length > 0 && this.queue[0].kind !== 'N')) {
363
+ var first = this.queue.shift();
364
+ first.accept(this.subject);
365
+ if (first.kind === 'N') {
366
+ numberOfItems--;
367
+ } else {
368
+ this.disposeCurrentRequest();
369
+ this.queue = [];
370
+ }
357
371
  }
358
372
 
359
- return this.queue.length !== 0 ?
360
- { numberOfItems: numberOfItems, returnValue: true } :
361
- { numberOfItems: numberOfItems, returnValue: false };
362
- }
363
-
364
- if (this.hasFailed) {
365
- this.subject.onError(this.error);
366
- this.controlledDisposable.dispose();
367
- this.controlledDisposable = disposableEmpty;
368
- } else if (this.hasCompleted) {
369
- this.subject.onCompleted();
370
- this.controlledDisposable.dispose();
371
- this.controlledDisposable = disposableEmpty;
373
+ return { numberOfItems : numberOfItems, returnValue: this.queue.length !== 0};
372
374
  }
373
375
 
374
376
  return { numberOfItems: numberOfItems, returnValue: false };
375
377
  },
376
378
  request: function (number) {
377
379
  this.disposeCurrentRequest();
378
- var self = this, r = this._processRequest(number);
380
+ var self = this;
379
381
 
380
- var number = r.numberOfItems;
381
- if (!r.returnValue) {
382
- this.requestedCount = number;
383
- this.requestedDisposable = disposableCreate(function () {
384
- self.requestedCount = 0;
385
- });
382
+ this.requestedDisposable = this.scheduler.scheduleWithState(number,
383
+ function(s, i) {
384
+ var r = self._processRequest(i), remaining = r.numberOfItems;
385
+ if (!r.returnValue) {
386
+ self.requestedCount = remaining;
387
+ self.requestedDisposable = disposableCreate(function () {
388
+ self.requestedCount = 0;
389
+ });
390
+ }
391
+ });
386
392
 
387
- return this.requestedDisposable
388
- } else {
389
- return disposableEmpty;
390
- }
393
+ return this.requestedDisposable;
391
394
  },
392
395
  disposeCurrentRequest: function () {
393
396
  this.requestedDisposable.dispose();
@@ -403,12 +406,19 @@
403
406
  * @example
404
407
  * var source = Rx.Observable.interval(100).controlled();
405
408
  * source.request(3); // Reads 3 values
406
- * @param {Observable} pauser The observable sequence used to pause the underlying sequence.
409
+ * @param {bool} enableQueue truthy value to determine if values should be queued pending the next request
410
+ * @param {Scheduler} scheduler determines how the requests will be scheduled
407
411
  * @returns {Observable} The observable sequence which is paused based upon the pauser.
408
412
  */
409
- observableProto.controlled = function (enableQueue) {
413
+ observableProto.controlled = function (enableQueue, scheduler) {
414
+
415
+ if (enableQueue && isScheduler(enableQueue)) {
416
+ scheduler = enableQueue;
417
+ enableQueue = true;
418
+ }
419
+
410
420
  if (enableQueue == null) { enableQueue = true; }
411
- return new ControlledObservable(this, enableQueue);
421
+ return new ControlledObservable(this, enableQueue, scheduler);
412
422
  };
413
423
 
414
424
  var StopAndWaitObservable = (function (__super__) {
@@ -1 +1 @@
1
- {"version":3,"file":"rx.backpressure.min.js","sources":["rx.backpressure.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","combineLatestSource","source","subject","resultSelector","AnonymousObservable","o","next","x","i","values","res","hasValue","hasValueAll","every","identity","err","onError","apply","ex","onNext","isDone","onCompleted","Array","CompositeDisposable","subscribe","e","Observable","observableProto","prototype","AbstractObserver","internals","Subject","Observer","disposableEmpty","Disposable","empty","disposableCreate","create","inherits","addProperties","timeoutScheduler","Scheduler","timeout","currentThread","helpers","Pauser","__super__","pause","resume","PausableObservable","observer","conn","publish","subscription","connection","pausable","pauser","distinctUntilChanged","b","connect","dispose","controller","merge","PausableBufferedObservable","previousShouldFire","q","startWith","data","shouldFire","results","length","shift","push","pausableBuffered","ControlledObservable","enableQueue","ControlledSubject","multicast","refCount","request","numberOfItems","queue","requestedCount","requestedDisposable","error","hasFailed","hasCompleted","controlledDisposable","value","hasRequested","disposeCurrentRequest","_processRequest","returnValue","self","r","controlled","StopAndWaitObservable","StopAndWaitObserver","schedule","__sub__","observable","cancel","stopAndWaitObserverProto","completed","stopAndWait","WindowedObservable","WindowedObserver","windowSize","received","windowedObserverPrototype","windowed"],"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,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KAAKyH,WAAaA,EALpBrE,EAASmE,EAAoB3D,EAQ7B,IAAI4D,GAAoB,SAAUP,GAIhC,QAASO,GAAiBxD,EAAUkD,EAAYC,GAC9CnH,KAAKgE,SAAWA,EAChBhE,KAAKkH,WAAaA,EAClBlH,KAAKmH,OAASA,EACdnH,KAAK0H,SAAW,EANlBtE,EAASoE,EAAkBP,EAS3B,IAAIU,GAA4BH,EAAiB9E,SAiCjD,OA/BAiF,GAA0BN,UAAY,WACpCrH,KAAKgE,SAAS7B,cACdnC,KAAK0E,WAGPiD,EAA0BzB,MAAQ,SAAUA,GAC1ClG,KAAKgE,SAASlC,QAAQoE,GACtBlG,KAAK0E,WAGPiD,EAA0BvG,KAAO,SAAUkF,GAIzC,GAHAtG,KAAKgE,SAAS/B,OAAOqE,GAErBtG,KAAK0H,WAAa1H,KAAK0H,SAAW1H,KAAKkH,WAAWO,WAC5B,IAAlBzH,KAAK0H,SAAgB,CACvB,GAAIf,GAAO3G,IACXsD,GAAiB0D,SAAS,WACxBL,EAAKO,WAAWnG,OAAO8E,QAAQc,EAAKO,WAAWO,gBAKrDE,EAA0BjD,QAAU,WAClC1E,KAAKgE,SAAW,KACZhE,KAAKmH,SACPnH,KAAKmH,OAAOzC,UACZ1E,KAAKmH,OAAS,MAEhBF,EAAQvE,UAAUgC,QAAQ9D,KAAKZ,OAG1BwH,GACP7E,EAEF,OAAO4E,IACP/E,EAWA,OAJFgD,GAAqB9C,UAAUkF,SAAW,SAAUH,GAClD,MAAO,IAAIF,GAAmBvH,KAAMyH,IAG7B/G"}
1
+ {"version":3,"file":"rx.backpressure.min.js","sources":["rx.backpressure.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","combineLatestSource","source","subject","resultSelector","AnonymousObservable","o","next","x","i","values","res","hasValue","hasValueAll","every","identity","err","onError","apply","ex","onNext","isDone","onCompleted","Array","CompositeDisposable","subscribe","e","Observable","observableProto","prototype","AbstractObserver","internals","Notification","Subject","Observer","disposableEmpty","Disposable","empty","disposableCreate","create","inherits","addProperties","timeoutScheduler","Scheduler","timeout","currentThreadScheduler","currentThread","helpers","isScheduler","checkDisposed","Pauser","__super__","pause","resume","PausableObservable","observer","conn","publish","subscription","connection","pausable","pauser","distinctUntilChanged","b","connect","dispose","controller","merge","PausableBufferedObservable","previousShouldFire","q","startWith","data","shouldFire","results","length","shift","push","pausableBuffered","ControlledObservable","enableQueue","scheduler","ControlledSubject","multicast","refCount","request","numberOfItems","queue","requestedCount","requestedDisposable","error","hasFailed","hasCompleted","createOnCompleted","createOnError","value","hasRequested","createOnNext","disposeCurrentRequest","_processRequest","kind","first","accept","returnValue","self","scheduleWithState","s","r","remaining","controlled","StopAndWaitObservable","StopAndWaitObserver","schedule","__sub__","observable","cancel","stopAndWaitObserverProto","completed","stopAndWait","WindowedObservable","WindowedObserver","windowSize","received","windowedObserverPrototype","windowed"],"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,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AUpD,KAAKZ,KAAMsC,EAAWvB,GAChCf,KAAKe,OAASA,EACdf,KAAKsI,WAAaA,EALpBjF,EAAS+E,EAAoBpE,EAQ7B,IAAIqE,GAAoB,SAAUP,GAIhC,QAASO,GAAiBjE,EAAU2D,EAAYC,GAC9ChI,KAAKoE,SAAWA,EAChBpE,KAAK+H,WAAaA,EAClB/H,KAAKgI,OAASA,EACdhI,KAAKuI,SAAW,EANlBlF,EAASgF,EAAkBP,EAS3B,IAAIU,GAA4BH,EAAiB3F,SAiCjD,OA/BA8F,GAA0BN,UAAY,WACpClI,KAAKoE,SAASjC,cACdnC,KAAK8E,WAGP0D,EAA0BjC,MAAQ,SAAUA,GAC1CvG,KAAKoE,SAAStC,QAAQyE,GACtBvG,KAAK8E,WAGP0D,EAA0BpH,KAAO,SAAUwF,GAIzC,GAHA5G,KAAKoE,SAASnC,OAAO2E,GAErB5G,KAAKuI,WAAavI,KAAKuI,SAAWvI,KAAK+H,WAAWO,WAC5B,IAAlBtI,KAAKuI,SAAgB,CACvB,GAAIlB,GAAOrH,IACXuD,GAAiBsE,SAAS,WACxBR,EAAKU,WAAWhH,OAAOmF,QAAQmB,EAAKU,WAAWO,gBAKrDE,EAA0B1D,QAAU,WAClC9E,KAAKoE,SAAW,KACZpE,KAAKgI,SACPhI,KAAKgI,OAAOlD,UACZ9E,KAAKgI,OAAS,MAEhBF,EAAQpF,UAAUoC,QAAQlE,KAAKZ,OAG1BqI,GACP1F,EAEF,OAAOyF,IACP5F,EAWA,OAJFoD,GAAqBlD,UAAU+F,SAAW,SAAUH,GAClD,MAAO,IAAIF,GAAmBpI,KAAMsI,IAG7B5H"}
@@ -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,c){return new h(function(d){function e(a,b){k[b]=a;var e;if(g[b]=!0,h||(h=g.every(r))){if(f)return void d.onError(f);try{e=c.apply(null,k)}catch(j){return void d.onError(j)}d.onNext(e)}i&&k[1]&&d.onCompleted()}var f,g=[!1,!1],h=!1,i=!1,k=new Array(2);return new j(a.subscribe(function(a){e(a,0)},function(a){k[1]?d.onError(a):f=a},function(){i=!0,k[1]&&d.onCompleted()}),b.subscribe(function(a){e(a,1)},function(a){d.onError(a)},function(){i=!0,e(!0,1)}))},a)}var f=c.Observable,g=f.prototype,h=c.AnonymousObservable,i=c.internals.AbstractObserver,j=c.CompositeDisposable,k=c.Subject,l=c.Observer,m=c.Disposable.empty,n=c.Disposable.create,o=c.internals.inherits,p=c.internals.addProperties,q=c.Scheduler.timeout,r=(c.Scheduler.currentThread,c.helpers.identity);c.Pauser=function(a){function b(){a.call(this)}return o(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(k);var s=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=m,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=m)});return new j(c,d,e)}function c(c,d){this.source=c,this.controller=new k,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b,c)}return o(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(f);g.pausable=function(a){return new s(this,a)};var t=function(a){function b(a){var b,c=[],f=e(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(b!==d&&e.shouldFire!=b){if(b=e.shouldFire,e.shouldFire)for(;c.length>0;)a.onNext(c.shift())}else b=e.shouldFire,e.shouldFire?a.onNext(e.data):c.push(e.data)},function(b){for(;c.length>0;)a.onNext(c.shift());a.onError(b)},function(){for(;c.length>0;)a.onNext(c.shift());a.onCompleted()});return f}function c(c,d){this.source=c,this.controller=new k,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b,c)}return o(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(f);g.pausableBuffered=function(a){return new t(this,a)};var u=function(a){function b(a){return this.source.subscribe(a)}function c(c,d){a.call(this,b,c),this.subject=new v(d),this.source=c.multicast(this.subject).refCount()}return o(c,a),c.prototype.request=function(a){return null==a&&(a=-1),this.subject.request(a)},c}(f),v=function(a){function b(a){return this.subject.subscribe(a)}function c(c){null==c&&(c=!0),a.call(this,b),this.subject=new k,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=m,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.controlledDisposable=m}return o(c,a),p(c.prototype,l,{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=m):this.hasCompleted&&(this.subject.onCompleted(),this.controlledDisposable.dispose(),this.controlledDisposable=m),{numberOfItems:a,returnValue:!1}},request:function(a){this.disposeCurrentRequest();var b=this,c=this._processRequest(a),a=c.numberOfItems;return c.returnValue?m:(this.requestedCount=a,this.requestedDisposable=n(function(){b.requestedCount=0}),this.requestedDisposable)},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=m}}),c}(f);g.controlled=function(a){return null==a&&(a=!0),new u(this,a)};var w=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return q.schedule(function(){b.source.request(1)}),this.subscription}function c(c){a.call(this,b,c),this.source=c}o(c,a);var d=function(a){function b(b,c,d){a.call(this),this.observer=b,this.observable=c,this.cancel=d}o(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){this.observer.onNext(a);var b=this;q.schedule(function(){b.observable.source.request(1)})},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(i);return c}(f);u.prototype.stopAndWait=function(){return new w(this)};var x=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return q.schedule(function(){b.source.request(b.windowSize)}),this.subscription}function c(c,d){a.call(this,b,c),this.source=c,this.windowSize=d}o(c,a);var d=function(a){function b(a,b,c){this.observer=a,this.observable=b,this.cancel=c,this.received=0}o(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){if(this.observer.onNext(a),this.received=++this.received%this.observable.windowSize,0===this.received){var b=this;q.schedule(function(){b.observable.source.request(b.observable.windowSize)})}},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(i);return c}(f);return u.prototype.windowed=function(a){return new x(this,a)},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(a,b,c){return new h(function(d){function e(a,b){k[b]=a;var e;if(g[b]=!0,h||(h=g.every(t))){if(f)return void d.onError(f);try{e=c.apply(null,k)}catch(j){return void d.onError(j)}d.onNext(e)}i&&k[1]&&d.onCompleted()}var f,g=[!1,!1],h=!1,i=!1,k=new Array(2);return new j(a.subscribe(function(a){e(a,0)},function(a){k[1]?d.onError(a):f=a},function(){i=!0,k[1]&&d.onCompleted()}),b.subscribe(function(a){e(a,1)},function(a){d.onError(a)},function(){i=!0,e(!0,1)}))},a)}{var f=c.Observable,g=f.prototype,h=c.AnonymousObservable,i=c.internals.AbstractObserver,j=c.CompositeDisposable,k=c.Notification,l=c.Subject,m=c.Observer,n=c.Disposable.empty,o=c.Disposable.create,p=c.internals.inherits,q=c.internals.addProperties,r=c.Scheduler.timeout,s=c.Scheduler.currentThread,t=c.helpers.identity,u=c.Scheduler.isScheduler;c.Disposable.checkDisposed}c.Pauser=function(a){function b(){a.call(this)}return p(b,a),b.prototype.pause=function(){this.onNext(!1)},b.prototype.resume=function(){this.onNext(!0)},b}(l);var v=function(a){function b(a){var b=this.source.publish(),c=b.subscribe(a),d=n,e=this.pauser.distinctUntilChanged().subscribe(function(a){a?d=b.connect():(d.dispose(),d=n)});return new j(c,d,e)}function c(c,d){this.source=c,this.controller=new l,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b,c)}return p(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(f);g.pausable=function(a){return new v(this,a)};var w=function(a){function b(a){var b,c=[],f=e(this.source,this.pauser.distinctUntilChanged().startWith(!1),function(a,b){return{data:a,shouldFire:b}}).subscribe(function(e){if(b!==d&&e.shouldFire!=b){if(b=e.shouldFire,e.shouldFire)for(;c.length>0;)a.onNext(c.shift())}else b=e.shouldFire,e.shouldFire?a.onNext(e.data):c.push(e.data)},function(b){for(;c.length>0;)a.onNext(c.shift());a.onError(b)},function(){for(;c.length>0;)a.onNext(c.shift());a.onCompleted()});return f}function c(c,d){this.source=c,this.controller=new l,this.pauser=d&&d.subscribe?this.controller.merge(d):this.controller,a.call(this,b,c)}return p(c,a),c.prototype.pause=function(){this.controller.onNext(!1)},c.prototype.resume=function(){this.controller.onNext(!0)},c}(f);g.pausableBuffered=function(a){return new w(this,a)};var x=function(a){function b(a){return this.source.subscribe(a)}function c(c,d,e){a.call(this,b,c),this.subject=new y(d,e),this.source=c.multicast(this.subject).refCount()}return p(c,a),c.prototype.request=function(a){return this.subject.request(null==a?-1:a)},c}(f),y=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 l,this.enableQueue=c,this.queue=c?[]:null,this.requestedCount=0,this.requestedDisposable=n,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.scheduler=d||s}return p(c,a),q(c.prototype,m,{onCompleted:function(){this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length?this.queue.push(k.createOnCompleted()):this.subject.onCompleted()},onError:function(a){this.hasFailed=!0,this.error=a,this.enableQueue&&0!==this.queue.length?this.queue.push(k.createOnError(a)):this.subject.onError(a)},onNext:function(a){var b=!1;0===this.requestedCount?this.enableQueue&&this.queue.push(k.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=o(function(){b.requestedCount=0}))}),this.requestedDisposable},disposeCurrentRequest:function(){this.requestedDisposable.dispose(),this.requestedDisposable=n}}),c}(f);g.controlled=function(a,b){return a&&u(a)&&(b=a,a=!0),null==a&&(a=!0),new x(this,a,b)};var z=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return r.schedule(function(){b.source.request(1)}),this.subscription}function c(c){a.call(this,b,c),this.source=c}p(c,a);var d=function(a){function b(b,c,d){a.call(this),this.observer=b,this.observable=c,this.cancel=d}p(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){this.observer.onNext(a);var b=this;r.schedule(function(){b.observable.source.request(1)})},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(i);return c}(f);x.prototype.stopAndWait=function(){return new z(this)};var A=function(a){function b(a){this.subscription=this.source.subscribe(new d(a,this,this.subscription));var b=this;return r.schedule(function(){b.source.request(b.windowSize)}),this.subscription}function c(c,d){a.call(this,b,c),this.source=c,this.windowSize=d}p(c,a);var d=function(a){function b(a,b,c){this.observer=a,this.observable=b,this.cancel=c,this.received=0}p(b,a);var c=b.prototype;return c.completed=function(){this.observer.onCompleted(),this.dispose()},c.error=function(a){this.observer.onError(a),this.dispose()},c.next=function(a){if(this.observer.onNext(a),this.received=++this.received%this.observable.windowSize,0===this.received){var b=this;r.schedule(function(){b.observable.source.request(b.observable.windowSize)})}},c.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),a.prototype.dispose.call(this)},b}(i);return c}(f);return x.prototype.windowed=function(a){return new A(this,a)},c});
3
3
  //# sourceMappingURL=rx.backpressure.map
@@ -45,12 +45,15 @@
45
45
  currentThreadScheduler = Rx.Scheduler.currentThread,
46
46
  isFunction = Rx.helpers.isFunction,
47
47
  inherits = Rx.internals.inherits,
48
- addProperties = Rx.internals.addProperties;
48
+ addProperties = Rx.internals.addProperties,
49
+ checkDisposed = Rx.Disposable.checkDisposed;
49
50
 
50
51
  // Utilities
51
- var objectDisposed = 'Object has been disposed';
52
- function checkDisposed(self) { if (self.isDisposed) { throw new Error(objectDisposed); } }
53
- function cloneArray(arr) { for(var a = [], i = 0, len = arr.length; i < len; i++) { a.push(arr[i]); } return a;}
52
+ function cloneArray(arr) {
53
+ var len = arr.length, a = new Array(len);
54
+ for(var i = 0; i < len; i++) { a[i] = arr[i]; }
55
+ return a;
56
+ }
54
57
 
55
58
  /**
56
59
  * Multicasts the source sequence notifications through an instantiated subject into all uses of the sequence within a selector function. Each
@@ -164,14 +167,14 @@
164
167
  *
165
168
  * @param selector [Optional] Selector function which can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will receive all the notifications of the source subject to the specified replay buffer trimming policy.
166
169
  * @param bufferSize [Optional] Maximum element count of the replay buffer.
167
- * @param window [Optional] Maximum time length of the replay buffer.
170
+ * @param windowSize [Optional] Maximum time length of the replay buffer.
168
171
  * @param scheduler [Optional] Scheduler where connected observers within the selector function will be invoked on.
169
172
  * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function.
170
173
  */
171
- observableProto.replay = function (selector, bufferSize, window, scheduler) {
174
+ observableProto.replay = function (selector, bufferSize, windowSize, scheduler) {
172
175
  return selector && isFunction(selector) ?
173
- this.multicast(function () { return new ReplaySubject(bufferSize, window, scheduler); }, selector) :
174
- this.multicast(new ReplaySubject(bufferSize, window, scheduler));
176
+ this.multicast(function () { return new ReplaySubject(bufferSize, windowSize, scheduler); }, selector) :
177
+ this.multicast(new ReplaySubject(bufferSize, windowSize, scheduler));
175
178
  };
176
179
 
177
180
  /**
@@ -189,8 +192,8 @@
189
192
  * @param scheduler [Optional] Scheduler where connected observers within the selector function will be invoked on.
190
193
  * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence.
191
194
  */
192
- observableProto.shareReplay = function (bufferSize, window, scheduler) {
193
- return this.replay(null, bufferSize, window, scheduler).refCount();
195
+ observableProto.shareReplay = function (bufferSize, windowSize, scheduler) {
196
+ return this.replay(null, bufferSize, windowSize, scheduler).refCount();
194
197
  };
195
198
 
196
199
  var InnerSubscription = function (subject, observer) {
@@ -242,6 +245,20 @@
242
245
  }
243
246
 
244
247
  addProperties(BehaviorSubject.prototype, Observer, {
248
+ /**
249
+ * Gets the current value or throws an exception.
250
+ * Value is frozen after onCompleted is called.
251
+ * After onError is called always throws the specified exception.
252
+ * An exception is always thrown after dispose is called.
253
+ * @returns {Mixed} The initial value passed to the constructor until onNext is called; after which, the last value passed to onNext.
254
+ */
255
+ getValue: function () {
256
+ checkDisposed(this);
257
+ if (this.hasError) {
258
+ throw this.error;
259
+ }
260
+ return this.value;
261
+ },
245
262
  /**
246
263
  * Indicates whether the subject has observers subscribed to it.
247
264
  * @returns {Boolean} Indicates whether the subject has observers subscribed to it.
@@ -309,6 +326,8 @@
309
326
  */
310
327
  var ReplaySubject = Rx.ReplaySubject = (function (__super__) {
311
328
 
329
+ var maxSafeInteger = Math.pow(2, 53) - 1;
330
+
312
331
  function createRemovableDisposable(subject, observer) {
313
332
  return disposableCreate(function () {
314
333
  observer.dispose();
@@ -346,8 +365,8 @@
346
365
  * @param {Scheduler} [scheduler] Scheduler the observers are invoked on.
347
366
  */
348
367
  function ReplaySubject(bufferSize, windowSize, scheduler) {
349
- this.bufferSize = bufferSize == null ? Number.MAX_VALUE : bufferSize;
350
- this.windowSize = windowSize == null ? Number.MAX_VALUE : windowSize;
368
+ this.bufferSize = bufferSize == null ? maxSafeInteger : bufferSize;
369
+ this.windowSize = windowSize == null ? maxSafeInteger : windowSize;
351
370
  this.scheduler = scheduler || currentThreadScheduler;
352
371
  this.q = [];
353
372
  this.observers = [];