{"version":3,"sources":["jsdelivr-header.js","/npm/pixelit@0.1.4/src/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,MAAM,KAAO,QAAQ,SAEf,UAAE,WAAc,QAAQ,gBACxB,SAAE,UAAa,QAAQ,kBACvB,MAAE,OAAU,QAAQ,cAOpB,QAAU,MAAO,EAAgB,EAAmB,KACtD,MAAM,EAAE,EAAC,EAAE,EAAC,MAAE,GAAU,GAChB,KAAM,EAAU,KAAE,GAAS,EAE7B,QAAgB,SAAS,EAAgB,EAAG,GAC5C,QAAe,MAAM,EAAO,EAAG,EAAG,EAAS,CAAE,KAAM,WAEzD,OAAI,EACO,EAEA,UAAU,EAAY,EACjC,EAGJ,OAAO,QAAU","file":"/npm/pixelit@0.1.4/src/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/pixelit@0.1.4/src/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","const path = require('path');\n\nconst { exportSvg } = require('./export.js');\nconst { sampling } = require('./sampling.js');\nconst { paint } = require('./paint.js');\n\n/**\n * @param sourceFilePath\n * @param targetFileOptions {{ pixel: number, x: number, y: number }}\n * @param outputSettings    {{ path?: string, html?: boolean }}\n */\nconst pixelIt = async (sourceFilePath, targetFileOptions, outputSettings) => {\n    const { x, y, pixel } = targetFileOptions;\n    const { path: outputPath, html } = outputSettings;\n\n    const samples = await sampling(sourceFilePath, x, y);\n    const svgElm = await paint(pixel, x, y, samples, { mode: 'around' });\n\n    if (html) {\n        return svgElm;\n    } else {\n        return exportSvg(outputPath, svgElm);\n    }\n};\n\nmodule.exports = pixelIt;\n"]}