diff --git a/packages/next/build/webpack/config/blocks/css/index.ts b/packages/next/build/webpack/config/blocks/css/index.ts index 0edf224e45de3..73d2513ba851e 100644 --- a/packages/next/build/webpack/config/blocks/css/index.ts +++ b/packages/next/build/webpack/config/blocks/css/index.ts @@ -53,7 +53,7 @@ export const css = curry(async function css( // To fix this, we use `resolve-url-loader` to rewrite the CSS // imports to real file paths. { - loader: require.resolve('resolve-url-loader'), + loader: require.resolve('next/dist/compiled/resolve-url-loader'), options: { // Source maps are not required here, but we may as well emit // them. diff --git a/packages/next/compiled/resolve-url-loader/engine/fail.js b/packages/next/compiled/resolve-url-loader/engine/fail.js new file mode 100644 index 0000000000000..588da7076142f --- /dev/null +++ b/packages/next/compiled/resolve-url-loader/engine/fail.js @@ -0,0 +1 @@ +module.exports=(()=>{"use strict";var e={793:e=>{function process(){return new Promise(function(e,r){setTimeout(function(){r(new Error('This "engine" is designed to fail, for testing purposes only'))},100)})}e.exports=process}};var r={};function __nccwpck_require__(t){if(r[t]){return r[t].exports}var _=r[t]={exports:{}};var i=true;try{e[t](_,_.exports,__nccwpck_require__);i=false}finally{if(i)delete r[t]}return _.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(793)})(); \ No newline at end of file diff --git a/packages/next/compiled/resolve-url-loader/engine/postcss.js b/packages/next/compiled/resolve-url-loader/engine/postcss.js new file mode 100644 index 0000000000000..d9ea25c9a3e12 --- /dev/null +++ b/packages/next/compiled/resolve-url-loader/engine/postcss.js @@ -0,0 +1 @@ +module.exports=(()=>{"use strict";var e={379:e=>{e.exports=((e,t)=>{t=t||process.argv;const r=e.startsWith("-")?"":e.length===1?"-":"--";const n=t.indexOf(r+e);const i=t.indexOf("--");return n!==-1&&(i===-1?true:n{var n=r(87),i=r(622),s=r(707);var o=r(95);var u=/\r(?!\n)(.|\n)?/g;function process(e,t,r){var a=r.removeCR&&n.EOL!=="\r"?t.replace(u," $1"):t;return s([s.plugin("postcss-resolve-url",postcssPlugin)]).process(a,{from:o.prepend(e),map:r.outputSourceMap&&{prev:!!r.absSourceMap&&o.prepend(r.absSourceMap),inline:false,annotation:false,sourcesContent:true}}).then(e=>({content:e.css,map:r.outputSourceMap?o.remove(e.map.toJSON()):null}));function postcssPlugin(){return function(e){e.walkDecls(eachDeclaration)};function eachDeclaration(e){var n=e.value&&e.value.indexOf("url")>=0;if(n){var s=e.source.start,a=r.sourceMapConsumer&&r.sourceMapConsumer.originalPositionFor(s);var f=a&&a.source&&o.remove(i.dirname(a.source));if(f){e.value=r.transformDeclaration(e.value,f)}else if(r.sourceMapConsumer){throw new Error("source-map information is not available at url() declaration "+(u.test(t)?"(found orphan CR, try removeCR option)":"(no orphan CR found)"))}}}}}e.exports=process},95:(e,t)=>{function prepend(e){if(typeof e==="string"){return"file://"+e}else if(e&&typeof e==="object"&&Array.isArray(e.sources)){return Object.assign({},e,{sources:e.sources.map(prepend)})}else{throw new Error("expected string|object")}}t.prepend=prepend;function remove(e){if(typeof e==="string"){return e.replace(/^file:\/{2}/,"")}else if(e&&typeof e==="object"&&Array.isArray(e.sources)){return Object.assign({},e,{sources:e.sources.map(remove)})}else{throw new Error("expected string|object")}}t.remove=remove},226:(e,t,r)=>{t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(820));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}var i=function(e){_inheritsLoose(AtRule,e);function AtRule(t){var r;r=e.call(this,t)||this;r.type="atrule";return r}var t=AtRule.prototype;t.append=function append(){var t;if(!this.nodes)this.nodes=[];for(var r=arguments.length,n=new Array(r),i=0;i{t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(3));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}var i=function(e){_inheritsLoose(Comment,e);function Comment(t){var r;r=e.call(this,t)||this;r.type="comment";return r}return Comment}(n.default);var s=i;t.default=s;e.exports=t.default},820:(e,t,r)=>{t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(142));var i=_interopRequireDefault(r(676));var s=_interopRequireDefault(r(3));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,t){for(var r=0;r=u.length)break;l=u[f++]}else{f=u.next();if(f.done)break;l=f.value}var c=l;this.nodes.push(c)}}return this};t.prepend=function prepend(){for(var e=arguments.length,t=new Array(e),r=0;r=n.length)break;o=n[s++]}else{s=n.next();if(s.done)break;o=s.value}var u=o;var a=this.normalize(u,this.first,"prepend").reverse();for(var f=a,l=Array.isArray(f),c=0,f=l?f:f[Symbol.iterator]();;){var h;if(l){if(c>=f.length)break;h=f[c++]}else{c=f.next();if(c.done)break;h=c.value}var p=h;this.nodes.unshift(p)}for(var d in this.indexes){this.indexes[d]=this.indexes[d]+a.length}}return this};t.cleanRaws=function cleanRaws(t){e.prototype.cleanRaws.call(this,t);if(this.nodes){for(var r=this.nodes,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{i=r.next();if(i.done)break;s=i.value}var o=s;o.cleanRaws(t)}}};t.insertBefore=function insertBefore(e,t){e=this.index(e);var r=e===0?"prepend":false;var n=this.normalize(t,this.nodes[e],r).reverse();for(var i=n,s=Array.isArray(i),o=0,i=s?i:i[Symbol.iterator]();;){var u;if(s){if(o>=i.length)break;u=i[o++]}else{o=i.next();if(o.done)break;u=o.value}var a=u;this.nodes.splice(e,0,a)}var f;for(var l in this.indexes){f=this.indexes[l];if(e<=f){this.indexes[l]=f+n.length}}return this};t.insertAfter=function insertAfter(e,t){e=this.index(e);var r=this.normalize(t,this.nodes[e]).reverse();for(var n=r,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var o;if(i){if(s>=n.length)break;o=n[s++]}else{s=n.next();if(s.done)break;o=s.value}var u=o;this.nodes.splice(e+1,0,u)}var a;for(var f in this.indexes){a=this.indexes[f];if(e=e){this.indexes[r]=t-1}}return this};t.removeAll=function removeAll(){for(var e=this.nodes,t=Array.isArray(e),r=0,e=t?e:e[Symbol.iterator]();;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{r=e.next();if(r.done)break;n=r.value}var i=n;i.parent=undefined}this.nodes=[];return this};t.replaceValues=function replaceValues(e,t,r){if(!r){r=t;t={}}this.walkDecls(function(n){if(t.props&&t.props.indexOf(n.prop)===-1)return;if(t.fast&&n.value.indexOf(t.fast)===-1)return;n.value=n.value.replace(e,r)});return this};t.every=function every(e){return this.nodes.every(e)};t.some=function some(e){return this.nodes.some(e)};t.index=function index(e){if(typeof e==="number"){return e}return this.nodes.indexOf(e)};t.normalize=function normalize(e,t){var s=this;if(typeof e==="string"){var o=r(972);e=cleanSource(o(e).nodes)}else if(Array.isArray(e)){e=e.slice(0);for(var u=e,a=Array.isArray(u),f=0,u=a?u:u[Symbol.iterator]();;){var l;if(a){if(f>=u.length)break;l=u[f++]}else{f=u.next();if(f.done)break;l=f.value}var c=l;if(c.parent)c.parent.removeChild(c,"ignore")}}else if(e.type==="root"){e=e.nodes.slice(0);for(var h=e,p=Array.isArray(h),d=0,h=p?h:h[Symbol.iterator]();;){var v;if(p){if(d>=h.length)break;v=h[d++]}else{d=h.next();if(d.done)break;v=d.value}var w=v;if(w.parent)w.parent.removeChild(w,"ignore")}}else if(e.type){e=[e]}else if(e.prop){if(typeof e.value==="undefined"){throw new Error("Value field is missed in node creation")}else if(typeof e.value!=="string"){e.value=String(e.value)}e=[new n.default(e)]}else if(e.selector){var m=r(714);e=[new m(e)]}else if(e.name){var g=r(226);e=[new g(e)]}else if(e.text){e=[new i.default(e)]}else{throw new Error("Unknown node type in node creation")}var y=e.map(function(e){if(e.parent)e.parent.removeChild(e);if(typeof e.raws.before==="undefined"){if(t&&typeof t.raws.before!=="undefined"){e.raws.before=t.raws.before.replace(/[^\s]/g,"")}}e.parent=s;return e});return y};_createClass(Container,[{key:"first",get:function get(){if(!this.nodes)return undefined;return this.nodes[0]}},{key:"last",get:function get(){if(!this.nodes)return undefined;return this.nodes[this.nodes.length-1]}}]);return Container}(s.default);var u=o;t.default=u;e.exports=t.default},698:(e,t,r)=>{t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(127));var i=_interopRequireDefault(r(242));var s=_interopRequireDefault(r(706));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _assertThisInitialized(e){if(e===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}function _wrapNativeSuper(e){var t=typeof Map==="function"?new Map:undefined;_wrapNativeSuper=function _wrapNativeSuper(e){if(e===null||!_isNativeFunction(e))return e;if(typeof e!=="function"){throw new TypeError("Super expression must either be null or a function")}if(typeof t!=="undefined"){if(t.has(e))return t.get(e);t.set(e,Wrapper)}function Wrapper(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}Wrapper.prototype=Object.create(e.prototype,{constructor:{value:Wrapper,enumerable:false,writable:true,configurable:true}});return _setPrototypeOf(Wrapper,e)};return _wrapNativeSuper(e)}function isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}function _construct(e,t,r){if(isNativeReflectConstruct()){_construct=Reflect.construct}else{_construct=function _construct(e,t,r){var n=[null];n.push.apply(n,t);var i=Function.bind.apply(e,n);var s=new i;if(r)_setPrototypeOf(s,r.prototype);return s}}return _construct.apply(null,arguments)}function _isNativeFunction(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function _setPrototypeOf(e,t){_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){e.__proto__=t;return e};return _setPrototypeOf(e,t)}function _getPrototypeOf(e){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)};return _getPrototypeOf(e)}var o=function(e){_inheritsLoose(CssSyntaxError,e);function CssSyntaxError(t,r,n,i,s,o){var u;u=e.call(this,t)||this;u.name="CssSyntaxError";u.reason=t;if(s){u.file=s}if(i){u.source=i}if(o){u.plugin=o}if(typeof r!=="undefined"&&typeof n!=="undefined"){u.line=r;u.column=n}u.setMessage();if(Error.captureStackTrace){Error.captureStackTrace(_assertThisInitialized(u),CssSyntaxError)}return u}var t=CssSyntaxError.prototype;t.setMessage=function setMessage(){this.message=this.plugin?this.plugin+": ":"";this.message+=this.file?this.file:"";if(typeof this.line!=="undefined"){this.message+=":"+this.line+":"+this.column}this.message+=": "+this.reason};t.showSourceCode=function showSourceCode(e){var t=this;if(!this.source)return"";var r=this.source;if(s.default){if(typeof e==="undefined")e=n.default.stdout;if(e)r=(0,s.default)(r)}var o=r.split(/\r?\n/);var u=Math.max(this.line-3,0);var a=Math.min(this.line+2,o.length);var f=String(a).length;function mark(t){if(e&&i.default.red){return i.default.red.bold(t)}return t}function aside(t){if(e&&i.default.gray){return i.default.gray(t)}return t}return o.slice(u,a).map(function(e,r){var n=u+1+r;var i=" "+(" "+n).slice(-f)+" | ";if(n===t.line){var s=aside(i.replace(/\d/g," "))+e.slice(0,t.column-1).replace(/[^\t]/g," ");return mark(">")+aside(i)+e+"\n "+s+mark("^")}return" "+aside(i)+e}).join("\n")};t.toString=function toString(){var e=this.showSourceCode();if(e){e="\n\n"+e+"\n"}return this.name+": "+this.message+e};return CssSyntaxError}(_wrapNativeSuper(Error));var u=o;t.default=u;e.exports=t.default},142:(e,t,r)=>{t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(3));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}var i=function(e){_inheritsLoose(Declaration,e);function Declaration(t){var r;r=e.call(this,t)||this;r.type="decl";return r}return Declaration}(n.default);var s=i;t.default=s;e.exports=t.default},702:(e,t,r)=>{t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(622));var i=_interopRequireDefault(r(698));var s=_interopRequireDefault(r(990));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,t){for(var r=0;r"}if(this.map)this.map.file=this.from}var e=Input.prototype;e.error=function error(e,t,r,n){if(n===void 0){n={}}var s;var o=this.origin(t,r);if(o){s=new i.default(e,o.line,o.column,o.source,o.file,n.plugin)}else{s=new i.default(e,t,r,this.css,this.file,n.plugin)}s.input={line:t,column:r,source:this.css};if(this.file)s.input.file=this.file;return s};e.origin=function origin(e,t){if(!this.map)return false;var r=this.map.consumer();var n=r.originalPositionFor({line:e,column:t});if(!n.source)return false;var i={file:this.mapResolve(n.source),line:n.line,column:n.column};var s=r.sourceContentFor(n.source);if(s)i.source=s;return i};e.mapResolve=function mapResolve(e){if(/^\w+:\/\//.test(e)){return e}return n.default.resolve(this.map.consumer().sourceRoot||".",e)};_createClass(Input,[{key:"from",get:function get(){return this.file||this.id}}]);return Input}();var a=u;t.default=a;e.exports=t.default},805:(e,t,r)=>{t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(129));var i=_interopRequireDefault(r(885));var s=_interopRequireDefault(r(294));var o=_interopRequireDefault(r(292));var u=_interopRequireDefault(r(972));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,t){for(var r=0;rparseInt(o[1])){console.error("Unknown error from PostCSS plugin. Your current PostCSS "+"version is "+i+", but "+r+" uses "+n+". Perhaps this is the source of the error below.")}}}}catch(e){if(console&&console.error)console.error(e)}};e.asyncTick=function asyncTick(e,t){var r=this;if(this.plugin>=this.processor.plugins.length){this.processed=true;return e()}try{var n=this.processor.plugins[this.plugin];var i=this.run(n);this.plugin+=1;if(isPromise(i)){i.then(function(){r.asyncTick(e,t)}).catch(function(e){r.handleError(e,n);r.processed=true;t(e)})}else{this.asyncTick(e,t)}}catch(e){this.processed=true;t(e)}};e.async=function async(){var e=this;if(this.processed){return new Promise(function(t,r){if(e.error){r(e.error)}else{t(e.stringify())}})}if(this.processing){return this.processing}this.processing=new Promise(function(t,r){if(e.error)return r(e.error);e.plugin=0;e.asyncTick(t,r)}).then(function(){e.processed=true;return e.stringify()});return this.processing};e.sync=function sync(){if(this.processed)return this.result;this.processed=true;if(this.processing){throw new Error("Use process(css).then(cb) to work with async plugins")}if(this.error)throw this.error;for(var e=this.result.processor.plugins,t=Array.isArray(e),r=0,e=t?e:e[Symbol.iterator]();;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{r=e.next();if(r.done)break;n=r.value}var i=n;var s=this.run(i);if(isPromise(s)){throw new Error("Use process(css).then(cb) to work with async plugins")}}return this.result};e.run=function run(e){this.result.lastPlugin=e;try{return e(this.result.root,this.result)}catch(t){this.handleError(t,e);throw t}};e.stringify=function stringify(){if(this.stringified)return this.result;this.stringified=true;this.sync();var e=this.result.opts;var t=i.default;if(e.syntax)t=e.syntax.stringify;if(e.stringifier)t=e.stringifier;if(t.stringify)t=t.stringify;var r=new n.default(t,this.result.root,this.result.opts);var s=r.generate();this.result.css=s[0];this.result.map=s[1];return this.result};_createClass(LazyResult,[{key:"processor",get:function get(){return this.result.processor}},{key:"opts",get:function get(){return this.result.opts}},{key:"css",get:function get(){return this.stringify().css}},{key:"content",get:function get(){return this.stringify().content}},{key:"map",get:function get(){return this.stringify().map}},{key:"root",get:function get(){return this.sync().root}},{key:"messages",get:function get(){return this.sync().messages}}]);return LazyResult}();var f=a;t.default=f;e.exports=t.default},534:(e,t)=>{t.__esModule=true;t.default=void 0;var r={split:function split(e,t,r){var n=[];var i="";var split=false;var s=0;var o=false;var u=false;for(var a=0;a0)s-=1}else if(s===0){if(t.indexOf(f)!==-1)split=true}if(split){if(i!=="")n.push(i.trim());i="";split=false}else{i+=f}}if(r||i!=="")n.push(i.trim());return n},space:function space(e){var t=[" ","\n","\t"];return r.split(e,t)},comma:function comma(e){return r.split(e,[","],true)}};var n=r;t.default=n;e.exports=t.default},129:(e,t,r)=>{t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(241));var i=_interopRequireDefault(r(622));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var s=function(){function MapGenerator(e,t,r){this.stringify=e;this.mapOpts=r.map||{};this.root=t;this.opts=r}var e=MapGenerator.prototype;e.isMap=function isMap(){if(typeof this.opts.map!=="undefined"){return!!this.opts.map}return this.previous().length>0};e.previous=function previous(){var e=this;if(!this.previousMaps){this.previousMaps=[];this.root.walk(function(t){if(t.source&&t.source.input.map){var r=t.source.input.map;if(e.previousMaps.indexOf(r)===-1){e.previousMaps.push(r)}}})}return this.previousMaps};e.isInline=function isInline(){if(typeof this.mapOpts.inline!=="undefined"){return this.mapOpts.inline}var e=this.mapOpts.annotation;if(typeof e!=="undefined"&&e!==true){return false}if(this.previous().length){return this.previous().some(function(e){return e.inline})}return true};e.isSourcesContent=function isSourcesContent(){if(typeof this.mapOpts.sourcesContent!=="undefined"){return this.mapOpts.sourcesContent}if(this.previous().length){return this.previous().some(function(e){return e.withContent()})}return true};e.clearAnnotation=function clearAnnotation(){if(this.mapOpts.annotation===false)return;var e;for(var t=this.root.nodes.length-1;t>=0;t--){e=this.root.nodes[t];if(e.type!=="comment")continue;if(e.text.indexOf("# sourceMappingURL=")===0){this.root.removeChild(t)}}};e.setSourcesContent=function setSourcesContent(){var e=this;var t={};this.root.walk(function(r){if(r.source){var n=r.source.input.from;if(n&&!t[n]){t[n]=true;var i=e.relative(n);e.map.setSourceContent(i,r.source.input.css)}}})};e.applyPrevMaps=function applyPrevMaps(){for(var e=this.previous(),t=Array.isArray(e),r=0,e=t?e:e[Symbol.iterator]();;){var s;if(t){if(r>=e.length)break;s=e[r++]}else{r=e.next();if(r.done)break;s=r.value}var o=s;var u=this.relative(o.file);var a=o.root||i.default.dirname(o.file);var f=void 0;if(this.mapOpts.sourcesContent===false){f=new n.default.SourceMapConsumer(o.text);if(f.sourcesContent){f.sourcesContent=f.sourcesContent.map(function(){return null})}}else{f=o.consumer()}this.map.applySourceMap(f,u,this.relative(a))}};e.isAnnotation=function isAnnotation(){if(this.isInline()){return true}if(typeof this.mapOpts.annotation!=="undefined"){return this.mapOpts.annotation}if(this.previous().length){return this.previous().some(function(e){return e.annotation})}return true};e.toBase64=function toBase64(e){if(Buffer){return Buffer.from(e).toString("base64")}return window.btoa(unescape(encodeURIComponent(e)))};e.addAnnotation=function addAnnotation(){var e;if(this.isInline()){e="data:application/json;base64,"+this.toBase64(this.map.toString())}else if(typeof this.mapOpts.annotation==="string"){e=this.mapOpts.annotation}else{e=this.outputFile()+".map"}var t="\n";if(this.css.indexOf("\r\n")!==-1)t="\r\n";this.css+=t+"/*# sourceMappingURL="+e+" */"};e.outputFile=function outputFile(){if(this.opts.to){return this.relative(this.opts.to)}if(this.opts.from){return this.relative(this.opts.from)}return"to.css"};e.generateMap=function generateMap(){this.generateString();if(this.isSourcesContent())this.setSourcesContent();if(this.previous().length>0)this.applyPrevMaps();if(this.isAnnotation())this.addAnnotation();if(this.isInline()){return[this.css]}return[this.css,this.map]};e.relative=function relative(e){if(e.indexOf("<")===0)return e;if(/^\w+:\/\//.test(e))return e;var t=this.opts.to?i.default.dirname(this.opts.to):".";if(typeof this.mapOpts.annotation==="string"){t=i.default.dirname(i.default.resolve(t,this.mapOpts.annotation))}e=i.default.relative(t,e);if(i.default.sep==="\\"){return e.replace(/\\/g,"/")}return e};e.sourcePath=function sourcePath(e){if(this.mapOpts.from){return this.mapOpts.from}return this.relative(e.source.input.from)};e.generateString=function generateString(){var e=this;this.css="";this.map=new n.default.SourceMapGenerator({file:this.outputFile()});var t=1;var r=1;var i,s;this.stringify(this.root,function(n,o,u){e.css+=n;if(o&&u!=="end"){if(o.source&&o.source.start){e.map.addMapping({source:e.sourcePath(o),generated:{line:t,column:r-1},original:{line:o.source.start.line,column:o.source.start.column-1}})}else{e.map.addMapping({source:"",original:{line:1,column:0},generated:{line:t,column:r-1}})}}i=n.match(/\n/g);if(i){t+=i.length;s=n.lastIndexOf("\n");r=n.length-s}else{r+=n.length}if(o&&u!=="start"){var a=o.parent||{raws:{}};if(o.type!=="decl"||o!==a.last||a.raws.semicolon){if(o.source&&o.source.end){e.map.addMapping({source:e.sourcePath(o),generated:{line:t,column:r-2},original:{line:o.source.end.line,column:o.source.end.column-1}})}else{e.map.addMapping({source:"",original:{line:1,column:0},generated:{line:t,column:r-1}})}}}})};e.generate=function generate(){this.clearAnnotation();if(this.isMap()){return this.generateMap()}var e="";this.stringify(this.root,function(t){e+=t});return[e]};return MapGenerator}();var o=s;t.default=o;e.exports=t.default},3:(e,t,r)=>{t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(698));var i=_interopRequireDefault(r(218));var s=_interopRequireDefault(r(885));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function cloneNode(e,t){var r=new e.constructor;for(var n in e){if(!e.hasOwnProperty(n))continue;var i=e[n];var s=typeof i;if(n==="parent"&&s==="object"){if(t)r[n]=t}else if(n==="source"){r[n]=i}else if(i instanceof Array){r[n]=i.map(function(e){return cloneNode(e,r)})}else{if(s==="object"&&i!==null)i=cloneNode(i);r[n]=i}}return r}var o=function(){function Node(e){if(e===void 0){e={}}this.raws={};if(process.env.NODE_ENV!=="production"){if(typeof e!=="object"&&typeof e!=="undefined"){throw new Error("PostCSS nodes constructor accepts object, not "+JSON.stringify(e))}}for(var t in e){this[t]=e[t]}}var e=Node.prototype;e.error=function error(e,t){if(t===void 0){t={}}if(this.source){var r=this.positionBy(t);return this.source.input.error(e,r.line,r.column,t)}return new n.default(e)};e.warn=function warn(e,t,r){var n={node:this};for(var i in r){n[i]=r[i]}return e.warn(t,n)};e.remove=function remove(){if(this.parent){this.parent.removeChild(this)}this.parent=undefined;return this};e.toString=function toString(e){if(e===void 0){e=s.default}if(e.stringify)e=e.stringify;var t="";e(this,function(e){t+=e});return t};e.clone=function clone(e){if(e===void 0){e={}}var t=cloneNode(this);for(var r in e){t[r]=e[r]}return t};e.cloneBefore=function cloneBefore(e){if(e===void 0){e={}}var t=this.clone(e);this.parent.insertBefore(this,t);return t};e.cloneAfter=function cloneAfter(e){if(e===void 0){e={}}var t=this.clone(e);this.parent.insertAfter(this,t);return t};e.replaceWith=function replaceWith(){if(this.parent){for(var e=arguments.length,t=new Array(e),r=0;r{t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(172));var i=_interopRequireDefault(r(702));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function parse(e,t){var r=new i.default(e,t);var s=new n.default(r);try{s.parse()}catch(e){if(process.env.NODE_ENV!=="production"){if(e.name==="CssSyntaxError"&&t&&t.from){if(/\.scss$/i.test(t.from)){e.message+="\nYou tried to parse SCSS with "+"the standard CSS parser; "+"try again with the postcss-scss parser"}else if(/\.sass/i.test(t.from)){e.message+="\nYou tried to parse Sass with "+"the standard CSS parser; "+"try again with the postcss-sass parser"}else if(/\.less$/i.test(t.from)){e.message+="\nYou tried to parse Less with "+"the standard CSS parser; "+"try again with the postcss-less parser"}}}throw e}return s.root}var s=parse;t.default=s;e.exports=t.default},172:(e,t,r)=>{t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(142));var i=_interopRequireDefault(r(462));var s=_interopRequireDefault(r(676));var o=_interopRequireDefault(r(226));var u=_interopRequireDefault(r(234));var a=_interopRequireDefault(r(714));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var f=function(){function Parser(e){this.input=e;this.root=new u.default;this.current=this.root;this.spaces="";this.semicolon=false;this.createTokenizer();this.root.source={input:e,start:{line:1,column:1}}}var e=Parser.prototype;e.createTokenizer=function createTokenizer(){this.tokenizer=(0,i.default)(this.input)};e.parse=function parse(){var e;while(!this.tokenizer.endOfFile()){e=this.tokenizer.nextToken();switch(e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}}this.endFile()};e.comment=function comment(e){var t=new s.default;this.init(t,e[2],e[3]);t.source.end={line:e[4],column:e[5]};var r=e[1].slice(2,-2);if(/^\s*$/.test(r)){t.text="";t.raws.left=r;t.raws.right=""}else{var n=r.match(/^(\s*)([^]*[^\s])(\s*)$/);t.text=n[2];t.raws.left=n[1];t.raws.right=n[3]}};e.emptyRule=function emptyRule(e){var t=new a.default;this.init(t,e[2],e[3]);t.selector="";t.raws.between="";this.current=t};e.other=function other(e){var t=false;var r=null;var n=false;var i=null;var s=[];var o=[];var u=e;while(u){r=u[0];o.push(u);if(r==="("||r==="["){if(!i)i=u;s.push(r==="("?")":"]")}else if(s.length===0){if(r===";"){if(n){this.decl(o);return}else{break}}else if(r==="{"){this.rule(o);return}else if(r==="}"){this.tokenizer.back(o.pop());t=true;break}else if(r===":"){n=true}}else if(r===s[s.length-1]){s.pop();if(s.length===0)i=null}u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile())t=true;if(s.length>0)this.unclosedBracket(i);if(t&&n){while(o.length){u=o[o.length-1][0];if(u!=="space"&&u!=="comment")break;this.tokenizer.back(o.pop())}this.decl(o)}else{this.unknownWord(o)}};e.rule=function rule(e){e.pop();var t=new a.default;this.init(t,e[0][2],e[0][3]);t.raws.between=this.spacesAndCommentsFromEnd(e);this.raw(t,"selector",e);this.current=t};e.decl=function decl(e){var t=new n.default;this.init(t);var r=e[e.length-1];if(r[0]===";"){this.semicolon=true;e.pop()}if(r[4]){t.source.end={line:r[4],column:r[5]}}else{t.source.end={line:r[2],column:r[3]}}while(e[0][0]!=="word"){if(e.length===1)this.unknownWord(e);t.raws.before+=e.shift()[1]}t.source.start={line:e[0][2],column:e[0][3]};t.prop="";while(e.length){var i=e[0][0];if(i===":"||i==="space"||i==="comment"){break}t.prop+=e.shift()[1]}t.raws.between="";var s;while(e.length){s=e.shift();if(s[0]===":"){t.raws.between+=s[1];break}else{if(s[0]==="word"&&/\w/.test(s[1])){this.unknownWord([s])}t.raws.between+=s[1]}}if(t.prop[0]==="_"||t.prop[0]==="*"){t.raws.before+=t.prop[0];t.prop=t.prop.slice(1)}t.raws.between+=this.spacesAndCommentsFromStart(e);this.precheckMissedSemicolon(e);for(var o=e.length-1;o>0;o--){s=e[o];if(s[1].toLowerCase()==="!important"){t.important=true;var u=this.stringFrom(e,o);u=this.spacesFromEnd(e)+u;if(u!==" !important")t.raws.important=u;break}else if(s[1].toLowerCase()==="important"){var a=e.slice(0);var f="";for(var l=o;l>0;l--){var c=a[l][0];if(f.trim().indexOf("!")===0&&c!=="space"){break}f=a.pop()[1]+f}if(f.trim().indexOf("!")===0){t.important=true;t.raws.important=f;e=a}}if(s[0]!=="space"&&s[0]!=="comment"){break}}this.raw(t,"value",e);if(t.value.indexOf(":")!==-1)this.checkMissedSemicolon(e)};e.atrule=function atrule(e){var t=new o.default;t.name=e[1].slice(1);if(t.name===""){this.unnamedAtrule(t,e)}this.init(t,e[2],e[3]);var r;var n;var i=false;var s=false;var u=[];while(!this.tokenizer.endOfFile()){e=this.tokenizer.nextToken();if(e[0]===";"){t.source.end={line:e[2],column:e[3]};this.semicolon=true;break}else if(e[0]==="{"){s=true;break}else if(e[0]==="}"){if(u.length>0){n=u.length-1;r=u[n];while(r&&r[0]==="space"){r=u[--n]}if(r){t.source.end={line:r[4],column:r[5]}}}this.end(e);break}else{u.push(e)}if(this.tokenizer.endOfFile()){i=true;break}}t.raws.between=this.spacesAndCommentsFromEnd(u);if(u.length){t.raws.afterName=this.spacesAndCommentsFromStart(u);this.raw(t,"params",u);if(i){e=u[u.length-1];t.source.end={line:e[4],column:e[5]};this.spaces=t.raws.between;t.raws.between=""}}else{t.raws.afterName="";t.params=""}if(s){t.nodes=[];this.current=t}};e.end=function end(e){if(this.current.nodes&&this.current.nodes.length){this.current.raws.semicolon=this.semicolon}this.semicolon=false;this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.spaces="";if(this.current.parent){this.current.source.end={line:e[2],column:e[3]};this.current=this.current.parent}else{this.unexpectedClose(e)}};e.endFile=function endFile(){if(this.current.parent)this.unclosedBlock();if(this.current.nodes&&this.current.nodes.length){this.current.raws.semicolon=this.semicolon}this.current.raws.after=(this.current.raws.after||"")+this.spaces};e.freeSemicolon=function freeSemicolon(e){this.spaces+=e[1];if(this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];if(t&&t.type==="rule"&&!t.raws.ownSemicolon){t.raws.ownSemicolon=this.spaces;this.spaces=""}}};e.init=function init(e,t,r){this.current.push(e);e.source={start:{line:t,column:r},input:this.input};e.raws.before=this.spaces;this.spaces="";if(e.type!=="comment")this.semicolon=false};e.raw=function raw(e,t,r){var n,i;var s=r.length;var o="";var u=true;var a,f;var l=/^([.|#])?([\w])+/i;for(var c=0;c=0;i--){n=e[i];if(n[0]!=="space"){r+=1;if(r===2)break}}throw this.input.error("Missed semicolon",n[2],n[3])};return Parser}();t.default=f;e.exports=t.default},707:(e,t,r)=>{t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(142));var i=_interopRequireDefault(r(155));var s=_interopRequireDefault(r(885));var o=_interopRequireDefault(r(676));var u=_interopRequireDefault(r(226));var a=_interopRequireDefault(r(661));var f=_interopRequireDefault(r(972));var l=_interopRequireDefault(r(534));var c=_interopRequireDefault(r(714));var h=_interopRequireDefault(r(234));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function postcss(){for(var e=arguments.length,t=new Array(e),r=0;r{t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(241));var i=_interopRequireDefault(r(622));var s=_interopRequireDefault(r(747));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function fromBase64(e){if(Buffer){return Buffer.from(e,"base64").toString()}else{return window.atob(e)}}var o=function(){function PreviousMap(e,t){this.loadAnnotation(e);this.inline=this.startWith(this.annotation,"data:");var r=t.map?t.map.prev:undefined;var n=this.loadMap(t.from,r);if(n)this.text=n}var e=PreviousMap.prototype;e.consumer=function consumer(){if(!this.consumerCache){this.consumerCache=new n.default.SourceMapConsumer(this.text)}return this.consumerCache};e.withContent=function withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)};e.startWith=function startWith(e,t){if(!e)return false;return e.substr(0,t.length)===t};e.loadAnnotation=function loadAnnotation(e){var t=e.match(/\/\*\s*# sourceMappingURL=(.*)\s*\*\//);if(t)this.annotation=t[1].trim()};e.decodeInline=function decodeInline(e){var t=/^data:application\/json;charset=utf-?8;base64,/;var r=/^data:application\/json;base64,/;var n="data:application/json,";if(this.startWith(e,n)){return decodeURIComponent(e.substr(n.length))}if(t.test(e)||r.test(e)){return fromBase64(e.substr(RegExp.lastMatch.length))}var i=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)};e.loadMap=function loadMap(e,t){if(t===false)return false;if(t){if(typeof t==="string"){return t}else if(typeof t==="function"){var r=t(e);if(r&&s.default.existsSync&&s.default.existsSync(r)){return s.default.readFileSync(r,"utf-8").toString().trim()}else{throw new Error("Unable to load previous source map: "+r.toString())}}else if(t instanceof n.default.SourceMapConsumer){return n.default.SourceMapGenerator.fromSourceMap(t).toString()}else if(t instanceof n.default.SourceMapGenerator){return t.toString()}else if(this.isMap(t)){return JSON.stringify(t)}else{throw new Error("Unsupported previous source map format: "+t.toString())}}else if(this.inline){return this.decodeInline(this.annotation)}else if(this.annotation){var o=this.annotation;if(e)o=i.default.join(i.default.dirname(e),o);this.root=i.default.dirname(o);if(s.default.existsSync&&s.default.existsSync(o)){return s.default.readFileSync(o,"utf-8").toString().trim()}else{return false}}};e.isMap=function isMap(e){if(typeof e!=="object")return false;return typeof e.mappings==="string"||typeof e._mappings==="string"};return PreviousMap}();var u=o;t.default=u;e.exports=t.default},155:(e,t,r)=>{t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(805));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var i=function(){function Processor(e){if(e===void 0){e=[]}this.version="7.0.21";this.plugins=this.normalize(e)}var e=Processor.prototype;e.use=function use(e){this.plugins=this.plugins.concat(this.normalize([e]));return this};e.process=function(e){function process(t){return e.apply(this,arguments)}process.toString=function(){return e.toString()};return process}(function(e,t){if(t===void 0){t={}}if(this.plugins.length===0&&t.parser===t.stringifier){if(process.env.NODE_ENV!=="production"){if(typeof console!=="undefined"&&console.warn){console.warn("You did not set any plugins, parser, or stringifier. "+"Right now, PostCSS does nothing. Pick plugins for your case "+"on https://www.postcss.parts/ and use them in postcss.config.js.")}}}return new n.default(this,e,t)});e.normalize=function normalize(e){var t=[];for(var r=e,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{i=r.next();if(i.done)break;s=i.value}var o=s;if(o.postcss)o=o.postcss;if(typeof o==="object"&&Array.isArray(o.plugins)){t=t.concat(o.plugins)}else if(typeof o==="function"){t.push(o)}else if(typeof o==="object"&&(o.parse||o.stringify)){if(process.env.NODE_ENV!=="production"){throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use "+"one of the syntax/parser/stringifier options as outlined "+"in your PostCSS runner documentation.")}}else{throw new Error(o+" is not a PostCSS plugin")}}return t};return Processor}();var s=i;t.default=s;e.exports=t.default},292:(e,t,r)=>{t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(356));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,t){for(var r=0;r{t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(820));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype);e.prototype.constructor=e;e.__proto__=t}var i=function(e){_inheritsLoose(Root,e);function Root(t){var r;r=e.call(this,t)||this;r.type="root";if(!r.nodes)r.nodes=[];return r}var t=Root.prototype;t.removeChild=function removeChild(t,r){var n=this.index(t);if(!r&&n===0&&this.nodes.length>1){this.nodes[1].raws.before=this.nodes[n].raws.before}return e.prototype.removeChild.call(this,t)};t.normalize=function normalize(t,r,n){var i=e.prototype.normalize.call(this,t);if(r){if(n==="prepend"){if(this.nodes.length>1){r.raws.before=this.nodes[1].raws.before}else{delete r.raws.before}}else if(this.first!==r){for(var s=i,o=Array.isArray(s),u=0,s=o?s:s[Symbol.iterator]();;){var a;if(o){if(u>=s.length)break;a=s[u++]}else{u=s.next();if(u.done)break;a=u.value}var f=a;f.raws.before=r.raws.before}}}return i};t.toResult=function toResult(e){if(e===void 0){e={}}var t=r(805);var n=r(155);var i=new t(new n,this,e);return i.stringify()};return Root}(n.default);var s=i;t.default=s;e.exports=t.default},714:(e,t,r)=>{t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(820));var i=_interopRequireDefault(r(534));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _defineProperties(e,t){for(var r=0;r{t.__esModule=true;t.default=void 0;var r={colon:": ",indent:" ",beforeDecl:"\n",beforeRule:"\n",beforeOpen:" ",beforeClose:"\n",beforeComment:"\n",after:"\n",emptyBody:"",commentLeft:" ",commentRight:" ",semicolon:false};function capitalize(e){return e[0].toUpperCase()+e.slice(1)}var n=function(){function Stringifier(e){this.builder=e}var e=Stringifier.prototype;e.stringify=function stringify(e,t){this[e.type](e,t)};e.root=function root(e){this.body(e);if(e.raws.after)this.builder(e.raws.after)};e.comment=function comment(e){var t=this.raw(e,"left","commentLeft");var r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)};e.decl=function decl(e,t){var r=this.raw(e,"between","colon");var n=e.prop+r+this.rawValue(e,"value");if(e.important){n+=e.raws.important||" !important"}if(t)n+=";";this.builder(n,e)};e.rule=function rule(e){this.block(e,this.rawValue(e,"selector"));if(e.raws.ownSemicolon){this.builder(e.raws.ownSemicolon,e,"end")}};e.atrule=function atrule(e,t){var r="@"+e.name;var n=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!=="undefined"){r+=e.raws.afterName}else if(n){r+=" "}if(e.nodes){this.block(e,r+n)}else{var i=(e.raws.between||"")+(t?";":"");this.builder(r+n+i,e)}};e.body=function body(e){var t=e.nodes.length-1;while(t>0){if(e.nodes[t].type!=="comment")break;t-=1}var r=this.raw(e,"semicolon");for(var n=0;n0){if(typeof e.raws.after!=="undefined"){t=e.raws.after;if(t.indexOf("\n")!==-1){t=t.replace(/[^\n]+$/,"")}return false}}});if(t)t=t.replace(/[^\s]/g,"");return t};e.rawBeforeOpen=function rawBeforeOpen(e){var t;e.walk(function(e){if(e.type!=="decl"){t=e.raws.between;if(typeof t!=="undefined")return false}});return t};e.rawColon=function rawColon(e){var t;e.walkDecls(function(e){if(typeof e.raws.between!=="undefined"){t=e.raws.between.replace(/[^\s:]/g,"");return false}});return t};e.beforeAfter=function beforeAfter(e,t){var r;if(e.type==="decl"){r=this.raw(e,null,"beforeDecl")}else if(e.type==="comment"){r=this.raw(e,null,"beforeComment")}else if(t==="before"){r=this.raw(e,null,"beforeRule")}else{r=this.raw(e,null,"beforeClose")}var n=e.parent;var i=0;while(n&&n.type!=="root"){i+=1;n=n.parent}if(r.indexOf("\n")!==-1){var s=this.raw(e,null,"indent");if(s.length){for(var o=0;o{t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(218));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function stringify(e,t){var r=new n.default(t);r.stringify(e)}var i=stringify;t.default=i;e.exports=t.default},706:(e,t,r)=>{t.__esModule=true;t.default=void 0;var n=_interopRequireDefault(r(242));var i=_interopRequireDefault(r(462));var s=_interopRequireDefault(r(702));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var o={brackets:n.default.cyan,"at-word":n.default.cyan,comment:n.default.gray,string:n.default.green,class:n.default.yellow,call:n.default.cyan,hash:n.default.magenta,"(":n.default.cyan,")":n.default.cyan,"{":n.default.yellow,"}":n.default.yellow,"[":n.default.yellow,"]":n.default.yellow,":":n.default.yellow,";":n.default.yellow};function getTokenType(e,t){var r=e[0],n=e[1];if(r==="word"){if(n[0]==="."){return"class"}if(n[0]==="#"){return"hash"}}if(!t.endOfFile()){var i=t.nextToken();t.back(i);if(i[0]==="brackets"||i[0]==="(")return"call"}return r}function terminalHighlight(e){var t=(0,i.default)(new s.default(e),{ignoreErrors:true});var r="";var n=function _loop(){var e=t.nextToken();var n=o[getTokenType(e,t)];if(n){r+=e[1].split(/\r?\n/).map(function(e){return n(e)}).join("\n")}else{r+=e[1]}};while(!t.endOfFile()){n()}return r}var u=terminalHighlight;t.default=u;e.exports=t.default},462:(e,t)=>{t.__esModule=true;t.default=tokenizer;var r="'".charCodeAt(0);var n='"'.charCodeAt(0);var i="\\".charCodeAt(0);var s="/".charCodeAt(0);var o="\n".charCodeAt(0);var u=" ".charCodeAt(0);var a="\f".charCodeAt(0);var f="\t".charCodeAt(0);var l="\r".charCodeAt(0);var c="[".charCodeAt(0);var h="]".charCodeAt(0);var p="(".charCodeAt(0);var d=")".charCodeAt(0);var v="{".charCodeAt(0);var w="}".charCodeAt(0);var m=";".charCodeAt(0);var g="*".charCodeAt(0);var y=":".charCodeAt(0);var b="@".charCodeAt(0);var C=/[ \n\t\r\f{}()'"\\;/[\]#]/g;var R=/[ \n\t\r\f(){}:;@!'"\\\][#]|\/(?=\*)/g;var S=/.[\\/("'\n]/;var O=/[a-f0-9]/i;function tokenizer(e,t){if(t===void 0){t={}}var M=e.css.valueOf();var A=t.ignoreErrors;var D,k,E,x,q,N,F;var I,B,T,j,z,L,P;var V=M.length;var W=-1;var U=1;var $=0;var G=[];var J=[];function position(){return $}function unclosed(t){throw e.error("Unclosed "+t,U,$-W)}function endOfFile(){return J.length===0&&$>=V}function nextToken(e){if(J.length)return J.pop();if($>=V)return;var t=e?e.ignoreUnclosed:false;D=M.charCodeAt($);if(D===o||D===a||D===l&&M.charCodeAt($+1)!==o){W=$;U+=1}switch(D){case o:case u:case f:case l:case a:k=$;do{k+=1;D=M.charCodeAt(k);if(D===o){W=k;U+=1}}while(D===u||D===o||D===f||D===l||D===a);P=["space",M.slice($,k)];$=k-1;break;case c:case h:case v:case w:case y:case m:case d:var Y=String.fromCharCode(D);P=[Y,Y,U,$-W];break;case p:z=G.length?G.pop()[1]:"";L=M.charCodeAt($+1);if(z==="url"&&L!==r&&L!==n&&L!==u&&L!==o&&L!==f&&L!==a&&L!==l){k=$;do{T=false;k=M.indexOf(")",k+1);if(k===-1){if(A||t){k=$;break}else{unclosed("bracket")}}j=k;while(M.charCodeAt(j-1)===i){j-=1;T=!T}}while(T);P=["brackets",M.slice($,k+1),U,$-W,U,k-W];$=k}else{k=M.indexOf(")",$+1);N=M.slice($,k+1);if(k===-1||S.test(N)){P=["(","(",U,$-W]}else{P=["brackets",N,U,$-W,U,k-W];$=k}}break;case r:case n:E=D===r?"'":'"';k=$;do{T=false;k=M.indexOf(E,k+1);if(k===-1){if(A||t){k=$+1;break}else{unclosed("string")}}j=k;while(M.charCodeAt(j-1)===i){j-=1;T=!T}}while(T);N=M.slice($,k+1);x=N.split("\n");q=x.length-1;if(q>0){I=U+q;B=k-x[q].length}else{I=U;B=W}P=["string",M.slice($,k+1),U,$-W,I,k-B];W=B;U=I;$=k;break;case b:C.lastIndex=$+1;C.test(M);if(C.lastIndex===0){k=M.length-1}else{k=C.lastIndex-2}P=["at-word",M.slice($,k+1),U,$-W,U,k-W];$=k;break;case i:k=$;F=true;while(M.charCodeAt(k+1)===i){k+=1;F=!F}D=M.charCodeAt(k+1);if(F&&D!==s&&D!==u&&D!==o&&D!==f&&D!==l&&D!==a){k+=1;if(O.test(M.charAt(k))){while(O.test(M.charAt(k+1))){k+=1}if(M.charCodeAt(k+1)===u){k+=1}}}P=["word",M.slice($,k+1),U,$-W,U,k-W];$=k;break;default:if(D===s&&M.charCodeAt($+1)===g){k=M.indexOf("*/",$+2)+1;if(k===0){if(A||t){k=M.length}else{unclosed("comment")}}N=M.slice($,k+1);x=N.split("\n");q=x.length-1;if(q>0){I=U+q;B=k-x[q].length}else{I=U;B=W}P=["comment",N,U,$-W,I,k-B];W=B;U=I;$=k}else{R.lastIndex=$+1;R.test(M);if(R.lastIndex===0){k=M.length-1}else{k=R.lastIndex-2}P=["word",M.slice($,k+1),U,$-W,U,k-W];G.push(P);$=k}break}$++;return P}function back(e){J.push(e)}return{back:back,nextToken:nextToken,endOfFile:endOfFile,position:position}}e.exports=t.default},661:(e,t)=>{t.__esModule=true;t.default=void 0;var r={prefix:function prefix(e){var t=e.match(/^(-\w+-)/);if(t){return t[0]}return""},unprefixed:function unprefixed(e){return e.replace(/^-\w+-/,"")}};var n=r;t.default=n;e.exports=t.default},294:(e,t)=>{t.__esModule=true;t.default=warnOnce;var r={};function warnOnce(e){if(r[e])return;r[e]=true;if(typeof console!=="undefined"&&console.warn){console.warn(e)}}e.exports=t.default},356:(e,t)=>{t.__esModule=true;t.default=void 0;var r=function(){function Warning(e,t){if(t===void 0){t={}}this.type="warning";this.text=e;if(t.node&&t.node.source){var r=t.node.positionBy(t);this.line=r.line;this.column=r.column}for(var n in t){this[n]=t[n]}}var e=Warning.prototype;e.toString=function toString(){if(this.node){return this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message}if(this.plugin){return this.plugin+": "+this.text}return this.text};return Warning}();var n=r;t.default=n;e.exports=t.default},127:(e,t,r)=>{const n=r(87);const i=r(379);const{env:s}=process;let o;if(i("no-color")||i("no-colors")||i("color=false")||i("color=never")){o=0}else if(i("color")||i("colors")||i("color=true")||i("color=always")){o=1}if("FORCE_COLOR"in s){if(s.FORCE_COLOR===true||s.FORCE_COLOR==="true"){o=1}else if(s.FORCE_COLOR===false||s.FORCE_COLOR==="false"){o=0}else{o=s.FORCE_COLOR.length===0?1:Math.min(parseInt(s.FORCE_COLOR,10),3)}}function translateLevel(e){if(e===0){return false}return{level:e,hasBasic:true,has256:e>=2,has16m:e>=3}}function supportsColor(e){if(o===0){return 0}if(i("color=16m")||i("color=full")||i("color=truecolor")){return 3}if(i("color=256")){return 2}if(e&&!e.isTTY&&o===undefined){return 0}const t=o||0;if(s.TERM==="dumb"){return t}if(process.platform==="win32"){const e=n.release().split(".");if(Number(process.versions.node.split(".")[0])>=8&&Number(e[0])>=10&&Number(e[2])>=10586){return Number(e[2])>=14931?3:2}return 1}if("CI"in s){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in s)||s.CI_NAME==="codeship"){return 1}return t}if("TEAMCITY_VERSION"in s){return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0}if(s.COLORTERM==="truecolor"){return 3}if("TERM_PROGRAM"in s){const e=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(s.TERM)){return 2}if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)){return 1}if("COLORTERM"in s){return 1}return t}function getSupportLevel(e){const t=supportsColor(e);return translateLevel(t)}e.exports={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)}},242:e=>{e.exports=require("chalk")},747:e=>{e.exports=require("fs")},241:e=>{e.exports=require("next/dist/compiled/source-map")},87:e=>{e.exports=require("os")},622:e=>{e.exports=require("path")}};var t={};function __nccwpck_require__(r){if(t[r]){return t[r].exports}var n=t[r]={exports:{}};var i=true;try{e[r](n,n.exports,__nccwpck_require__);i=false}finally{if(i)delete t[r]}return n.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(136)})(); \ No newline at end of file diff --git a/packages/next/compiled/resolve-url-loader/engine/rework.js b/packages/next/compiled/resolve-url-loader/engine/rework.js new file mode 100644 index 0000000000000..65724f255a0ac --- /dev/null +++ b/packages/next/compiled/resolve-url-loader/engine/rework.js @@ -0,0 +1 @@ +module.exports=(()=>{var e={327:e=>{"use strict";function atob(e){return Buffer.from(e,"base64").toString("binary")}e.exports=atob.atob=atob},301:(e,t,r)=>{"use strict";var n=r(747);var o=r(622);var i=r(401);Object.defineProperty(t,"commentRegex",{get:function getCommentRegex(){return/^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/gm}});Object.defineProperty(t,"mapFileCommentRegex",{get:function getMapFileCommentRegex(){return/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"`]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/gm}});function decodeBase64(e){return i.Buffer.from(e,"base64").toString()}function stripComment(e){return e.split(",").pop()}function readFromFileMap(e,r){var i=t.mapFileCommentRegex.exec(e);var s=i[1]||i[2];var u=o.resolve(r,s);try{return n.readFileSync(u,"utf8")}catch(e){throw new Error("An error occurred while trying to read the map file at "+u+"\n"+e)}}function Converter(e,t){t=t||{};if(t.isFileComment)e=readFromFileMap(e,t.commentFileDir);if(t.hasComment)e=stripComment(e);if(t.isEncoded)e=decodeBase64(e);if(t.isJSON||t.isEncoded)e=JSON.parse(e);this.sourcemap=e}Converter.prototype.toJSON=function(e){return JSON.stringify(this.sourcemap,null,e)};Converter.prototype.toBase64=function(){var e=this.toJSON();return i.Buffer.from(e,"utf8").toString("base64")};Converter.prototype.toComment=function(e){var t=this.toBase64();var r="sourceMappingURL=data:application/json;charset=utf-8;base64,"+t;return e&&e.multiline?"/*# "+r+" */":"//# "+r};Converter.prototype.toObject=function(){return JSON.parse(this.toJSON())};Converter.prototype.addProperty=function(e,t){if(this.sourcemap.hasOwnProperty(e))throw new Error('property "'+e+'" already exists on the sourcemap, use set property instead');return this.setProperty(e,t)};Converter.prototype.setProperty=function(e,t){this.sourcemap[e]=t;return this};Converter.prototype.getProperty=function(e){return this.sourcemap[e]};t.fromObject=function(e){return new Converter(e)};t.fromJSON=function(e){return new Converter(e,{isJSON:true})};t.fromBase64=function(e){return new Converter(e,{isEncoded:true})};t.fromComment=function(e){e=e.replace(/^\/\*/g,"//").replace(/\*\/$/g,"");return new Converter(e,{isEncoded:true,hasComment:true})};t.fromMapFileComment=function(e,t){return new Converter(e,{commentFileDir:t,isFileComment:true,isJSON:true})};t.fromSource=function(e){var r=e.match(t.commentRegex);return r?t.fromComment(r.pop()):null};t.fromMapFileSource=function(e,r){var n=e.match(t.mapFileCommentRegex);return n?t.fromMapFileComment(n.pop(),r):null};t.removeComments=function(e){return e.replace(t.commentRegex,"")};t.removeMapFileComments=function(e){return e.replace(t.mapFileCommentRegex,"")};t.generateMapFileComment=function(e,t){var r="sourceMappingURL="+e;return t&&t.multiline?"/*# "+r+" */":"//# "+r}},401:(e,t,r)=>{var n=r(293);var o=n.Buffer;function copyProps(e,t){for(var r in e){t[r]=e[r]}}if(o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow){e.exports=n}else{copyProps(n,t);t.Buffer=SafeBuffer}function SafeBuffer(e,t,r){return o(e,t,r)}copyProps(o,SafeBuffer);SafeBuffer.from=function(e,t,r){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return o(e,t,r)};SafeBuffer.alloc=function(e,t,r){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var n=o(e);if(t!==undefined){if(typeof r==="string"){n.fill(t,r)}else{n.fill(t)}}else{n.fill(0)}return n};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return o(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return n.SlowBuffer(e)}},748:e=>{"use strict";var t="%[a-f0-9]{2}";var r=new RegExp(t,"gi");var n=new RegExp("("+t+")+","gi");function decodeComponents(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(e.length===1){return e}t=t||1;var r=e.slice(0,t);var n=e.slice(t);return Array.prototype.concat.call([],decodeComponents(r),decodeComponents(n))}function decode(e){try{return decodeURIComponent(e)}catch(o){var t=e.match(r);for(var n=1;n{try{var n=r(669);if(typeof n.inherits!=="function")throw"";e.exports=n.inherits}catch(t){e.exports=r(350)}},350:e=>{if(typeof Object.create==="function"){e.exports=function inherits(e,t){if(t){e.super_=t;e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{e.exports=function inherits(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype;e.prototype=new r;e.prototype.constructor=e}}}},269:(e,t,r)=>{"use strict";var n=r(622),o=r(301),i=r(447),s=r(841);var u=r(95);function process(e,t,r){var a=t+(r.absSourceMap?o.fromObject(u.prepend(r.absSourceMap)).toComment({multiline:true}):"");var c=i(a,{source:u.prepend(e)}).use(reworkPlugin).toString({sourcemap:r.outputSourceMap,sourcemapAsObject:r.outputSourceMap});if(r.outputSourceMap){return{content:c.code,map:u.remove(c.map)}}else{return{content:c,map:null}}function reworkPlugin(e){s(e,function visitor(e){if(e){e.forEach(eachDeclaration)}});function eachDeclaration(e){var t=e.value&&e.value.indexOf("url")>=0;if(t){var o=e.position.start,i=r.sourceMapConsumer&&r.sourceMapConsumer.originalPositionFor(o);var s=i&&i.source&&u.remove(n.dirname(i.source));if(s){e.value=r.transformDeclaration(e.value,s)}else if(r.sourceMapConsumer){throw new Error("source-map information is not available at url() declaration")}}}}}e.exports=process},95:(e,t)=>{"use strict";function prepend(e){if(typeof e==="string"){return"file://"+e}else if(e&&typeof e==="object"&&Array.isArray(e.sources)){return Object.assign({},e,{sources:e.sources.map(prepend)})}else{throw new Error("expected string|object")}}t.prepend=prepend;function remove(e){if(typeof e==="string"){return e.replace(/^file:\/{2}/,"")}else if(e&&typeof e==="object"&&Array.isArray(e.sources)){return Object.assign({},e,{sources:e.sources.map(remove)})}else{throw new Error("expected string|object")}}t.remove=remove},841:e=>{e.exports=visit;function visit(e,t){e.rules.forEach(function(r){if(r.rules){visit(r,t);return}if(r.keyframes){r.keyframes.forEach(function(e){t(e.declarations,r)});return}if(!r.declarations)return;t(r.declarations,e)})}},447:(e,t,r)=>{var n=r(792);var o=r(462);var i=n.parse;var s=n.stringify;t=e.exports=rework;function rework(e,t){return new Rework(i(e,t))}function Rework(e){this.obj=e}Rework.prototype.use=function(e){e(this.obj.stylesheet,this);return this};Rework.prototype.toString=function(e){e=e||{};var t=s(this.obj,e);if(e.sourcemap&&!e.sourcemapAsObject){t=t.code+"\n"+sourcemapToComment(t.map)}return t};function sourcemapToComment(e){var t=o.fromObject(e).toBase64();return"/*# sourceMappingURL=data:application/json;base64,"+t+" */"}},462:(e,t,r)=>{"use strict";var n=r(747);var o=r(622);var i=/^[ \t]*(?:\/\/|\/\*)[@#][ \t]+sourceMappingURL=data:(?:application|text)\/json;base64,(.+)(?:\*\/)?/gm;var s=/(?:^[ \t]*\/\/[@|#][ \t]+sourceMappingURL=(.+?)[ \t]*$)|(?:^[ \t]*\/\*[@#][ \t]+sourceMappingURL=(.+?)[ \t]*\*\/[ \t]*$)/gm;function decodeBase64(e){return new Buffer(e,"base64").toString()}function stripComment(e){return e.split(",").pop()}function readFromFileMap(e,t){var r=s.exec(e);s.lastIndex=0;var i=r[1]||r[2];var u=o.join(t,i);try{return n.readFileSync(u,"utf8")}catch(e){throw new Error("An error occurred while trying to read the map file at "+u+"\n"+e)}}function Converter(e,t){t=t||{};try{if(t.isFileComment)e=readFromFileMap(e,t.commentFileDir);if(t.hasComment)e=stripComment(e);if(t.isEncoded)e=decodeBase64(e);if(t.isJSON||t.isEncoded)e=JSON.parse(e);this.sourcemap=e}catch(e){console.error(e);return null}}Converter.prototype.toJSON=function(e){return JSON.stringify(this.sourcemap,null,e)};Converter.prototype.toBase64=function(){var e=this.toJSON();return new Buffer(e).toString("base64")};Converter.prototype.toComment=function(){var e=this.toBase64();return"//# sourceMappingURL=data:application/json;base64,"+e};Converter.prototype.toObject=function(){return JSON.parse(this.toJSON())};Converter.prototype.addProperty=function(e,t){if(this.sourcemap.hasOwnProperty(e))throw new Error("property %s already exists on the sourcemap, use set property instead");return this.setProperty(e,t)};Converter.prototype.setProperty=function(e,t){this.sourcemap[e]=t;return this};Converter.prototype.getProperty=function(e){return this.sourcemap[e]};t.fromObject=function(e){return new Converter(e)};t.fromJSON=function(e){return new Converter(e,{isJSON:true})};t.fromBase64=function(e){return new Converter(e,{isEncoded:true})};t.fromComment=function(e){e=e.replace(/^\/\*/g,"//").replace(/\*\/$/g,"");return new Converter(e,{isEncoded:true,hasComment:true})};t.fromMapFileComment=function(e,t){return new Converter(e,{commentFileDir:t,isFileComment:true,isJSON:true})};t.fromSource=function(e){var r=e.match(i);i.lastIndex=0;return r?t.fromComment(r.pop()):null};t.fromMapFileSource=function(e,r){var n=e.match(s);s.lastIndex=0;return n?t.fromMapFileComment(n.pop(),r):null};t.removeComments=function(e){i.lastIndex=0;return e.replace(i,"")};t.removeMapFileComments=function(e){s.lastIndex=0;return e.replace(s,"")};t.__defineGetter__("commentRegex",function(){i.lastIndex=0;return i});t.__defineGetter__("mapFileCommentRegex",function(){s.lastIndex=0;return s})},792:(e,t,r)=>{t.parse=r(836);t.stringify=r(11)},836:e=>{var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;e.exports=function(e,r){r=r||{};var n=1;var o=1;function updatePosition(e){var t=e.match(/\n/g);if(t)n+=t.length;var r=e.lastIndexOf("\n");o=~r?e.length-r:o+e.length}function position(){var e={line:n,column:o};return function(t){t.position=new Position(e);whitespace();return t}}function Position(e){this.start=e;this.end={line:n,column:o};this.source=r.source}Position.prototype.content=e;var i=[];function error(t){var s=new Error(r.source+":"+n+":"+o+": "+t);s.reason=t;s.filename=r.source;s.line=n;s.column=o;s.source=e;if(r.silent){i.push(s)}else{throw s}}function stylesheet(){var e=rules();return{type:"stylesheet",stylesheet:{source:r.source,rules:e,parsingErrors:i}}}function open(){return match(/^{\s*/)}function close(){return match(/^}/)}function rules(){var t;var r=[];whitespace();comments(r);while(e.length&&e.charAt(0)!="}"&&(t=atrule()||rule())){if(t!==false){r.push(t);comments(r)}}return r}function match(t){var r=t.exec(e);if(!r)return;var n=r[0];updatePosition(n);e=e.slice(n.length);return r}function whitespace(){match(/^\s*/)}function comments(e){var t;e=e||[];while(t=comment()){if(t!==false){e.push(t)}}return e}function comment(){var t=position();if("/"!=e.charAt(0)||"*"!=e.charAt(1))return;var r=2;while(""!=e.charAt(r)&&("*"!=e.charAt(r)||"/"!=e.charAt(r+1)))++r;r+=2;if(""===e.charAt(r-1)){return error("End of comment missing")}var n=e.slice(2,r-2);o+=2;updatePosition(n);e=e.slice(r);o+=2;return t({type:"comment",comment:n})}function selector(){var e=match(/^([^{]+)/);if(!e)return;return trim(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(e){return e.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(e){return e.replace(/\u200C/g,",")})}function declaration(){var e=position();var r=match(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!r)return;r=trim(r[0]);if(!match(/^:\s*/))return error("property missing ':'");var n=match(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/);var o=e({type:"declaration",property:r.replace(t,""),value:n?trim(n[0]).replace(t,""):""});match(/^[;\s]*/);return o}function declarations(){var e=[];if(!open())return error("missing '{'");comments(e);var t;while(t=declaration()){if(t!==false){e.push(t);comments(e)}}if(!close())return error("missing '}'");return e}function keyframe(){var e;var t=[];var r=position();while(e=match(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/)){t.push(e[1]);match(/^,\s*/)}if(!t.length)return;return r({type:"keyframe",values:t,declarations:declarations()})}function atkeyframes(){var e=position();var t=match(/^@([-\w]+)?keyframes\s*/);if(!t)return;var r=t[1];var t=match(/^([-\w]+)\s*/);if(!t)return error("@keyframes missing name");var n=t[1];if(!open())return error("@keyframes missing '{'");var o;var i=comments();while(o=keyframe()){i.push(o);i=i.concat(comments())}if(!close())return error("@keyframes missing '}'");return e({type:"keyframes",name:n,vendor:r,keyframes:i})}function atsupports(){var e=position();var t=match(/^@supports *([^{]+)/);if(!t)return;var r=trim(t[1]);if(!open())return error("@supports missing '{'");var n=comments().concat(rules());if(!close())return error("@supports missing '}'");return e({type:"supports",supports:r,rules:n})}function athost(){var e=position();var t=match(/^@host\s*/);if(!t)return;if(!open())return error("@host missing '{'");var r=comments().concat(rules());if(!close())return error("@host missing '}'");return e({type:"host",rules:r})}function atmedia(){var e=position();var t=match(/^@media *([^{]+)/);if(!t)return;var r=trim(t[1]);if(!open())return error("@media missing '{'");var n=comments().concat(rules());if(!close())return error("@media missing '}'");return e({type:"media",media:r,rules:n})}function atcustommedia(){var e=position();var t=match(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(!t)return;return e({type:"custom-media",name:trim(t[1]),media:trim(t[2])})}function atpage(){var e=position();var t=match(/^@page */);if(!t)return;var r=selector()||[];if(!open())return error("@page missing '{'");var n=comments();var o;while(o=declaration()){n.push(o);n=n.concat(comments())}if(!close())return error("@page missing '}'");return e({type:"page",selectors:r,declarations:n})}function atdocument(){var e=position();var t=match(/^@([-\w]+)?document *([^{]+)/);if(!t)return;var r=trim(t[1]);var n=trim(t[2]);if(!open())return error("@document missing '{'");var o=comments().concat(rules());if(!close())return error("@document missing '}'");return e({type:"document",document:n,vendor:r,rules:o})}function atfontface(){var e=position();var t=match(/^@font-face\s*/);if(!t)return;if(!open())return error("@font-face missing '{'");var r=comments();var n;while(n=declaration()){r.push(n);r=r.concat(comments())}if(!close())return error("@font-face missing '}'");return e({type:"font-face",declarations:r})}var s=_compileAtrule("import");var u=_compileAtrule("charset");var a=_compileAtrule("namespace");function _compileAtrule(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var r=position();var n=match(t);if(!n)return;var o={type:e};o[e]=n[1].trim();return r(o)}}function atrule(){if(e[0]!="@")return;return atkeyframes()||atmedia()||atcustommedia()||atsupports()||s()||u()||a()||atdocument()||atpage()||athost()||atfontface()}function rule(){var e=position();var t=selector();if(!t)return error("selector missing");comments();return e({type:"rule",selectors:t,declarations:declarations()})}return addParent(stylesheet())};function trim(e){return e?e.replace(/^\s+|\s+$/g,""):""}function addParent(e,t){var r=e&&typeof e.type==="string";var n=r?e:t;for(var o in e){var i=e[o];if(Array.isArray(i)){i.forEach(function(e){addParent(e,n)})}else if(i&&typeof i==="object"){addParent(i,n)}}if(r){Object.defineProperty(e,"parent",{configurable:true,writable:true,enumerable:false,value:t||null})}return e}},691:e=>{e.exports=Compiler;function Compiler(e){this.options=e||{}}Compiler.prototype.emit=function(e){return e};Compiler.prototype.visit=function(e){return this[e.type](e)};Compiler.prototype.mapVisit=function(e,t){var r="";t=t||"";for(var n=0,o=e.length;n{var n=r(691);var o=r(989);e.exports=Compiler;function Compiler(e){n.call(this,e)}o(Compiler,n);Compiler.prototype.compile=function(e){return e.stylesheet.rules.map(this.visit,this).join("")};Compiler.prototype.comment=function(e){return this.emit("",e.position)};Compiler.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)};Compiler.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")};Compiler.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")};Compiler.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)};Compiler.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)};Compiler.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")};Compiler.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit("{")+this.mapVisit(e.keyframes)+this.emit("}")};Compiler.prototype.keyframe=function(e){var t=e.declarations;return this.emit(e.values.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")};Compiler.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", "):"";return this.emit("@page "+t,e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")};Compiler.prototype["font-face"]=function(e){return this.emit("@font-face",e.position)+this.emit("{")+this.mapVisit(e.declarations)+this.emit("}")};Compiler.prototype.host=function(e){return this.emit("@host",e.position)+this.emit("{")+this.mapVisit(e.rules)+this.emit("}")};Compiler.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)};Compiler.prototype.rule=function(e){var t=e.declarations;if(!t.length)return"";return this.emit(e.selectors.join(","),e.position)+this.emit("{")+this.mapVisit(t)+this.emit("}")};Compiler.prototype.declaration=function(e){return this.emit(e.property+":"+e.value,e.position)+this.emit(";")}},184:(e,t,r)=>{var n=r(691);var o=r(989);e.exports=Compiler;function Compiler(e){e=e||{};n.call(this,e);this.indentation=e.indent}o(Compiler,n);Compiler.prototype.compile=function(e){return this.stylesheet(e)};Compiler.prototype.stylesheet=function(e){return this.mapVisit(e.stylesheet.rules,"\n\n")};Compiler.prototype.comment=function(e){return this.emit(this.indent()+"/*"+e.comment+"*/",e.position)};Compiler.prototype.import=function(e){return this.emit("@import "+e.import+";",e.position)};Compiler.prototype.media=function(e){return this.emit("@media "+e.media,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")};Compiler.prototype.document=function(e){var t="@"+(e.vendor||"")+"document "+e.document;return this.emit(t,e.position)+this.emit(" "+" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")};Compiler.prototype.charset=function(e){return this.emit("@charset "+e.charset+";",e.position)};Compiler.prototype.namespace=function(e){return this.emit("@namespace "+e.namespace+";",e.position)};Compiler.prototype.supports=function(e){return this.emit("@supports "+e.supports,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")};Compiler.prototype.keyframes=function(e){return this.emit("@"+(e.vendor||"")+"keyframes "+e.name,e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.keyframes,"\n")+this.emit(this.indent(-1)+"}")};Compiler.prototype.keyframe=function(e){var t=e.declarations;return this.emit(this.indent())+this.emit(e.values.join(", "),e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(t,"\n")+this.emit(this.indent(-1)+"\n"+this.indent()+"}\n")};Compiler.prototype.page=function(e){var t=e.selectors.length?e.selectors.join(", ")+" ":"";return this.emit("@page "+t,e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")};Compiler.prototype["font-face"]=function(e){return this.emit("@font-face ",e.position)+this.emit("{\n")+this.emit(this.indent(1))+this.mapVisit(e.declarations,"\n")+this.emit(this.indent(-1))+this.emit("\n}")};Compiler.prototype.host=function(e){return this.emit("@host",e.position)+this.emit(" {\n"+this.indent(1))+this.mapVisit(e.rules,"\n\n")+this.emit(this.indent(-1)+"\n}")};Compiler.prototype["custom-media"]=function(e){return this.emit("@custom-media "+e.name+" "+e.media+";",e.position)};Compiler.prototype.rule=function(e){var t=this.indent();var r=e.declarations;if(!r.length)return"";return this.emit(e.selectors.map(function(e){return t+e}).join(",\n"),e.position)+this.emit(" {\n")+this.emit(this.indent(1))+this.mapVisit(r,"\n")+this.emit(this.indent(-1))+this.emit("\n"+this.indent()+"}")};Compiler.prototype.declaration=function(e){return this.emit(this.indent())+this.emit(e.property+": "+e.value,e.position)+this.emit(";")};Compiler.prototype.indent=function(e){this.level=this.level||1;if(null!=e){this.level+=e;return""}return Array(this.level).join(this.indentation||" ")}},11:(e,t,r)=>{var n=r(432);var o=r(184);e.exports=function(e,t){t=t||{};var i=t.compress?new n(t):new o(t);if(t.sourcemap){var s=r(878);s(i);var u=i.compile(e);i.applySourceMaps();var a=t.sourcemap==="generator"?i.map:i.map.toJSON();return{code:u,map:a}}var u=i.compile(e);return u}},878:(e,t,r)=>{var n=r(241).SourceMapGenerator;var o=r(241).SourceMapConsumer;var i=r(227);var s=r(806);var u=r(747);var a=r(622);e.exports=mixin;function mixin(e){e._comment=e.comment;e.map=new n;e.position={line:1,column:1};e.files={};for(var r in t)e[r]=t[r]}t.updatePosition=function(e){var t=e.match(/\n/g);if(t)this.position.line+=t.length;var r=e.lastIndexOf("\n");this.position.column=~r?e.length-r:this.position.column+e.length};t.emit=function(e,t){if(t){var r=s(t.source||"source.css");this.map.addMapping({source:r,generated:{line:this.position.line,column:Math.max(this.position.column-1,0)},original:{line:t.start.line,column:t.start.column-1}});this.addFile(r,t)}this.updatePosition(e);return e};t.addFile=function(e,t){if(typeof t.content!=="string")return;if(Object.prototype.hasOwnProperty.call(this.files,e))return;this.files[e]=t.content};t.applySourceMaps=function(){Object.keys(this.files).forEach(function(e){var t=this.files[e];this.map.setSourceContent(e,t);if(this.options.inputSourcemaps!==false){var r=i.resolveSync(t,e,u.readFileSync);if(r){var n=new o(r.map);var c=r.sourcesRelativeTo;this.map.applySourceMap(n,e,s(a.dirname(c)))}}},this)};t.comment=function(e){if(/^# sourceMappingURL=/.test(e.comment))return this.emit("",e.position);else return this._comment(e)}},609:(e,t,r)=>{var n=r(748);function customDecodeUriComponent(e){return n(e.replace(/\+/g,"%2B"))}e.exports=customDecodeUriComponent},825:(e,t,r)=>{var n=r(835);function resolveUrl(){return Array.prototype.reduce.call(arguments,function(e,t){return n.resolve(e,t)})}e.exports=resolveUrl},227:(e,t,r)=>{var n=r(707);var o=r(825);var i=r(609);var s=r(806);var u=r(327);function callbackAsync(e,t,r){setImmediate(function(){e(t,r)})}function parseMapToJSON(e,t){try{return JSON.parse(e.replace(/^\)\]\}'/,""))}catch(e){e.sourceMapData=t;throw e}}function readSync(e,t,r){var n=i(t);try{return String(e(n))}catch(e){e.sourceMapData=r;throw e}}function resolveSourceMap(e,t,r,n){var o;try{o=resolveSourceMapHelper(e,t)}catch(e){return callbackAsync(n,e)}if(!o||o.map){return callbackAsync(n,null,o)}var s=i(o.url);r(s,function(e,t){if(e){e.sourceMapData=o;return n(e)}o.map=String(t);try{o.map=parseMapToJSON(o.map,o)}catch(e){return n(e)}n(null,o)})}function resolveSourceMapSync(e,t,r){var n=resolveSourceMapHelper(e,t);if(!n||n.map){return n}n.map=readSync(r,n.url,n);n.map=parseMapToJSON(n.map,n);return n}var a=/^data:([^,;]*)(;[^,;]*)*(?:,(.*))?$/;var c=/^(?:application|text)\/json$/;var p="utf-8";function base64ToBuf(e){var t=u(e);var r=t.length;var n=new Uint8Array(r);for(var o=0;o{var n=r(622);"use strict";function urix(e){if(n.sep==="\\"){return e.replace(/\\/g,"/").replace(/^[a-z]:\/?/i,"/")}return e}e.exports=urix},293:e=>{"use strict";e.exports=require("buffer")},747:e=>{"use strict";e.exports=require("fs")},241:e=>{"use strict";e.exports=require("next/dist/compiled/source-map")},622:e=>{"use strict";e.exports=require("path")},835:e=>{"use strict";e.exports=require("url")},669:e=>{"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(r){if(t[r]){return t[r].exports}var n=t[r]={exports:{}};var o=true;try{e[r].call(n.exports,n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return n.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(269)})(); \ No newline at end of file diff --git a/packages/next/compiled/resolve-url-loader/index.js b/packages/next/compiled/resolve-url-loader/index.js new file mode 100644 index 0000000000000..fe6ee51a0f74f --- /dev/null +++ b/packages/next/compiled/resolve-url-loader/index.js @@ -0,0 +1 @@ +module.exports=(()=>{var t={5325:t=>{"use strict";t.exports=JSON.parse('{"u2":"adjust-sourcemap-loader"}')},2452:t=>{"use strict";t.exports=JSON.parse('{"u2":"resolve-url-loader"}')},516:(t,e,r)=>{"use strict";var n=r(5622),o=r(5747);t.exports={name:"absolute",decode:decode,encode:encode,root:root};function decode(t){return n.isAbsolute(t)&&o.existsSync(t)&&o.statSync(t).isFile()&&t}function encode(t){return t}function root(){}},9609:t=>{"use strict";t.exports={name:"bowerComponent",decode:decode,abstract:true};function decode(t){return/^\/?([\w-]+)\s+\(bower component\)$/.test(t)}},3595:(t,e,r)=>{t.exports=[r(2018),r(1113),r(9609),r(9405),r(2134),r(1314),r(1588),r(516)]},9405:(t,e,r)=>{"use strict";var n=r(5622),o=r(5747);var i=r(3443);var s=r(1595);t.exports={name:"npmModule",decode:decode};function decode(t){if(/~/.test(t)){var e=i.urlToRequest(t),r=s.call(this),u=n.normalize(n.join(r,"node_modules",e)),c=!!u&&o.existsSync(u)&&o.statSync(u).isFile();return c&&u}}},2134:(t,e,r)=>{"use strict";var n=r(5622),o=r(5747);var i=r(4952);t.exports={name:"outputRelative",decode:decode,encode:encode,root:i};function decode(t){var e=i.call(this),r=!!e&&n.normalize(n.join(e,t)),s=!!r&&o.existsSync(r)&&o.statSync(r).isFile();return s&&r}function encode(t){var e=i.call(this);if(!e){throw new Error("Cannot locate the Webpack output directory")}else{return n.relative(e,t)}}},1314:(t,e,r)=>{"use strict";var n=r(5622),o=r(5747);var i=r(1595),s=r(9390);t.exports={name:"projectRelative",decode:decode,encode:encode,root:i};function decode(t){var e=i.call(this),r=n.normalize(n.join(e,t)),s=!!r&&o.existsSync(r)&&o.statSync(r).isFile();return s&&r}function encode(t){var e=i.call(this);if(!e){throw new Error("Cannot locate the Webpack project directory")}else{return"/"+s(e,t)}}},1588:(t,e,r)=>{"use strict";var n=r(5622),o=r(5747);t.exports={name:"sourceRelative",decode:decode,encode:encode,root:root};function decode(t){var e=this.context,r=!!e&&n.normalize(n.join(e,t)),i=!!r&&o.existsSync(r)&&o.statSync(r).isFile();return i&&r}function encode(t){return n.relative(this.context,t)}function root(){return this.context}},9390:(t,e,r)=>{"use strict";var n=r(5747),o=r(5622);var i;function enhancedRelative(t,e){var r=o.relative(t,e);var s=r.replace(/^\.{2}[\\\/]/,""),u=e.replace(s,"");var c=r===s;if(c){return r}else{var a=s.split(/[\\\/]/);for(var f=i?2:1,l=false;f>0&&!l;f--){i=i||indexLinkedModules(t);for(var p=0;p0){var i=e.shift(),s=o.join(i,"package.json"),u=n.existsSync(s)&&require(s).name;if(u){r[u]=r[u]||i;e.push.apply(e,listSymLinkedModules(i))}}return r;function listSymLinkedModules(t){var e=o.join(t,"node_modules"),r=n.existsSync(e)&&n.statSync(e).isDirectory(),i=!!r&&n.readdirSync(e)||[];return i.map(joinDirectory).filter(testIsSymLink);function joinDirectory(t){return o.join(e,t)}function testIsSymLink(t){return n.lstatSync(t).isSymbolicLink()}}}},1595:(t,e,r)=>{"use strict";var n=r(5622);function getContextDirectory(){var t=this.options?this.options.context:null;return!!t&&n.resolve(t)||process.cwd()}t.exports=getContextDirectory},4952:(t,e,r)=>{"use strict";var n=r(5622),o=r(5747);var i=r(1595);function getOutputDirectory(){var t=this.options&&this.options.output?this.options.output.directory:null,e=!!t&&n.resolve(i.call(this),t),r=!!e&&o.existsSync(e)&&o.statSync(e).isDirectory();return r?e:undefined}t.exports=getOutputDirectory},1113:t=>{"use strict";t.exports={name:"webpackBootstrap",decode:decode,abstract:true};function decode(t){return/^webpack\/bootstrap\s+\w{20}$/.test(t)}},2018:(t,e,r)=>{"use strict";var n=r(1314);t.exports={name:"webpackProtocol",decode:decode,encode:encode,root:root};function decode(t){var e=/^webpack:\/{2}(.*)$/.exec(t);return!!e&&n.decode.call(this,e[1])}function encode(t){return"webpack://"+n.encode.call(this,t)}function root(){}},9169:(t,e,r)=>{"use strict";var n=r(5325).u2,o=new Array(11).join(" ");function debugMessage(t,e){return[" ",n+":"," "+t.resourcePath,formatField("@",precedingRequest(t)),formatField("INPUT",e.input||"(source-map absent)"),formatField("ABSOLUTE",e.absolute),formatField("OUTPUT",e.output),formatField("ROOT",e.root)].filter(Boolean).join("\n")}t.exports=debugMessage;function precedingRequest(t){var e="loaderIndex"in t&&"loaders"in t&&Array.isArray(t.loaders);if(e){var r=t.loaderIndex+1;return r in t.loaders?t.loaders[r].request:"(no preceding loader)"}}function formatField(t,e){return!!e&&rightAlign(t)+formatData(e);function rightAlign(t){return(o+t+" ").slice(-o.length)}function formatData(t){return Array.isArray(t)?t.join("\n"+o):t}}},3352:(t,e,r)=>{"use strict";var n=r(1886);function decodeSourcesWith(t,e){var r=this;var n=[].concat(t).reduce(reduceValidDecoder.bind(null,t),[]);return function decode(t){for(var o=0,i=null;o{"use strict";var n=r(1886),o=r(6635);function encodeSourcesWith(t){var e=this,r=n("encode")(t);if(!r){return new o('Specified format does not support encoding (it lacks an "encoder" function)')}else{return function encode(n){var o;try{o=n&&r.call(e,n)}catch(t){return getNamedError(t)}return o;function getNamedError(e){var r=t.name||"(unnamed)",o=["Encoding with codec: "+r,"Absolute source: "+n,e&&(e.stack?e.stack:e)].filter(Boolean).join("\n");return new Error(o)}}}}t.exports=encodeSourcesWith},6635:(t,e,r)=>{"use strict";var n=r(5325).u2;function getError(){var t=(n+":\n"+Array.prototype.slice.call(arguments).join(" ")).split(/\s*\n\s*/).join("\n ");return new Error(t)}t.exports=getError},1886:t=>{"use strict";function getFieldAsFn(t){return function getFromValue(e){return!!e&&typeof e==="object"&&typeof e[t]==="function"&&e[t]}}t.exports=getFieldAsFn},4909:(t,e,r)=>{"use strict";var n=r(9169),o=r(8483),i=r(115),s=r(3352),u=r(401),c=r(8116),a=r(7020);var f=r(3595);function process(t,e,r){var l=Object.assign({sep:"/",debug:false,fail:false,format:false,root:false,codecs:f},e);var p=l.codecs.filter(a);var d=!!r&&typeof r==="object"&&r,v=typeof r==="string"&&r,_=d&&d.sources||v&&[v];var h,g,y,x;if(_){h=_.map(s.call(t,p,l.fail));i(t.resourcePath,h);x=!d||l.format==="remove"?undefined:Object.assign({},d);if(l.format){var b=p.filter(testNamedCodec).pop();if(!b){throw new Error('Specified format "'+l.format+'" does not match any available codec.')}g=h.map(c.call(t,b)).map(insertAbstractSources).map(convertPathSep);y=!!l.root&&u.call(t,b)()||undefined;i(t.resourcePath,g.concat(y));if(x){x.sources=g;x.sourceRoot=y}}}var m=o(l.debug).test(t.resourcePath);if(m){console.log(n(t,{input:_,absolute:h,output:g,root:y}))}return d?x:g?g[0]:undefined;function testNamedCodec(t){return t.name===l.format}function insertAbstractSources(t,e){return t||_[e]}function convertPathSep(t){return t instanceof Error?t:t.replace(/[\\\/]/g,l.sep)}}t.exports=process},401:(t,e,r)=>{"use strict";var n=r(1886),o=r(6635);function locateRootWith(t){var e=this,r=n("root")(t);if(!r){return new o('Specified format does not support encoding (it lacks a "root" function)')}else{return function locate(){var n;try{n=r.call(e)}catch(t){return getNamedError(t)}return n;function getNamedError(e){var r=t.name||"(unnamed)",n=["Locating root with codec: "+r,e&&(e.stack?e.stack:e)].filter(Boolean).join("\n");return new Error(n)}}}}t.exports=locateRootWith},7020:(t,e,r)=>{"use strict";var n=r(2357);function testCodec(t){n(!!t&&typeof t==="object","Codec must be an object");n(typeof t.name==="string"&&/^[\w-]+$/.test(t.name),"Codec.name must be a kebab-case string");n(typeof t.decode==="function"&&t.decode.length===1,"Codec.decode must be a function that accepts a single source string");n(typeof t.encode==="undefined"||typeof t.encode==="function"&&t.encode.length===1,"Codec.encode must be a function that accepts a single absolute path string, or else be omitted");n(typeof t.root==="undefined"||typeof t.root==="function"&&t.root.length===0,"Codec.root must be a function that accepts no arguments, or else be omitted");return true}t.exports=testCodec},115:(t,e,r)=>{"use strict";var n=r(6635);function throwErrors(t,e){var r=!!e&&e.filter(testIsError).map(getMessage);var o=!!r&&r.length;if(o){throw n(["For resource: "+t].concat(r).join("\n"))}function testIsError(t){return!!t&&typeof t==="object"&&t instanceof Error}function getMessage(t){return t.message}}t.exports=throwErrors},8483:(t,e,r)=>{"use strict";var n=r(171);var o=/(\/?)(.+)\1([a-z]*)/i;function toRegExp(t){return typeof t==="object"&&typeof t.test==="function"&&t||typeof t==="string"&&o.test(t)&&n(t)||/^true$|^$/.test(t)&&/.*/||/matchnone^/}t.exports=toRegExp},9730:t=>{t.exports=function(t){return function(){return t.apply(null,arguments)}}},559:t=>{t.exports=function(t){return function(e){return t.apply(null,arguments)}}},3896:t=>{t.exports=function(t){return function(e,r){return t.apply(null,arguments)}}},9288:t=>{t.exports=function(t){return function(e,r,n){return t.apply(null,arguments)}}},1239:t=>{t.exports=function(t){return function(e,r,n,o){return t.apply(null,arguments)}}},5728:t=>{t.exports=function(t){return function(e,r,n,o,i){return t.apply(null,arguments)}}},2639:(t,e,r)=>{var n=[r(9730),r(559),r(3896),r(9288),r(1239),r(5728)];t.exports=function(t,e){if(e&&e<=5){return n[e](t)}else{return t}}},4892:t=>{"use strict";const e=t=>{let e=false;let r=false;let n=false;for(let o=0;o{if(!(typeof t==="string"||Array.isArray(t))){throw new TypeError("Expected the input to be `string | string[]`")}r=Object.assign({pascalCase:false},r);const n=t=>r.pascalCase?t.charAt(0).toUpperCase()+t.slice(1):t;if(Array.isArray(t)){t=t.map(t=>t.trim()).filter(t=>t.length).join("-")}else{t=t.trim()}if(t.length===0){return""}if(t.length===1){return r.pascalCase?t.toUpperCase():t.toLowerCase()}const o=t!==t.toLowerCase();if(o){t=e(t)}t=t.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(t,e)=>e.toUpperCase()).replace(/\d+(\w|$)/g,t=>t.toUpperCase());return n(t)};t.exports=r;t.exports.default=r},5286:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.default=compose;function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}var n=r(2639);var o=_interopRequireDefault(n);var i=function compose2(t,e){return function(){return t(e.apply(undefined,arguments))}};function compose(){for(var t=arguments.length,e=Array(t),r=0;r=0&&n[s]){u=n[s].length}return(0,o["default"])(n.reduce(i),u)}t.exports=e["default"]},4954:(t,e,r)=>{"use strict";var n=r(1321),o=r(4803),i=r(405),s=r(9521),u=r(1428),c=r(8367);var a=Function.prototype.bind,f=Object.defineProperty,l=Object.prototype.hasOwnProperty,p;p=function(t,e,r){var n=o(e)&&i(e.value),u;u=s(e);delete u.writable;delete u.value;u.get=function(){if(!r.overwriteDefinition&&l.call(this,t))return n;e.value=a.call(n,r.resolveContext?r.resolveContext(this):this);f(this,t,e);return this[t]};return u};t.exports=function(t){var e=u(arguments[1]);if(n(e.resolveContext))i(e.resolveContext);return c(t,function(t,r){return p(r,t,e)})}},7754:(t,e,r)=>{"use strict";var n=r(1321),o=r(5287),i=r(5432),s=r(1428),u=r(4511);var c=t.exports=function(t,e){var r,o,c,a,f;if(arguments.length<2||typeof t!=="string"){a=e;e=t;t=null}else{a=arguments[2]}if(n(t)){r=u.call(t,"c");o=u.call(t,"e");c=u.call(t,"w")}else{r=c=true;o=false}f={value:e,configurable:r,enumerable:o,writable:c};return!a?f:i(s(a),f)};c.gs=function(t,e,r){var c,a,f,l;if(typeof t!=="string"){f=r;r=e;e=t;t=null}else{f=arguments[3]}if(!n(e)){e=undefined}else if(!o(e)){f=e;e=r=undefined}else if(!n(r)){r=undefined}else if(!o(r)){f=r;r=undefined}if(n(t)){c=u.call(t,"c");a=u.call(t,"e")}else{c=true;a=false}l={get:e,set:r,configurable:c,enumerable:a};return!f?l:i(s(f),l)}},4684:(t,e,r)=>{"use strict";var n=r(5029);t.exports=function(){n(this).length=0;return this}},2236:(t,e,r)=>{"use strict";t.exports=r(738)()?Array.from:r(5759)},738:t=>{"use strict";t.exports=function(){var t=Array.from,e,r;if(typeof t!=="function")return false;e=["raz","dwa"];r=t(e);return Boolean(r&&r!==e&&r[1]==="dwa")}},5759:(t,e,r)=>{"use strict";var n=r(3870).iterator,o=r(2791),i=r(3660),s=r(9765),u=r(291),c=r(5029),a=r(7079),f=r(9430),l=Array.isArray,p=Function.prototype.call,d={configurable:true,enumerable:true,writable:true,value:null},v=Object.defineProperty;t.exports=function(t){var e=arguments[1],r=arguments[2],_,h,g,y,x,b,m,w,S,j;t=Object(c(t));if(a(e))u(e);if(!this||this===Array||!i(this)){if(!e){if(o(t)){x=t.length;if(x!==1)return Array.apply(null,t);y=new Array(1);y[0]=t[0];return y}if(l(t)){y=new Array(x=t.length);for(h=0;h=55296&&b<=56319)j+=t[++h]}j=e?p.call(e,r,j,g):j;if(_){d.value=j;v(y,g,d)}else{y[g]=j}++g}x=g}}if(x===undefined){x=s(t.length);if(_)y=new _(x);for(h=0;h{"use strict";var e=Object.prototype.toString,r=e.call(function(){return arguments}());t.exports=function(t){return e.call(t)===r}},3660:t=>{"use strict";var e=Object.prototype.toString,r=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);t.exports=function(t){return typeof t==="function"&&r(e.call(t))}},49:t=>{"use strict";t.exports=function(){}},4997:(t,e,r)=>{"use strict";t.exports=r(8243)()?Math.sign:r(8371)},8243:t=>{"use strict";t.exports=function(){var t=Math.sign;if(typeof t!=="function")return false;return t(10)===1&&t(-20)===-1}},8371:t=>{"use strict";t.exports=function(t){t=Number(t);if(isNaN(t)||t===0)return t;return t>0?1:-1}},6840:(t,e,r)=>{"use strict";var n=r(4997),o=Math.abs,i=Math.floor;t.exports=function(t){if(isNaN(t))return 0;t=Number(t);if(t===0||!isFinite(t))return t;return n(t)*i(o(t))}},9765:(t,e,r)=>{"use strict";var n=r(6840),o=Math.max;t.exports=function(t){return o(0,n(t))}},2598:(t,e,r)=>{"use strict";var n=r(291),o=r(5029),i=Function.prototype.bind,s=Function.prototype.call,u=Object.keys,c=Object.prototype.propertyIsEnumerable;t.exports=function(t,e){return function(r,a){var f,l=arguments[2],p=arguments[3];r=Object(o(r));n(a);f=u(r);if(p){f.sort(typeof p==="function"?i.call(p,r):undefined)}if(typeof t!=="function")t=f[t];return s.call(t,f,function(t,n){if(!c.call(r,t))return e;return s.call(a,l,r[t],t,r,n)})}}},5432:(t,e,r)=>{"use strict";t.exports=r(6554)()?Object.assign:r(5243)},6554:t=>{"use strict";t.exports=function(){var t=Object.assign,e;if(typeof t!=="function")return false;e={foo:"raz"};t(e,{bar:"dwa"},{trzy:"trzy"});return e.foo+e.bar+e.trzy==="razdwatrzy"}},5243:(t,e,r)=>{"use strict";var n=r(6319),o=r(5029),i=Math.max;t.exports=function(t,e){var r,s,u=i(arguments.length,2),c;t=Object(o(t));c=function(n){try{t[n]=e[n]}catch(t){if(!r)r=t}};for(s=1;s{"use strict";var n=r(2236),o=r(5432),i=r(5029);t.exports=function(t){var e=Object(i(t)),r=arguments[1],s=Object(arguments[2]);if(e!==t&&!r)return e;var u={};if(r){n(r,function(e){if(s.ensure||e in t)u[e]=t[e]})}else{o(u,t)}return u}},1565:(t,e,r)=>{"use strict";t.exports=r(2598)("forEach")},7079:(t,e,r)=>{"use strict";var n=r(49)();t.exports=function(t){return t!==n&&t!==null}},6319:(t,e,r)=>{"use strict";t.exports=r(9175)()?Object.keys:r(5069)},9175:t=>{"use strict";t.exports=function(){try{Object.keys("primitive");return true}catch(t){return false}}},5069:(t,e,r)=>{"use strict";var n=r(7079);var o=Object.keys;t.exports=function(t){return o(n(t)?Object(t):t)}},8367:(t,e,r)=>{"use strict";var n=r(291),o=r(1565),i=Function.prototype.call;t.exports=function(t,e){var r={},s=arguments[2];n(e);o(t,function(t,n,o,u){r[n]=i.call(e,s,t,n,o,u)});return r}},1428:(t,e,r)=>{"use strict";var n=r(7079);var o=Array.prototype.forEach,i=Object.create;var s=function(t,e){var r;for(r in t)e[r]=t[r]};t.exports=function(t){var e=i(null);o.call(arguments,function(t){if(!n(t))return;s(Object(t),e)});return e}},291:t=>{"use strict";t.exports=function(t){if(typeof t!=="function")throw new TypeError(t+" is not a function");return t}},5029:(t,e,r)=>{"use strict";var n=r(7079);t.exports=function(t){if(!n(t))throw new TypeError("Cannot use null or undefined");return t}},4511:(t,e,r)=>{"use strict";t.exports=r(9085)()?String.prototype.contains:r(2967)},9085:t=>{"use strict";var e="razdwatrzy";t.exports=function(){if(typeof e.contains!=="function")return false;return e.contains("dwa")===true&&e.contains("foo")===false}},2967:t=>{"use strict";var e=String.prototype.indexOf;t.exports=function(t){return e.call(this,t,arguments[1])>-1}},9430:t=>{"use strict";var e=Object.prototype.toString,r=e.call("");t.exports=function(t){return typeof t==="string"||t&&typeof t==="object"&&(t instanceof String||e.call(t)===r)||false}},1911:(t,e,r)=>{"use strict";var n=r(4684),o=r(5432),i=r(291),s=r(5029),u=r(7754),c=r(4954),a=r(3870);var f=Object.defineProperty,l=Object.defineProperties,p;t.exports=p=function(t,e){if(!(this instanceof p))throw new TypeError("Constructor requires 'new'");l(this,{__list__:u("w",s(t)),__context__:u("w",e),__nextIndex__:u("w",0)});if(!e)return;i(e.on);e.on("_add",this._onAdd);e.on("_delete",this._onDelete);e.on("_clear",this._onClear)};delete p.prototype.constructor;l(p.prototype,o({_next:u(function(){var t;if(!this.__list__)return undefined;if(this.__redo__){t=this.__redo__.shift();if(t!==undefined)return t}if(this.__nextIndex__=this.__nextIndex__)return;++this.__nextIndex__;if(!this.__redo__){f(this,"__redo__",u("c",[t]));return}this.__redo__.forEach(function(e,r){if(e>=t)this.__redo__[r]=++e},this);this.__redo__.push(t)}),_onDelete:u(function(t){var e;if(t>=this.__nextIndex__)return;--this.__nextIndex__;if(!this.__redo__)return;e=this.__redo__.indexOf(t);if(e!==-1)this.__redo__.splice(e,1);this.__redo__.forEach(function(e,r){if(e>t)this.__redo__[r]=--e},this)}),_onClear:u(function(){if(this.__redo__)n.call(this.__redo__);this.__nextIndex__=0})})));f(p.prototype,a.iterator,u(function(){return this}))},3870:(t,e,r)=>{"use strict";t.exports=r(1100)()?r(4713).Symbol:r(57)},1100:(t,e,r)=>{"use strict";var n=r(4713),o={object:true,symbol:true};t.exports=function(){var t=n.Symbol;var e;if(typeof t!=="function")return false;e=t("test symbol");try{String(e)}catch(t){return false}if(!o[typeof t.iterator])return false;if(!o[typeof t.toPrimitive])return false;if(!o[typeof t.toStringTag])return false;return true}},8370:t=>{"use strict";t.exports=function(t){if(!t)return false;if(typeof t==="symbol")return true;if(!t.constructor)return false;if(t.constructor.name!=="Symbol")return false;return t[t.constructor.toStringTag]==="Symbol"}},1698:(t,e,r)=>{"use strict";var n=r(7754);var o=Object.create,i=Object.defineProperty,s=Object.prototype;var u=o(null);t.exports=function(t){var e=0,r,o;while(u[t+(e||"")])++e;t+=e||"";u[t]=true;r="@@"+t;i(s,r,n.gs(null,function(t){if(o)return;o=true;i(this,r,n(t));o=false}));return r}},7324:(t,e,r)=>{"use strict";var n=r(7754),o=r(4713).Symbol;t.exports=function(t){return Object.defineProperties(t,{hasInstance:n("",o&&o.hasInstance||t("hasInstance")),isConcatSpreadable:n("",o&&o.isConcatSpreadable||t("isConcatSpreadable")),iterator:n("",o&&o.iterator||t("iterator")),match:n("",o&&o.match||t("match")),replace:n("",o&&o.replace||t("replace")),search:n("",o&&o.search||t("search")),species:n("",o&&o.species||t("species")),split:n("",o&&o.split||t("split")),toPrimitive:n("",o&&o.toPrimitive||t("toPrimitive")),toStringTag:n("",o&&o.toStringTag||t("toStringTag")),unscopables:n("",o&&o.unscopables||t("unscopables"))})}},7625:(t,e,r)=>{"use strict";var n=r(7754),o=r(5272);var i=Object.create(null);t.exports=function(t){return Object.defineProperties(t,{for:n(function(e){if(i[e])return i[e];return i[e]=t(String(e))}),keyFor:n(function(t){var e;o(t);for(e in i){if(i[e]===t)return e}return undefined})})}},57:(t,e,r)=>{"use strict";var n=r(7754),o=r(5272),i=r(4713).Symbol,s=r(1698),u=r(7324),c=r(7625);var a=Object.create,f=Object.defineProperties,l=Object.defineProperty;var p,d,v;if(typeof i==="function"){try{String(i());v=true}catch(t){}}else{i=null}d=function Symbol(t){if(this instanceof d)throw new TypeError("Symbol is not a constructor");return p(t)};t.exports=p=function Symbol(t){var e;if(this instanceof Symbol)throw new TypeError("Symbol is not a constructor");if(v)return i(t);e=a(d.prototype);t=t===undefined?"":String(t);return f(e,{__description__:n("",t),__name__:n("",s(t))})};u(p);c(p);f(d.prototype,{constructor:n(p),toString:n("",function(){return this.__name__})});f(p.prototype,{toString:n(function(){return"Symbol ("+o(this).__description__+")"}),valueOf:n(function(){return o(this)})});l(p.prototype,p.toPrimitive,n("",function(){var t=o(this);if(typeof t==="symbol")return t;return t.toString()}));l(p.prototype,p.toStringTag,n("c","Symbol"));l(d.prototype,p.toStringTag,n("c",p.prototype[p.toStringTag]));l(d.prototype,p.toPrimitive,n("c",p.prototype[p.toPrimitive]))},5272:(t,e,r)=>{"use strict";var n=r(8370);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not a symbol");return t}},7669:t=>{var e=function(){if(typeof self==="object"&&self)return self;if(typeof window==="object"&&window)return window;throw new Error("Unable to resolve global `this`")};t.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:true})}catch(t){return e()}try{if(!__global__)return e();return __global__}finally{delete Object.prototype.__global__}}()},4713:(t,e,r)=>{"use strict";t.exports=r(8794)()?globalThis:r(7669)},8794:t=>{"use strict";t.exports=function(){if(typeof globalThis!=="object")return false;if(!globalThis)return false;return globalThis.Array===Array}},171:t=>{"use strict";var e=t.exports=function(t){if(typeof t!=="string"){throw new Error("Invalid input. Input must be a string")}var e=t.match(/(\/?)(.+)\1([a-z]*)/i);if(e[3]&&!/^(?!.*?(.).*?\1)[gmixXsuUAJ]+$/.test(e[3])){return RegExp(t)}return new RegExp(e[2],e[3])}},5037:(t,e,r)=>{"use strict";var n=r(5622),o=r(5747),i=r(3443),s=r(4892),u=r(6241).SourceMapConsumer;var c=r(4909);var a=r(2918);var f=r(1669);var l=r(7921);var p=r(2452).u2;function resolveUrlLoader(t,e){var d=this;if(/^\./.test(d.context)){return handleAsError("webpack misconfiguration","loader.context is relative, expected absolute")}var v=Object.assign({sourceMap:d.sourceMap,engine:"postcss",silent:false,absolute:false,keepQuery:false,removeCR:false,root:false,debug:false,join:f.defaultJoin},!!d.options&&d.options[s(p)],i.getOptions(d));l(v);if("attempts"in v){handleAsWarning("loader misconfiguration",'"attempts" option is defunct (consider "join" option if search is needed)')}if("includeRoot"in v){handleAsWarning("loader misconfiguration",'"includeRoot" option is defunct (consider "join" option if search is needed)')}if("fail"in v){handleAsWarning("loader misconfiguration",'"fail" option is defunct')}if(typeof v.join!=="function"){return handleAsError("loader misconfiguration",'"join" option must be a Function')}else if(v.join.length!==2){return handleAsError("loader misconfiguration",'"join" Function must take exactly 2 arguments (filename and options hash)')}if(typeof v.root==="string"){var _=v.root===""||n.isAbsolute(v.root)&&o.existsSync(v.root)&&o.statSync(v.root).isDirectory();if(!_){return handleAsError("loader misconfiguration",'"root" option must be an empty string or an absolute path to an existing directory')}}else if(v.root!==false){handleAsWarning("loader misconfiguration",'"root" option must be string where used or false where unused')}d.cacheable();var h,g;if(e){if(typeof e==="string"){try{e=JSON.parse(e)}catch(t){return handleAsError("source-map error","cannot parse source-map string (from less-loader?)")}}try{g=c(d,{format:"absolute"},e)}catch(t){return handleAsError("source-map error",t.message)}h=new u(g)}var y=/^\w+$/.test(v.engine)&&r.ab+"engine/"+v.engine+".js";var x=o.existsSync(y);if(!x){return handleAsError("loader misconfiguration",'"engine" option is not valid')}var b=d.async();Promise.resolve(require(y)(d.resourcePath,t,{outputSourceMap:!!v.sourceMap,transformDeclaration:a(d.resourcePath,v),absSourceMap:g,sourceMapConsumer:h,removeCR:v.removeCR})).catch(onFailure).then(onSuccess);function onFailure(t){b(encodeError("CSS error",t))}function onSuccess(t){if(t){if(v.sourceMap){var e=c(d,{format:"sourceRelative"},t.map);b(null,t.content,e)}else{b(null,t.content)}}}function handleAsWarning(e,r){if(!v.silent){d.emitWarning(encodeError(e,r))}return t}function handleAsError(e,r){d.emitError(encodeError(e,r));return t}function encodeError(t,e){return new Error([p,": ",[t].concat(typeof e==="string"&&e||e instanceof Error&&[e.message,e.stack.split("\n")[1].trim()]||[]).filter(Boolean).join("\n ")].join(""))}}t.exports=Object.assign(resolveUrlLoader,f)},1669:(t,e,r)=>{"use strict";var n=r(5622),o=r(5747),i=r(5286),s=r(1911);var u=r(2452).u2;var c=i(n.normalize,n.join);e.defaultJoin=createJoinForPredicate(function predicate(t,e,r,n,i){var s=c(r,e);return o.existsSync(s)?s:i(n===0?s:null)},"defaultJoin");function createJoinForPredicate(t,e){function join(e,r){var o=createDebugLogger(r.debug);return function joinProper(i,u){var c=typeof u==="undefined"&&new s([r.root])||typeof u==="string"&&new s([u])||u;var a=runIterator([]);o(createJoinMsg,[e,i,a,a.isFound]);return typeof a.absolute==="string"?a.absolute:i;function runIterator(r){var o=c.next();var s=!o.done&&o.value;if(typeof s==="string"){var u=t(e,i,s,r.length,next);if(typeof u==="string"&&n.isAbsolute(u)){return Object.assign(r.concat(s),{isFound:true,absolute:u})}else if(Array.isArray(u)){return u}else{throw new Error("predicate must return an absolute path or the result of calling next()")}}else{return r}function next(t){return runIterator(Object.assign(r.concat(s),typeof t==="string"&&{absolute:t}))}}}}function toString(){return"[Function: "+e+"]"}return Object.assign(join,e&&{valueOf:toString,toString:toString})}e.createJoinForPredicate=createJoinForPredicate;function createJoinMsg(t,e,r,o){return[u+": "+pathToString(t)+": "+e].concat(r.map(pathToString).filter(Boolean)).concat(o?"FOUND":"NOT FOUND").join("\n ");function pathToString(t){if(!t){return null}else{var e=n.relative(process.cwd(),t).split(n.sep);return(e[0]===".."?t.split(n.sep):["."].concat(e).filter(Boolean)).join("/")}}}e.createJoinMsg=createJoinMsg;function createDebugLogger(t){var e=!!t&&(typeof t==="function"?t:console.log);var r={};return e?actuallyLog:noop;function noop(){}function actuallyLog(t,n){var o=JSON.stringify(n);if(!r[o]){r[o]=true;e(t.apply(null,n))}}}e.createDebugLogger=createDebugLogger},7921:(t,e,r)=>{"use strict";var n=r(2413);var o=process[process.env.RESOLVE_URL_LOADER_TEST_HARNESS];function logToTestHarness(t){if(!!o&&typeof o==="object"&&o instanceof n.Writable){Object.keys(t).map(eachOptionKey);o=null}function eachOptionKey(e){var r=t[e];var n=typeof r==="undefined"?String(r):JSON.stringify(r.valueOf())||"-unstringifyable-";o.write(e+": "+n+"\n")}}t.exports=logToTestHarness},2918:(t,e,r)=>{"use strict";var n=r(5622),o=r(3443);function valueProcessor(t,e){var r=/(url\s*\()\s*(?:(['"])((?:(?!\2).)*)(\2)|([^'"](?:(?!\)).)*[^'"]))\s*(\))/g;var i=n.dirname(t);var s=e.join(t,e);return function transformValue(t,u){return t.split(r).map(eachSplitOrGroup).join("");function eachSplitOrGroup(t,r,c){var a=t||"";var f=r%7;if(f===3||f===5){var l=c[r-1],p=c[r+1],d=l===p&&(l==="'"||l==='"'),v=d?a.replace(/\\{2}/g,"\\"):a;var _=v.split(/([?#])/g),h=_[0],g=testIsRelative(h)&&s(h,u)||testIsAbsolute(h)&&s(h),y=e.keepQuery?_.slice(1).join(""):"";if(!g){return a}else if(e.absolute){return g.replace(/\\/g,"/")+y}else{return o.urlToRequest(n.relative(i,g).replace(/\\/g,"/")+y)}}else{return a}}};function testIsRelative(t){return!!t&&o.isUrlRequest(t,false)&&!n.isAbsolute(t)&&t.indexOf("~")!==0}function testIsAbsolute(t){return!!t&&typeof e.root==="string"&&o.isUrlRequest(t,e.root)&&(/^\//.test(t)||n.isAbsolute(t))}}t.exports=valueProcessor},2181:(t,e,r)=>{"use strict";var n=r(55);t.exports=function(t){if(typeof t!=="function")return false;if(!hasOwnProperty.call(t,"length"))return false;try{if(typeof t.length!=="number")return false;if(typeof t.call!=="function")return false;if(typeof t.apply!=="function")return false}catch(t){return false}return!n(t)}},8277:(t,e,r)=>{"use strict";var n=r(1321),o=r(758),i=r(6389),s=r(3756);var u=function(t,e){return t.replace("%v",s(e))};t.exports=function(t,e,r){if(!o(r))throw new TypeError(u(e,t));if(!n(t)){if("default"in r)return r["default"];if(r.isOptional)return null}var s=i(r.errorMessage);if(!n(s))s=e;throw new TypeError(u(s,t))}},4340:t=>{"use strict";t.exports=function(t){try{return t.toString()}catch(e){try{return String(t)}catch(t){return null}}}},3756:(t,e,r)=>{"use strict";var n=r(4340);var o=/[\n\r\u2028\u2029]/g;t.exports=function(t){var e=n(t);if(e===null)return"";if(e.length>100)e=e.slice(0,99)+"…";e=e.replace(o,function(t){switch(t){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}});return e}},758:(t,e,r)=>{"use strict";var n=r(1321);var o={object:true,function:true,undefined:true};t.exports=function(t){if(!n(t))return false;return hasOwnProperty.call(o,typeof t)}},405:(t,e,r)=>{"use strict";var n=r(8277),o=r(5287);t.exports=function(t){if(o(t))return t;return n(t,"%v is not a plain function",arguments[1])}},5287:(t,e,r)=>{"use strict";var n=r(2181);var o=/^\s*class[\s{/}]/,i=Function.prototype.toString;t.exports=function(t){if(!n(t))return false;if(o.test(i.call(t)))return false;return true}},55:(t,e,r)=>{"use strict";var n=r(758);t.exports=function(t){if(!n(t))return false;try{if(!t.constructor)return false;return t.constructor.prototype===t}catch(t){return false}}},6389:(t,e,r)=>{"use strict";var n=r(1321),o=r(758);var i=Object.prototype.toString;t.exports=function(t){if(!n(t))return null;if(o(t)){var e=t.toString;if(typeof e!=="function")return null;if(e===i)return null}try{return""+t}catch(t){return null}}},4803:(t,e,r)=>{"use strict";var n=r(8277),o=r(1321);t.exports=function(t){if(o(t))return t;return n(t,"Cannot use %v",arguments[1])}},1321:t=>{"use strict";var e=void 0;t.exports=function(t){return t!==e&&t!==null}},2357:t=>{"use strict";t.exports=require("assert")},5747:t=>{"use strict";t.exports=require("fs")},3443:t=>{"use strict";t.exports=require("next/dist/compiled/loader-utils")},6241:t=>{"use strict";t.exports=require("next/dist/compiled/source-map")},5622:t=>{"use strict";t.exports=require("path")},2413:t=>{"use strict";t.exports=require("stream")}};var e={};function __nccwpck_require__(r){if(e[r]){return e[r].exports}var n=e[r]={exports:{}};var o=true;try{t[r](n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete e[r]}return n.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(5037)})(); \ No newline at end of file diff --git a/packages/next/compiled/resolve-url-loader/package.json b/packages/next/compiled/resolve-url-loader/package.json new file mode 100644 index 0000000000000..bfb22b9e82b87 --- /dev/null +++ b/packages/next/compiled/resolve-url-loader/package.json @@ -0,0 +1 @@ +{"name":"resolve-url-loader","main":"index.js","author":"bholloway","license":"MIT"} diff --git a/packages/next/package.json b/packages/next/package.json index 543c246ef48ae..1c77c36bfd82f 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -95,7 +95,6 @@ "raw-body": "2.4.1", "react-is": "16.13.1", "react-refresh": "0.8.3", - "resolve-url-loader": "3.1.2", "stream-browserify": "3.0.0", "style-loader": "1.2.1", "styled-jsx": "3.3.2", @@ -216,6 +215,7 @@ "postcss-preset-env": "6.7.0", "postcss-scss": "3.0.4", "recast": "0.18.5", + "resolve-url-loader": "3.1.2", "sass-loader": "10.0.5", "schema-utils": "2.7.1", "semver": "7.3.2", diff --git a/packages/next/taskfile.js b/packages/next/taskfile.js index 8540345a4f77a..01db740d57800 100644 --- a/packages/next/taskfile.js +++ b/packages/next/taskfile.js @@ -435,6 +435,16 @@ export async function ncc_recast(task, opts) { .target('compiled/recast') } // eslint-disable-next-line camelcase +externals['resolve-url-loader'] = 'next/dist/compiled/resolve-url-loader' +export async function ncc_resolve_url_loader(task, opts) { + await task + .source( + opts.src || relative(__dirname, require.resolve('resolve-url-loader')) + ) + .ncc({ packageName: 'resolve-url-loader', externals }) + .target('compiled/resolve-url-loader') +} +// eslint-disable-next-line camelcase externals['sass-loader'] = 'next/dist/compiled/sass-loader' export async function ncc_sass_loader(task, opts) { await task @@ -687,6 +697,7 @@ export async function ncc(task) { 'ncc_postcss_preset_env', 'ncc_postcss_scss', 'ncc_recast', + 'ncc_resolve_url_loader', 'ncc_sass_loader', 'ncc_schema_utils', 'ncc_schema_utils3',