{"version":3,"sources":["jsdelivr-header.js","/npm/gulp-replace-plus@0.1.1/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,IAAI,QAAU,QAAQ,YAClB,GAAK,QAAQ,iBACb,MAAQ,QAAQ,aAChB,YAAc,MAAM,YAExB,SAAS,SAAS,GACd,OAAW,MAAP,IAEe,iBAAR,IAAoB,EAAI,YAI9B,EAAI,cACA,CAAG,EAAE,eAAe,KAAM,EAAI,YAAY,UAAW,kBAKlE,CAEA,SAAS,QAAQ,GACb,OAAO,MAAM,QAAQ,EACzB,CAEA,SAAS,SAAS,GACd,MAAsB,iBAAR,CAClB,CAEA,SAAS,SAAS,GACd,OAAQ,aAAgB,QAAW,SAAS,EAChD,CAEA,SAAS,YAAY,EAAU,EAAS,GACpC,IAAI,EAAS,EAAW,OAAO,GAAY,EAY3C,OAVA,EAAQ,SAAQ,SAAS,GACjB,EAAK,YAAwB,IAAf,EAAK,QAEf,EADA,EACS,EAAO,QAAQ,EAAK,MAAO,EAAK,OAEhC,EAAO,KAAK,GAAG,EAAK,MAAO,EAAK,QAGrD,IAEO,EAAW,IAAI,OAAO,GAAU,CAC3C,CAEA,SAAS,YAAY,EAAW,GAC5B,OAAO,QAAQ,KAAI,SAAS,EAAM,EAAQ,GACtC,IAAI,EAAU,GAAI,EAAW,EAAK,SAiBlC,OAfI,SAAS,IAAc,SAAS,GAChC,EAAQ,KAAK,CACT,MAAO,IAAI,OAAO,GAClB,MAAO,KAEJ,SAAS,IAAc,QAAQ,MACtC,EAAU,QAAQ,GAAa,EAAY,CAAC,IAG5C,EAAK,WACL,EAAK,SAAW,YAAY,EAAU,GAAS,GACxC,EAAK,aACZ,EAAK,SAAW,YAAY,EAAU,GAAS,IAG5C,EAAS,KAAM,EAC1B,GACJ,CAEA,OAAO,QAAU","file":"/npm/gulp-replace-plus@0.1.1/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/gulp-replace-plus@0.1.1/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","var through = require('through2');\nvar rs = require('replacestream');\nvar gutil = require('gulp-util');\nvar PluginError = gutil.PluginError;\n\nfunction isObject(obj) {\n    if (obj == null) return false;\n\n    if (typeof obj !== \"object\" || obj.nodeType) {\n        return false;\n    }\n\n    if ( obj.constructor &&\n            !({}).hasOwnProperty.call( obj.constructor.prototype, \"isPrototypeOf\" ) ) {\n        return false;\n    }\n\n    return true;\n}\n\nfunction isArray(arr) {\n    return Array.isArray(arr);\n}\n\nfunction isString(str) {\n    return typeof str === \"string\";\n}\n\nfunction checkStr(test) {\n    return (test instanceof RegExp) || isString(test);\n}\n\nfunction replaceCall(contents, replace, isBuffer) {\n    var result = isBuffer ? String(contents) : contents;\n\n    replace.forEach(function(item) {\n        if (item.match && item.value !== undefined) {\n            if (isBuffer) {\n                result = result.replace(item.match, item.value);\n            } else {\n                result = result.pipe(rs(item.match, item.value));\n            }\n        }\n    });\n\n    return isBuffer ? new Buffer(result) : result;\n}\n\nfunction gulpReplace(replaceIn, replaceOf) {\n    return through.obj(function(file, encode, callback) {\n        var replace = [], contents = file.contents;\n\n        if (checkStr(replaceIn) && isString(replaceOf)) {\n            replace.push({\n                match: new RegExp(replaceIn),\n                value: replaceOf\n            });\n        } else if (isObject(replaceIn) || isArray(replaceIn)) {\n            replace = isArray(replaceIn) ? replaceIn : [replaceIn];\n        }\n\n        if (file.isStream()) {\n            file.contents = replaceCall(contents, replace, false);\n        } else if (file.isBuffer()) {\n            file.contents = replaceCall(contents, replace, true);\n        }\n\n        return callback(null, file);\n    });\n};\n\nmodule.exports = gulpReplace;\n"]}