{"version":3,"file":"share.js","sourceRoot":"","sources":["../../src/operators/share.ts"],"names":[],"mappings":";AACA,0BAA0B,aAAa,CAAC,CAAA;AACxC,yBAAyB,YAAY,CAAC,CAAA;AACtC,wBAAwB,YAAY,CAAC,CAAA;AAIrC;IACE,MAAM,CAAC,IAAI,iBAAO,EAAE,CAAC;AACvB,CAAC;AAED;;;;;;;;;;;GAWG;AACH;IACE,MAAM,CAAC,UAAC,MAAqB,IAAK,OAAA,mBAAQ,EAAE,CAAC,qBAAS,CAAC,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAkB,EAAnE,CAAmE,CAAC;AACxG,CAAC;AAFe,aAAK,QAEpB,CAAA;AAAA,CAAC","sourcesContent":["import { Observable } from '../Observable';\nimport { multicast } from './multicast';\nimport { refCount } from './refCount';\nimport { Subject } from '../Subject';\n\nimport { MonoTypeOperatorFunction } from '../interfaces';\n\nfunction shareSubjectFactory() {\n return new Subject();\n}\n\n/**\n * Returns a new Observable that multicasts (shares) the original Observable. As long as there is at least one\n * Subscriber this Observable will be subscribed and emitting data. When all subscribers have unsubscribed it will\n * unsubscribe from the source Observable. Because the Observable is multicasting it makes the stream `hot`.\n * This is an alias for .multicast(() => new Subject()).refCount().\n *\n * \n *\n * @return {Observable} An Observable that upon connection causes the source Observable to emit items to its Observers.\n * @method share\n * @owner Observable\n */\nexport function share(): MonoTypeOperatorFunction {\n return (source: Observable) => refCount()(multicast(shareSubjectFactory)(source)) as Observable;\n};\n"]}