/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/gulp-uglify-es@3.0.0/lib/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";var __awaiter=this&&this.__awaiter||function(e,r,t,o){return new(t||(t=Promise))((function(n,u){function i(e){try{s(o.next(e))}catch(e){u(e)}}function a(e){try{s(o.throw(e))}catch(e){u(e)}}function s(e){var r;e.done?n(e.value):(r=e.value,r instanceof t?r:new t((function(e){e(r)}))).then(i,a)}s((o=o.apply(e,r||[])).next())}))};Object.defineProperty(exports,"__esModule",{value:!0});const o_stream_1=require("o-stream"),PluginError=require("plugin-error"),terser=require("terser"),applySourceMap=require("vinyl-sourcemaps-apply"),PLUGIN_NAME="gulp-uglify-es";function plugin(e){return o_stream_1.default.transform({onEntered:r=>__awaiter(this,void 0,void 0,(function*(){let t=r.object;if(throwIfStream(t),t.isNull()||!t.contents)return void r.output.push(t);t.sourceMap&&(e=setUglifySourceMapOptions(e,t));let o={};o[t.relative]=t.contents.toString();try{let n=yield terser.minify(o,e);t.contents=Buffer.from(n.code),n.map&&applySourceMap(t,n.map),r.output.push(t)}catch(e){throw new PluginError(PLUGIN_NAME,e)}}))})}function setUglifySourceMapOptions(e,r){(e=e||{}).sourceMap=e.sourceMap||{};let t=e.sourceMap;return t.filename=r.sourceMap.file,t.includeSources=!0,void 0!==t.url&&null!==t.url&&(t.url=void 0,console.warn("Uglify options.sourceMap.url should not be set. Deleting it.")),r.sourceMap.mappings&&(t.content=r.sourceMap),e}function throwIfStream(e){if(e.isStream())throw new PluginError(PLUGIN_NAME,"Streams are not supported.")}exports.default=plugin;
//# sourceMappingURL=/sm/552609ff46ca70a934f5e01dfb246aa0fe3af3346268b3073758d32204891712.map