{"dependencies":[{"name":"../util/lift","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":39,"index":39}}],"key":"4CWnJ0pAAHdfw8fC393IKzeACYc=","exportNames":["*"],"imports":1}},{"name":"./OperatorSubscriber","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":2,"column":0,"index":40},"end":{"line":2,"column":64,"index":104}}],"key":"aA6xM2Hw6XHTylKbb30hQFraJU0=","exportNames":["*"],"imports":1}},{"name":"../observable/innerFrom","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":3,"column":0,"index":105},"end":{"line":3,"column":52,"index":157}}],"key":"FBPrPrjX4XVvDAZ4HcVswhfLakk=","exportNames":["*"],"imports":1}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n exports.throttle = throttle;\n var _utilLift = require(_dependencyMap[0], \"../util/lift\");\n var _OperatorSubscriber = require(_dependencyMap[1], \"./OperatorSubscriber\");\n var _observableInnerFrom = require(_dependencyMap[2], \"../observable/innerFrom\");\n function throttle(durationSelector, config) {\n return (0, _utilLift.operate)(function (source, subscriber) {\n var _a = config !== null && config !== void 0 ? config : {},\n _b = _a.leading,\n leading = _b === void 0 ? true : _b,\n _c = _a.trailing,\n trailing = _c === void 0 ? false : _c;\n var hasValue = false;\n var sendValue = null;\n var throttled = null;\n var isComplete = false;\n var endThrottling = function () {\n throttled === null || throttled === void 0 ? void 0 : throttled.unsubscribe();\n throttled = null;\n if (trailing) {\n send();\n isComplete && subscriber.complete();\n }\n };\n var cleanupThrottling = function () {\n throttled = null;\n isComplete && subscriber.complete();\n };\n var startThrottle = function (value) {\n return throttled = (0, _observableInnerFrom.innerFrom)(durationSelector(value)).subscribe((0, _OperatorSubscriber.createOperatorSubscriber)(subscriber, endThrottling, cleanupThrottling));\n };\n var send = function () {\n if (hasValue) {\n hasValue = false;\n var value = sendValue;\n sendValue = null;\n subscriber.next(value);\n !isComplete && startThrottle(value);\n }\n };\n source.subscribe((0, _OperatorSubscriber.createOperatorSubscriber)(subscriber, function (value) {\n hasValue = true;\n sendValue = value;\n !(throttled && !throttled.closed) && (leading ? send() : startThrottle(value));\n }, function () {\n isComplete = true;\n !(trailing && hasValue && throttled && !throttled.closed) && subscriber.complete();\n }));\n });\n }\n});","lineCount":56,"map":[[7,2,4,0,"exports"],[7,9,4,0],[7,10,4,0,"throttle"],[7,18,4,0],[7,21,4,0,"throttle"],[7,29,4,0],[8,2,1,0],[8,6,1,0,"_utilLift"],[8,15,1,0],[8,18,1,0,"require"],[8,25,1,0],[8,26,1,0,"_dependencyMap"],[8,40,1,0],[9,2,2,0],[9,6,2,0,"_OperatorSubscriber"],[9,25,2,0],[9,28,2,0,"require"],[9,35,2,0],[9,36,2,0,"_dependencyMap"],[9,50,2,0],[10,2,3,0],[10,6,3,0,"_observableInnerFrom"],[10,26,3,0],[10,29,3,0,"require"],[10,36,3,0],[10,37,3,0,"_dependencyMap"],[10,51,3,0],[11,2,4,7],[11,11,4,16,"throttle"],[11,19,4,24,"throttle"],[11,20,4,25,"durationSelector"],[11,36,4,41],[11,38,4,43,"config"],[11,44,4,49],[11,46,4,51],[12,4,5,4],[12,11,5,11],[12,15,5,11,"operate"],[12,24,5,18],[12,25,5,18,"operate"],[12,32,5,18],[12,34,5,19],[12,44,5,29,"source"],[12,50,5,35],[12,52,5,37,"subscriber"],[12,62,5,47],[12,64,5,49],[13,6,6,8],[13,10,6,12,"_a"],[13,12,6,14],[13,15,6,17,"config"],[13,21,6,23],[13,26,6,28],[13,30,6,32],[13,34,6,36,"config"],[13,40,6,42],[13,45,6,47],[13,50,6,52],[13,51,6,53],[13,54,6,56,"config"],[13,60,6,62],[13,63,6,65],[13,64,6,66],[13,65,6,67],[14,8,6,69,"_b"],[14,10,6,71],[14,13,6,74,"_a"],[14,15,6,76],[14,16,6,77,"leading"],[14,23,6,84],[15,8,6,86,"leading"],[15,15,6,93],[15,18,6,96,"_b"],[15,20,6,98],[15,25,6,103],[15,30,6,108],[15,31,6,109],[15,34,6,112],[15,38,6,116],[15,41,6,119,"_b"],[15,43,6,121],[16,8,6,123,"_c"],[16,10,6,125],[16,13,6,128,"_a"],[16,15,6,130],[16,16,6,131,"trailing"],[16,24,6,139],[17,8,6,141,"trailing"],[17,16,6,149],[17,19,6,152,"_c"],[17,21,6,154],[17,26,6,159],[17,31,6,164],[17,32,6,165],[17,35,6,168],[17,40,6,173],[17,43,6,176,"_c"],[17,45,6,178],[18,6,7,8],[18,10,7,12,"hasValue"],[18,18,7,20],[18,21,7,23],[18,26,7,28],[19,6,8,8],[19,10,8,12,"sendValue"],[19,19,8,21],[19,22,8,24],[19,26,8,28],[20,6,9,8],[20,10,9,12,"throttled"],[20,19,9,21],[20,22,9,24],[20,26,9,28],[21,6,10,8],[21,10,10,12,"isComplete"],[21,20,10,22],[21,23,10,25],[21,28,10,30],[22,6,11,8],[22,10,11,12,"endThrottling"],[22,23,11,25],[22,26,11,28],[22,35,11,28,"endThrottling"],[22,36,11,28],[22,38,11,40],[23,8,12,12,"throttled"],[23,17,12,21],[23,22,12,26],[23,26,12,30],[23,30,12,34,"throttled"],[23,39,12,43],[23,44,12,48],[23,49,12,53],[23,50,12,54],[23,53,12,57],[23,58,12,62],[23,59,12,63],[23,62,12,66,"throttled"],[23,71,12,75],[23,72,12,76,"unsubscribe"],[23,83,12,87],[23,84,12,88],[23,85,12,89],[24,8,13,12,"throttled"],[24,17,13,21],[24,20,13,24],[24,24,13,28],[25,8,14,12],[25,12,14,16,"trailing"],[25,20,14,24],[25,22,14,26],[26,10,15,16,"send"],[26,14,15,20],[26,15,15,21],[26,16,15,22],[27,10,16,16,"isComplete"],[27,20,16,26],[27,24,16,30,"subscriber"],[27,34,16,40],[27,35,16,41,"complete"],[27,43,16,49],[27,44,16,50],[27,45,16,51],[28,8,17,12],[29,6,18,8],[29,7,18,9],[30,6,19,8],[30,10,19,12,"cleanupThrottling"],[30,27,19,29],[30,30,19,32],[30,39,19,32,"cleanupThrottling"],[30,40,19,32],[30,42,19,44],[31,8,20,12,"throttled"],[31,17,20,21],[31,20,20,24],[31,24,20,28],[32,8,21,12,"isComplete"],[32,18,21,22],[32,22,21,26,"subscriber"],[32,32,21,36],[32,33,21,37,"complete"],[32,41,21,45],[32,42,21,46],[32,43,21,47],[33,6,22,8],[33,7,22,9],[34,6,23,8],[34,10,23,12,"startThrottle"],[34,23,23,25],[34,26,23,28],[34,35,23,28,"startThrottle"],[34,36,23,38,"value"],[34,41,23,43],[34,43,23,45],[35,8,24,12],[35,15,24,20,"throttled"],[35,24,24,29],[35,27,24,32],[35,31,24,32,"innerFrom"],[35,51,24,41],[35,52,24,41,"innerFrom"],[35,61,24,41],[35,63,24,42,"durationSelector"],[35,79,24,58],[35,80,24,59,"value"],[35,85,24,64],[35,86,24,65],[35,87,24,66],[35,88,24,67,"subscribe"],[35,97,24,76],[35,98,24,77],[35,102,24,77,"createOperatorSubscriber"],[35,121,24,101],[35,122,24,101,"createOperatorSubscriber"],[35,146,24,101],[35,148,24,102,"subscriber"],[35,158,24,112],[35,160,24,114,"endThrottling"],[35,173,24,127],[35,175,24,129,"cleanupThrottling"],[35,192,24,146],[35,193,24,147],[35,194,24,148],[36,6,25,8],[36,7,25,9],[37,6,26,8],[37,10,26,12,"send"],[37,14,26,16],[37,17,26,19],[37,26,26,19,"send"],[37,27,26,19],[37,29,26,31],[38,8,27,12],[38,12,27,16,"hasValue"],[38,20,27,24],[38,22,27,26],[39,10,28,16,"hasValue"],[39,18,28,24],[39,21,28,27],[39,26,28,32],[40,10,29,16],[40,14,29,20,"value"],[40,19,29,25],[40,22,29,28,"sendValue"],[40,31,29,37],[41,10,30,16,"sendValue"],[41,19,30,25],[41,22,30,28],[41,26,30,32],[42,10,31,16,"subscriber"],[42,20,31,26],[42,21,31,27,"next"],[42,25,31,31],[42,26,31,32,"value"],[42,31,31,37],[42,32,31,38],[43,10,32,16],[43,11,32,17,"isComplete"],[43,21,32,27],[43,25,32,31,"startThrottle"],[43,38,32,44],[43,39,32,45,"value"],[43,44,32,50],[43,45,32,51],[44,8,33,12],[45,6,34,8],[45,7,34,9],[46,6,35,8,"source"],[46,12,35,14],[46,13,35,15,"subscribe"],[46,22,35,24],[46,23,35,25],[46,27,35,25,"createOperatorSubscriber"],[46,46,35,49],[46,47,35,49,"createOperatorSubscriber"],[46,71,35,49],[46,73,35,50,"subscriber"],[46,83,35,60],[46,85,35,62],[46,95,35,72,"value"],[46,100,35,77],[46,102,35,79],[47,8,36,12,"hasValue"],[47,16,36,20],[47,19,36,23],[47,23,36,27],[48,8,37,12,"sendValue"],[48,17,37,21],[48,20,37,24,"value"],[48,25,37,29],[49,8,38,12],[49,10,38,14,"throttled"],[49,19,38,23],[49,23,38,27],[49,24,38,28,"throttled"],[49,33,38,37],[49,34,38,38,"closed"],[49,40,38,44],[49,41,38,45],[49,46,38,50,"leading"],[49,53,38,57],[49,56,38,60,"send"],[49,60,38,64],[49,61,38,65],[49,62,38,66],[49,65,38,69,"startThrottle"],[49,78,38,82],[49,79,38,83,"value"],[49,84,38,88],[49,85,38,89],[49,86,38,90],[50,6,39,8],[50,7,39,9],[50,9,39,11],[50,21,39,23],[51,8,40,12,"isComplete"],[51,18,40,22],[51,21,40,25],[51,25,40,29],[52,8,41,12],[52,10,41,14,"trailing"],[52,18,41,22],[52,22,41,26,"hasValue"],[52,30,41,34],[52,34,41,38,"throttled"],[52,43,41,47],[52,47,41,51],[52,48,41,52,"throttled"],[52,57,41,61],[52,58,41,62,"closed"],[52,64,41,68],[52,65,41,69],[52,69,41,73,"subscriber"],[52,79,41,83],[52,80,41,84,"complete"],[52,88,41,92],[52,89,41,93],[52,90,41,94],[53,6,42,8],[53,7,42,9],[53,8,42,10],[53,9,42,11],[54,4,43,4],[54,5,43,5],[54,6,43,6],[55,2,44,0],[56,0,44,1],[56,3]],"functionMap":{"names":["","throttle","operate$argument_0","endThrottling","cleanupThrottling","startThrottle","send","createOperatorSubscriber$argument_1","createOperatorSubscriber$argument_2"],"mappings":"AAA;OCG;mBCC;4BCM;SDO;gCEC;SFG;4BGC;SHE;mBIC;SJQ;8DKC;SLI,EM;SNG;KDC;CDC"},"hasCjsExports":false},"type":"js/module"}]}