{ "version": 3, "sources": ["../ui/app/mn.tasks.service.js"], "sourcesContent": ["/*\nCopyright 2020-Present Couchbase, Inc.\n\nUse of this software is governed by the Business Source License included in\nthe file licenses/BSL-Couchbase.txt. As of the Change Date specified in that\nfile, in accordance with the Business Source License, use of this software will\nbe governed by the Apache License, Version 2.0, included in the file\nlicenses/APL2.txt.\n*/\n\nimport {Injectable} from '@angular/core';\nimport {BehaviorSubject} from 'rxjs';\nimport {shareReplay, map, filter} from 'rxjs/operators';\nimport {groupBy, prop} from 'ramda';\n\nimport {singletonGuard} from './mn.core.js';\n\nexport {MnTasksService}\n\nclass MnTasksService {\n static get annotations() { return [\n new Injectable()\n ]}\n\n static get parameters() { return [] }\n\n constructor() {\n singletonGuard(MnTasksService);\n\n this.stream = {};\n this.stream.tasksXDCRPlug = new BehaviorSubject();\n this.stream.tasksXDCR = this.stream.tasksXDCRPlug\n .pipe(shareReplay({refCount: true, bufferSize: 1}));\n\n this.stream.taskCollectInfoPlug = new BehaviorSubject();\n this.stream.taskCollectInfo = this.stream.taskCollectInfoPlug\n .pipe(shareReplay({refCount: true, bufferSize: 1}));\n\n this.stream.tasksWarmingUpPlug = new BehaviorSubject();\n this.stream.tasksWarmingUp = this.stream.tasksWarmingUpPlug\n .pipe(shareReplay({refCount: true, bufferSize: 1}));\n\n this.stream.tasksBucketCompactionPlug = new BehaviorSubject();\n this.stream.tasksCompactionByBucket = this.stream.tasksBucketCompactionPlug\n .pipe(filter(v => v !== undefined),\n map(groupBy(prop('bucket'))),\n shareReplay({refCount: true, bufferSize: 1}));\n\n this.stream.tasksViewCompactionPlug = new BehaviorSubject([]);\n this.stream.tasksCompactionByView = this.stream.tasksViewCompactionPlug\n shareReplay({refCount: true, bufferSize: 1});\n\n this.stream.tasksLoadingSamplesPlug = new BehaviorSubject();\n this.stream.tasksLoadingSamples = this.stream.tasksLoadingSamplesPlug\n .pipe(filter(v => v !== undefined),\n shareReplay({refCount: true, bufferSize: 1}));\n }\n}\n"], "mappings": "yNAmBA,wBAAqB,WACR,cAAc,CAAE,MAAO,CAChC,GAAI,uBAGK,aAAa,CAAE,MAAO,GAEjC,aAAc,CACZ,eAAe,gBAEf,KAAK,OAAS,GACd,KAAK,OAAO,cAAgB,GAAI,iBAChC,KAAK,OAAO,UAAY,KAAK,OAAO,cACjC,KAAK,YAAY,CAAC,SAAU,GAAM,WAAY,KAEjD,KAAK,OAAO,oBAAsB,GAAI,iBACtC,KAAK,OAAO,gBAAkB,KAAK,OAAO,oBACvC,KAAK,YAAY,CAAC,SAAU,GAAM,WAAY,KAEjD,KAAK,OAAO,mBAAqB,GAAI,iBACrC,KAAK,OAAO,eAAiB,KAAK,OAAO,mBACtC,KAAK,YAAY,CAAC,SAAU,GAAM,WAAY,KAEjD,KAAK,OAAO,0BAA4B,GAAI,iBAC5C,KAAK,OAAO,wBAA0B,KAAK,OAAO,0BAC/C,KAAK,OAAO,GAAK,IAAM,QAClB,IAAI,QAAQ,KAAK,YACjB,YAAY,CAAC,SAAU,GAAM,WAAY,KAEjD,KAAK,OAAO,wBAA0B,GAAI,iBAAgB,IAC1D,KAAK,OAAO,sBAAwB,KAAK,OAAO,wBAC5C,YAAY,CAAC,SAAU,GAAM,WAAY,IAE7C,KAAK,OAAO,wBAA0B,GAAI,iBAC1C,KAAK,OAAO,oBAAsB,KAAK,OAAO,wBAC3C,KAAK,OAAO,GAAK,IAAM,QAClB,YAAY,CAAC,SAAU,GAAM,WAAY,OApCrD", "names": [] }