{"version":3,"sources":["jsdelivr-header.js","/npm/gulp-inline-source@4.0.0/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAEA,MAAM,aAAE,cAAiB,QAAQ,iBAC3B,YAAc,QAAQ,gBACtB,KAAO,QAAQ,QACf,QAAU,QAAQ,YAElB,YAAc,qBAEpB,SAAS,iBAAkB,GACvB,OAAO,QAAQ,KAAI,SAAU,EAAM,EAAK,GACpC,IAAI,EAAO,KAEX,GAAI,EAAK,UAAY,EAAK,cAEtB,OADA,KAAK,KAAK,GACH,IAGX,GAAI,EAAK,WAEL,OADA,KAAK,KAAK,QAAS,IAAI,YAAY,YAAa,4BACzC,IAGX,IAAI,EAAc,CACd,SAAU,KAAK,QAAQ,EAAK,MAC5B,SAAU,EAAK,MAGnB,GAAI,EACA,IAAK,IAAI,KAAK,EACV,EAAY,GAAK,EAAQ,GAIjC,aAAa,EAAK,SAAS,WAAY,GAClC,MAAK,IACF,EAAK,SAAW,OAAO,KAAK,GAAQ,IACpC,EAAK,KAAK,GACV,GAAI,IAEP,OAAM,IACH,EAAK,KAAK,QAAS,IAAI,YAAY,YAAa,GAAK,GAEjE,GACJ,CAEA,OAAO,QAAU","file":"/npm/gulp-inline-source@4.0.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/gulp-inline-source@4.0.0/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';\n\nconst { inlineSource } = require('inline-source');\nconst PluginError = require('plugin-error');\nconst path = require('path');\nconst through = require('through2');\n\nconst PLUGIN_NAME = 'gulp-inline-source';\n\nfunction gulpInlineSource (options) {\n    return through.obj(function (file, enc, cb) {\n        var self = this;\n\n        if (file.isNull() || file.isDirectory()) {\n            this.push(file);\n            return cb();\n        }\n\n        if (file.isStream()) {\n            this.emit('error', new PluginError(PLUGIN_NAME, 'Streaming not supported'));\n            return cb();\n        }\n\n        var fileOptions = {\n            rootpath: path.dirname(file.path),\n            htmlpath: file.path\n        };\n\n        if (options) {\n            for (var i in options) {\n                fileOptions[i] = options[i];\n            }\n        }\n\n        inlineSource(file.contents.toString(), fileOptions)\n            .then(html => {\n                file.contents = Buffer.from(html || '');\n                self.push(file);\n                cb();\n            })\n            .catch(err => {\n                self.emit('error', new PluginError(PLUGIN_NAME, err));\n            });\n    });\n}\n\nmodule.exports = gulpInlineSource;\n"]}