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AgB,QAAQ,cAAgB,SAAuB,EAAQ,GAC1E,IAAI,EAAS,CAAC,EAKd,OAJA,OAAO,KAAK,GAAQ,SAAQ,SAAS,GACpC,EAAO,GAAO,EAAS,EAAO,IAC9B,eAAe,EAAO,GAAM,EAAO,GACpC,IACO,CACR,EAEA,SAAS,eAAe,EAAS,GAKhC,SAAS,EAAI,QACiB,IAAzB,EAAS,KAA2B,EAAS,GAAc,EAAQ,GACxE,CALA,EAAI,SACJ,EAAI,cAKL","file":"/npm/simplebuild@0.5.3/lib/simplebuild.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/simplebuild@0.5.3/lib/simplebuild.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","// Copyright (c) 2013 Titanium I.T. LLC. All rights reserved. See LICENSE.TXT for details.\n\"use strict\";\n\nvar glob = require(\"glob\");\nvar type = require(\"./type.js\");\nvar objectAssign = require(\"object-assign\");   // Object.assign ponyfill. Check if Node supports it yet.\n\nexports.normalizeOptions = function(userOptions, defaults, types) {\n\tcheck(userOptions, Object);\n\tvar normalizedOptions = objectAssign({}, defaults, userOptions);\n\tcheck(normalizedOptions, types);\n\treturn normalizedOptions;\n\n\tfunction check(options, types) {\n\t\tvar err = type.check(options, types, { name: \"options\" });\n\t\tif (err !== null) throw new Error(err);\n\t}\n};\n\nexports.deglobSync = function(globs) {\n\tif (typeof globs === \"string\") globs = [ globs ];\n\n\tvar result = [];\n\tglobs.forEach(expandGlob);\n\treturn result;\n\n\tfunction expandGlob(aGlob) {\n\t\tvar include = true;\n\t\tif (aGlob[0] === \"!\") {\n\t\t\taGlob = aGlob.substring(1);\n\t\t\tinclude = false;\n\t\t}\n\n\t\tvar expandedGlob = glob.sync(aGlob);\n\n\t\texpandedGlob.forEach(function(aFile) {\n\t\t\tvar index = result.indexOf(aFile);\n\t\t\tif (include && index === -1) result.push(aFile);\n\t\t\telse if (!include && index !== -1) result.splice(index, 1);\n\t\t});\n\t}\n};\n\nexports.createMapFunction = function(mapperFn) {\n\treturn function(module) {\n\t\treturn mapModule(module, mapperFn);\n\t};\n};\n\nfunction mapModule(module, mapperFn) {\n\tif (typeof module === \"string\") module = require(module);\n\n\tif (Object.keys(module).length === 1 && module.map) return mapMapperModule(module, mapperFn);\n\telse return mapTaskModule(module, mapperFn);\n}\n\nfunction startsWith(string, substring) {\n\treturn string.indexOf(substring) === 0;\n}\n\nfunction mapMapperModule(mapperModule, mapperFn) {\n\treturn {\n\t\tmap: function(module) {\n\t\t\treturn mapModule(mapperModule.map(module), mapperFn);\n\t\t}\n\t};\n}\n\nvar mapTaskModule = exports.mapTaskModule = function mapTaskModule(module, mapperFn) {\n\tvar result = {};\n\tObject.keys(module).forEach(function(key) {\n\t\tresult[key] = mapperFn(module[key]);\n\t\tmapDescriptors(module[key], result[key]);\n\t});\n\treturn result;\n};\n\nfunction mapDescriptors(srcTask, destTask) {\n\t// only map descriptors that are defined in the spec; ignore everything else\n\tmap(\"title\");\n\tmap(\"description\");\n\n\tfunction map(descriptor) {\n\t\tif (destTask[descriptor] === undefined) destTask[descriptor] = srcTask[descriptor];\n\t}\n}"]}