{"version":3,"sources":["../node_modules/stream-browserify/index.js"],"names":["module","exports","Stream","EE","require","EventEmitter","call","this","inherits","Readable","Writable","Duplex","Transform","PassThrough","prototype","pipe","dest","options","source","ondata","chunk","writable","write","pause","ondrain","readable","resume","on","_isStdio","end","onend","onclose","didOnEnd","destroy","onerror","er","cleanup","listenerCount","removeListener","emit"],"mappings":"2FAqBAA,EAAOC,QAAUC,EAEjB,IAAIC,EAAKC,EAAQ,KAAUC,aAkB3B,SAASH,IACPC,EAAGG,KAAKC,MAlBKH,EAAQ,EAEvBI,CAASN,EAAQC,GACjBD,EAAOO,SAAWL,EAAQ,KAC1BF,EAAOQ,SAAWN,EAAQ,KAC1BF,EAAOS,OAASP,EAAQ,KACxBF,EAAOU,UAAYR,EAAQ,KAC3BF,EAAOW,YAAcT,EAAQ,KAG7BF,EAAOA,OAASA,EAWhBA,EAAOY,UAAUC,KAAO,SAASC,EAAMC,GACrC,IAAIC,EAASX,KAEb,SAASY,EAAOC,GACVJ,EAAKK,WACH,IAAUL,EAAKM,MAAMF,IAAUF,EAAOK,OACxCL,EAAOK,QAOb,SAASC,IACHN,EAAOO,UAAYP,EAAOQ,QAC5BR,EAAOQ,SAJXR,EAAOS,GAAG,OAAQR,GAQlBH,EAAKW,GAAG,QAASH,GAIZR,EAAKY,UAAcX,IAA2B,IAAhBA,EAAQY,MACzCX,EAAOS,GAAG,MAAOG,GACjBZ,EAAOS,GAAG,QAASI,IAGrB,IAAIC,GAAW,EACf,SAASF,IACHE,IACJA,GAAW,EAEXhB,EAAKa,OAIP,SAASE,IACHC,IACJA,GAAW,EAEiB,oBAAjBhB,EAAKiB,SAAwBjB,EAAKiB,WAI/C,SAASC,EAAQC,GAEf,GADAC,IACwC,IAApCjC,EAAGkC,cAAc9B,KAAM,SACzB,MAAM4B,EAQV,SAASC,IACPlB,EAAOoB,eAAe,OAAQnB,GAC9BH,EAAKsB,eAAe,QAASd,GAE7BN,EAAOoB,eAAe,MAAOR,GAC7BZ,EAAOoB,eAAe,QAASP,GAE/Bb,EAAOoB,eAAe,QAASJ,GAC/BlB,EAAKsB,eAAe,QAASJ,GAE7BhB,EAAOoB,eAAe,MAAOF,GAC7BlB,EAAOoB,eAAe,QAASF,GAE/BpB,EAAKsB,eAAe,QAASF,GAW/B,OA5BAlB,EAAOS,GAAG,QAASO,GACnBlB,EAAKW,GAAG,QAASO,GAmBjBhB,EAAOS,GAAG,MAAOS,GACjBlB,EAAOS,GAAG,QAASS,GAEnBpB,EAAKW,GAAG,QAASS,GAEjBpB,EAAKuB,KAAK,OAAQrB,GAGXF","file":"static/js/stream-browserify.80cd9b22.chunk.js","sourcesContent":["// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nmodule.exports = Stream;\n\nvar EE = require('events').EventEmitter;\nvar inherits = require('inherits');\n\ninherits(Stream, EE);\nStream.Readable = require('readable-stream/readable.js');\nStream.Writable = require('readable-stream/writable.js');\nStream.Duplex = require('readable-stream/duplex.js');\nStream.Transform = require('readable-stream/transform.js');\nStream.PassThrough = require('readable-stream/passthrough.js');\n\n// Backwards-compat with node 0.4.x\nStream.Stream = Stream;\n\n\n\n// old-style streams. Note that the pipe method (the only relevant\n// part of this class) is overridden in the Readable class.\n\nfunction Stream() {\n EE.call(this);\n}\n\nStream.prototype.pipe = function(dest, options) {\n var source = this;\n\n function ondata(chunk) {\n if (dest.writable) {\n if (false === dest.write(chunk) && source.pause) {\n source.pause();\n }\n }\n }\n\n source.on('data', ondata);\n\n function ondrain() {\n if (source.readable && source.resume) {\n source.resume();\n }\n }\n\n dest.on('drain', ondrain);\n\n // If the 'end' option is not supplied, dest.end() will be called when\n // source gets the 'end' or 'close' events. Only dest.end() once.\n if (!dest._isStdio && (!options || options.end !== false)) {\n source.on('end', onend);\n source.on('close', onclose);\n }\n\n var didOnEnd = false;\n function onend() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n dest.end();\n }\n\n\n function onclose() {\n if (didOnEnd) return;\n didOnEnd = true;\n\n if (typeof dest.destroy === 'function') dest.destroy();\n }\n\n // don't leave dangling pipes when there are errors.\n function onerror(er) {\n cleanup();\n if (EE.listenerCount(this, 'error') === 0) {\n throw er; // Unhandled stream error in pipe.\n }\n }\n\n source.on('error', onerror);\n dest.on('error', onerror);\n\n // remove all the event listeners that were added.\n function cleanup() {\n source.removeListener('data', ondata);\n dest.removeListener('drain', ondrain);\n\n source.removeListener('end', onend);\n source.removeListener('close', onclose);\n\n source.removeListener('error', onerror);\n dest.removeListener('error', onerror);\n\n source.removeListener('end', cleanup);\n source.removeListener('close', cleanup);\n\n dest.removeListener('close', cleanup);\n }\n\n source.on('end', cleanup);\n source.on('close', cleanup);\n\n dest.on('close', cleanup);\n\n dest.emit('pipe', source);\n\n // Allow for unix-like usage: A.pipe(B).pipe(C)\n return dest;\n};\n"],"sourceRoot":""}