{"version":3,"sources":["jsdelivr-header.js","/npm/@moxy/next-pre-compression@3.0.1/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACJA,aAEA,MAAM,kBAAoB,QAAQ,8BAC5B,KAAO,QAAQ,QACf,OAAS,QAAQ,WAEvB,OAAO,QAAU,CAAC,EAAa,CAAC,KAAM,IAC/B,EACH,OAAA,CAAQ,EAAQ,GAGZ,GAFgB,EAAW,WAAa,EAAQ,SAEnC,CACT,MASM,EAAqB,CACvB,KAAM,gBACN,QAXwB,OAC3B,OAAO,QACP,QAAQ,GAAS,EAAK,cAAgB,EAAK,aAC3C,QAAO,CAAC,EAAY,KACjB,EAAK,WAAW,SAAS,GAAQ,EAAW,KAAK,IAAI,OAAO,MAAM,QAE3D,IACR,IAKC,QAAS,8BAGb,EAAO,QAAQ,KAAK,IAAI,kBAAkB,IACnC,EACH,SAAU,mBACV,UAAW,UAGX,KAAK,gBACL,EAAO,QAAQ,KAAK,IAAI,kBAAkB,IACnC,EACH,SAAU,mBACV,UAAW,mBAGvB,CAEA,MAAkC,mBAAvB,EAAW,QACX,EAAW,QAAQ,EAAQ,GAG/B,CACX","file":"/npm/@moxy/next-pre-compression@3.0.1/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@moxy/next-pre-compression@3.0.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","/* eslint-disable no-useless-escape */\n\n'use strict';\n\nconst CompressionPlugin = require('compression-webpack-plugin');\nconst zlib = require('zlib');\nconst mimeDb = require('mime-db');\n\nmodule.exports = (nextConfig = {}) => ({\n    ...nextConfig,\n    webpack(config, options) {\n        const enabled = nextConfig.compress && !options.isServer;\n\n        if (enabled) {\n            const compressibleRegExps = Object\n            .values(mimeDb)\n            .filter((mime) => mime.compressible && mime.extensions)\n            .reduce((extensions, mime) => {\n                mime.extensions.forEach((ext) => extensions.push(new RegExp(`\\\\.${ext}`)));\n\n                return extensions;\n            }, []);\n\n            const compressionOptions = {\n                test: /^static[\\\\\\/]/,\n                include: compressibleRegExps,\n                exclude: /^static[\\\\\\/]webpack[\\\\\\/]/,\n            };\n\n            config.plugins.push(new CompressionPlugin({\n                ...compressionOptions,\n                filename: '[path].gz[query]',\n                algorithm: 'gzip',\n            }));\n\n            if (zlib.brotliCompress) {\n                config.plugins.push(new CompressionPlugin({\n                    ...compressionOptions,\n                    filename: '[path].br[query]',\n                    algorithm: 'brotliCompress',\n                }));\n            }\n        }\n\n        if (typeof nextConfig.webpack === 'function') {\n            return nextConfig.webpack(config, options);\n        }\n\n        return config;\n    },\n});\n"]}