{"version":3,"sources":["jsdelivr-header.js","/npm/rxjs-exhaustmap-with-trailing@2.1.1/dist/cjs/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aACA,OAAO,eAAe,QAAS,aAAc,CAAE,OAAO,IACtD,QAAQ,yBAA2B,QAAQ,4BAAyB,EACpE,MAAM,OAAS,QAAQ,QACjB,YAAc,QAAQ,kBAQ5B,SAAS,uBAAuB,GAC5B,OAAQ,IAAW,EAAI,OAAO,QAAO,KACjC,MAAM,EAAU,IAAI,OAAO,QAC3B,OAAO,EAAO,MAAK,EAAI,YAAY,WAAU,IAAM,GAAS,CACxD,SAAS,EACT,UAAU,KACV,EAAI,YAAY,aAAY,CAAC,EAAO,KAAU,EAAI,OAAO,WAAW,EAAQ,EAAO,GAAQ,OAAO,gBAAgB,MAAK,EAAI,YAAY,WAAU,KACjJ,EAAQ,MAAM,OACb,GAEb,CASA,SAAS,yBAAyB,GAC9B,OAAO,wBAAuB,IAAM,GACxC,CAVA,QAAQ,uBAAyB,uBAWjC,QAAQ,yBAA2B","file":"/npm/rxjs-exhaustmap-with-trailing@2.1.1/dist/cjs/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/rxjs-exhaustmap-with-trailing@2.1.1/dist/cjs/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.exhaustMapToWithTrailing = exports.exhaustMapWithTrailing = void 0;\nconst rxjs_1 = require(\"rxjs\");\nconst operators_1 = require(\"rxjs/operators\");\n/**\n * Like exhaustMap, but also includes the trailing value emitted from the source observable while waiting for the preceding inner observable to complete\n *\n * Original code adapted from https://github.com/ReactiveX/rxjs/issues/5004\n * @param {function<T, K>(value: T, ?index: number): ObservableInput<K>} project - A function that, when applied to an item emitted by the\n * source Observable, returns a projected Observable.\n */\nfunction exhaustMapWithTrailing(project) {\n    return (source) => (0, rxjs_1.defer)(() => {\n        const release = new rxjs_1.Subject();\n        return source.pipe((0, operators_1.throttle)(() => release, {\n            leading: true,\n            trailing: true,\n        }), (0, operators_1.exhaustMap)((value, index) => (0, rxjs_1.scheduled)(project(value, index), rxjs_1.asyncScheduler).pipe((0, operators_1.finalize)(() => {\n            release.next();\n        }))));\n    });\n}\nexports.exhaustMapWithTrailing = exhaustMapWithTrailing;\n/**\n * Like exhaustMap, but also includes the trailing value emitted from the source observable while waiting for the preceding inner observable to complete\n *\n * Original code adapted from https://github.com/ReactiveX/rxjs/issues/5004\n * @param {ObservableInput} innerObservable An Observable to replace each value from\n * the source Observable.\n */\nfunction exhaustMapToWithTrailing(innerObservable) {\n    return exhaustMapWithTrailing(() => innerObservable);\n}\nexports.exhaustMapToWithTrailing = exhaustMapToWithTrailing;\n"]}