From a4a2c0da821e15205a762364a9b7af319e5f1417 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 15 Nov 2021 18:29:47 +0100 Subject: [PATCH 1/2] update webpack --- packages/next/package.json | 4 ++-- yarn.lock | 22 +++++++++++++--------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/packages/next/package.json b/packages/next/package.json index 86e3d17c40b9b95..8f923cf16115456 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -266,9 +266,9 @@ "web-streams-polyfill": "3.0.3", "web-vitals": "2.1.0", "webpack-sources1": "npm:webpack-sources@1.4.3", - "webpack-sources3": "npm:webpack-sources@3.2.1", + "webpack-sources3": "npm:webpack-sources@3.2.2", "webpack4": "npm:webpack@4.44.1", - "webpack5": "npm:webpack@5.64.0", + "webpack5": "npm:webpack@5.64.1", "ws": "8.2.3" }, "resolutions": { diff --git a/yarn.lock b/yarn.lock index 69fe5c815854ea9..8be3cdb08180713 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8644,10 +8644,9 @@ enhanced-resolve@^4.3.0: memory-fs "^0.5.0" tapable "^1.0.0" -enhanced-resolve@^5.8.3: +enhanced-resolve@^5.8.3, enhanced-resolve@webpack/enhanced-resolve#feature/use-cached-stat-for-read: version "5.8.3" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.8.3.tgz#6d552d465cce0423f5b3d718511ea53826a7b2f0" - integrity sha512-EGAbGvH7j7Xt2nc0E7D99La1OiEs8LnyimkRgwExpUMScN6O+3x9tIWs7PLQZVNx4YD+00skHXPXi1yQHpAmZA== + resolved "https://codeload.github.com/webpack/enhanced-resolve/tar.gz/a7c161eeb141bfc7fda375df36c13df006a8cf76" dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" @@ -19686,7 +19685,12 @@ webpack-bundle-analyzer@4.3.0: source-list-map "^2.0.0" source-map "~0.6.1" -"webpack-sources3@npm:webpack-sources@3.2.1", webpack-sources@^3.2.0: +"webpack-sources3@npm:webpack-sources@3.2.2", webpack-sources@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.2.tgz#d88e3741833efec57c4c789b6010db9977545260" + integrity sha512-cp5qdmHnu5T8wRg2G3vZZHoJPN14aqQ89SyQ11NpGH5zEMDCclt49rzo+MaRazk7/UeILhAI+/sEtcM+7Fr0nw== + +webpack-sources@^3.2.0: version "3.2.1" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.1.tgz#251a7d9720d75ada1469ca07dbb62f3641a05b6d" integrity sha512-t6BMVLQ0AkjBOoRTZgqrWm7xbXMBzD+XDq2EZ96+vMfn3qKgsvdXZhbPZ4ElUOpdv4u+iiGe+w3+J75iy/bYGA== @@ -19720,10 +19724,10 @@ webpack-bundle-analyzer@4.3.0: watchpack "^1.7.4" webpack-sources "^1.4.1" -"webpack5@npm:webpack@5.64.0": - version "5.64.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.64.0.tgz#db3e12546f755930ccc9e0e21ba660871940c615" - integrity sha512-UclnN24m054HaPC45nmDEosX6yXWD+UGC12YtUs5i356DleAUGMDC9LBAw37xRRfgPKYIdCYjGA7RZ1AA+ZnGg== +"webpack5@npm:webpack@5.64.1": + version "5.64.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.64.1.tgz#fd59840c16f04fe315f2b2598a85026f12dfa1bb" + integrity sha512-b4FHmRgaaAjP+aVOVz41a9Qa5SmkUPQ+u8FntTQ1roPHahSComB6rXnLwc976VhUY4CqTaLu5mCswuHiNhOfVw== dependencies: "@types/eslint-scope" "^3.7.0" "@types/estree" "^0.0.50" @@ -19748,7 +19752,7 @@ webpack-bundle-analyzer@4.3.0: tapable "^2.1.1" terser-webpack-plugin "^5.1.3" watchpack "^2.2.0" - webpack-sources "^3.2.0" + webpack-sources "^3.2.2" "webpack@link:./node_modules/webpack5": version "0.0.0" From 601c9071c3fbdd53f19a6654ae15276f3b8c12b6 Mon Sep 17 00:00:00 2001 From: sokra Date: Mon, 15 Nov 2021 17:44:00 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=E2=9A=99=20Update=20compiled=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/compiled/webpack-sources3/index.js | 2 +- packages/next/compiled/webpack/bundle5.js | 378 ++++++++++++++++-- 2 files changed, 336 insertions(+), 44 deletions(-) diff --git a/packages/next/compiled/webpack-sources3/index.js b/packages/next/compiled/webpack-sources3/index.js index f0d48ae5dbd9d86..c78edd104d60486 100644 --- a/packages/next/compiled/webpack-sources3/index.js +++ b/packages/next/compiled/webpack-sources3/index.js @@ -1 +1 @@ -module.exports=function(){var s={761:function(s,t,f){"use strict";const h=f(331);const _=f(320);const e=f(514);const u=f(671);const c=s=>{if(typeof s!=="object"||!s)return s;const t=Object.assign({},s);if(s.mappings){t.mappings=Buffer.from(s.mappings,"utf-8")}if(s.sourcesContent){t.sourcesContent=s.sourcesContent.map(s=>s&&Buffer.from(s,"utf-8"))}return t};const o=s=>{if(typeof s!=="object"||!s)return s;const t=Object.assign({},s);if(s.mappings){t.mappings=s.mappings.toString("utf-8")}if(s.sourcesContent){t.sourcesContent=s.sourcesContent.map(s=>s&&s.toString("utf-8"))}return t};class CachedSource extends h{constructor(s,t){super();this._source=s;this._cachedSourceType=t?t.source:undefined;this._cachedSource=undefined;this._cachedBuffer=t?t.buffer:undefined;this._cachedSize=t?t.size:undefined;this._cachedMaps=t?t.maps:new Map;this._cachedHashUpdate=t?t.hash:undefined}getCachedData(){const s=new Map;for(const t of this._cachedMaps){let f=t[1];if(f.bufferedMap===undefined){f.bufferedMap=c(this._getMapFromCacheEntry(f))}s.set(t[0],{map:undefined,bufferedMap:f.bufferedMap})}if(this._cachedSource){this.buffer()}return{buffer:this._cachedBuffer,source:this._cachedSourceType!==undefined?this._cachedSourceType:typeof this._cachedSource==="string"?true:Buffer.isBuffer(this._cachedSource)?false:undefined,size:this._cachedSize,maps:s,hash:this._cachedHashUpdate}}originalLazy(){return this._source}original(){if(typeof this._source==="function")this._source=this._source();return this._source}source(){const s=this._getCachedSource();if(s!==undefined)return s;return this._cachedSource=this.original().source()}_getMapFromCacheEntry(s){if(s.map!==undefined){return s.map}else if(s.bufferedMap!==undefined){return s.map=o(s.bufferedMap)}}_getCachedSource(){if(this._cachedSource!==undefined)return this._cachedSource;if(this._cachedBuffer&&this._cachedSourceType!==undefined){return this._cachedSource=this._cachedSourceType?this._cachedBuffer.toString("utf-8"):this._cachedBuffer}}buffer(){if(this._cachedBuffer!==undefined)return this._cachedBuffer;if(this._cachedSource!==undefined){if(Buffer.isBuffer(this._cachedSource)){return this._cachedBuffer=this._cachedSource}return this._cachedBuffer=Buffer.from(this._cachedSource,"utf-8")}if(typeof this.original().buffer==="function"){return this._cachedBuffer=this.original().buffer()}const s=this.source();if(Buffer.isBuffer(s)){return this._cachedBuffer=s}return this._cachedBuffer=Buffer.from(s,"utf-8")}size(){if(this._cachedSize!==undefined)return this._cachedSize;if(this._cachedBuffer!==undefined){return this._cachedSize=this._cachedBuffer.length}const s=this._getCachedSource();if(s!==undefined){return this._cachedSize=Buffer.byteLength(s)}return this._cachedSize=this.original().size()}sourceAndMap(s){const t=s?JSON.stringify(s):"{}";const f=this._cachedMaps.get(t);if(f!==undefined){const s=this._getMapFromCacheEntry(f);return{source:this.source(),map:s}}let h=this._getCachedSource();let _;if(h!==undefined){_=this.original().map(s)}else{const t=this.original().sourceAndMap(s);h=t.source;_=t.map;this._cachedSource=h}this._cachedMaps.set(t,{map:_,bufferedMap:undefined});return{source:h,map:_}}streamChunks(s,t,f,h){const c=s?JSON.stringify(s):"{}";if(this._cachedMaps.has(c)&&(this._cachedBuffer!==undefined||this._cachedSource!==undefined)){const{source:u,map:c}=this.sourceAndMap(s);if(c){return _(u,c,t,f,h,!!(s&&s.finalSource),true)}else{return e(u,t,f,h,!!(s&&s.finalSource))}}const{result:o,source:p,map:i}=u(this.original(),s,t,f,h);this._cachedSource=p;this._cachedMaps.set(c,{map:i,bufferedMap:undefined});return o}map(s){const t=s?JSON.stringify(s):"{}";const f=this._cachedMaps.get(t);if(f!==undefined){return this._getMapFromCacheEntry(f)}const h=this.original().map(s);this._cachedMaps.set(t,{map:h,bufferedMap:undefined});return h}updateHash(s){if(this._cachedHashUpdate!==undefined){for(const t of this._cachedHashUpdate)s.update(t);return}const t=[];let f=undefined;const h={update:s=>{if(typeof s==="string"&&s.length<10240){if(f===undefined){f=s}else{f+=s;if(f.length>102400){t.push(Buffer.from(f));f=undefined}}}else{if(f!==undefined){t.push(Buffer.from(f));f=undefined}t.push(s)}}};this.original().updateHash(h);if(f!==undefined){t.push(Buffer.from(f))}for(const f of t)s.update(f);this._cachedHashUpdate=t}}s.exports=CachedSource},318:function(s,t,f){"use strict";const h=f(331);class CompatSource extends h{static from(s){return s instanceof h?s:new CompatSource(s)}constructor(s){super();this._sourceLike=s}source(){return this._sourceLike.source()}buffer(){if(typeof this._sourceLike.buffer==="function"){return this._sourceLike.buffer()}return super.buffer()}size(){if(typeof this._sourceLike.size==="function"){return this._sourceLike.size()}return super.size()}map(s){if(typeof this._sourceLike.map==="function"){return this._sourceLike.map(s)}return super.map(s)}sourceAndMap(s){if(typeof this._sourceLike.sourceAndMap==="function"){return this._sourceLike.sourceAndMap(s)}return super.sourceAndMap(s)}updateHash(s){if(typeof this._sourceLike.updateHash==="function"){return this._sourceLike.updateHash(s)}if(typeof this._sourceLike.map==="function"){throw new Error("A Source-like object with a 'map' method must also provide an 'updateHash' method")}s.update(this.buffer())}}s.exports=CompatSource},177:function(s,t,f){"use strict";const h=f(331);const _=f(771);const e=f(737);const{getMap:u,getSourceAndMap:c}=f(45);const o=new WeakSet;class ConcatSource extends h{constructor(){super();this._children=[];for(let s=0;s{const y=f+_;const z=f===1?h+u:h;if(d){if(f!==1||h!==0){t(undefined,_+1,u,-1,-1,-1,-1)}d=false}const r=e<0||e>=B.length?-1:B[e];const j=A<0||A>=S.length?-1:S[A];v=r<0?0:f;if(p){if(s!==undefined)i+=s;if(r>=0){t(undefined,y,z,r,c,o,j)}}else{if(r<0){t(s,y,z,-1,-1,-1,-1)}else{t(s,y,z,r,c,o,j)}}},(s,t,h)=>{let _=c.get(t);if(_===undefined){c.set(t,_=c.size);f(_,t,h)}B[s]=_},(s,t)=>{let f=o.get(t);if(f===undefined){o.set(t,f=o.size);h(f,t)}S[s]=f});if(r!==undefined)i+=r;if(d){if(y!==1||z!==0){t(undefined,_+1,u,-1,-1,-1,-1);d=false}}if(y>1){u=z}else{u+=z}d=d||p&&v===y;_+=y-1}return{generatedLine:_+1,generatedColumn:u,source:p?i:undefined}}updateHash(s){if(!this._isOptimized)this._optimize();s.update("ConcatSource");for(const t of this._children){t.updateHash(s)}}_optimize(){const s=[];let t=undefined;let f=undefined;const h=s=>{if(f===undefined){f=s}else if(Array.isArray(f)){f.push(s)}else{f=[typeof f==="string"?f:f.source(),s]}};const e=s=>{if(f===undefined){f=s}else if(Array.isArray(f)){f.push(s.source())}else{f=[typeof f==="string"?f:f.source(),s.source()]}};const u=()=>{if(Array.isArray(f)){const t=new _(f.join(""));o.add(t);s.push(t)}else if(typeof f==="string"){const t=new _(f);o.add(t);s.push(t)}else{s.push(f)}};for(const _ of this._children){if(typeof _==="string"){if(t===undefined){t=_}else{t+=_}}else{if(t!==undefined){h(t);t=undefined}if(o.has(_)){e(_)}else{if(f!==undefined){u();f=undefined}s.push(_)}}}if(t!==undefined){h(t)}if(f!==undefined){u()}this._children=s;this._isOptimized=true}}s.exports=ConcatSource},591:function(s,t,f){"use strict";const{getMap:h,getSourceAndMap:_}=f(45);const e=f(432);const u=f(450);const c=f(331);const o=/[^\n;{}]+[;{} \r\t]*\n?|[;{} \r\t]+\n?|\n/g;class OriginalSource extends c{constructor(s,t){super();const f=Buffer.isBuffer(s);this._value=f?undefined:s;this._valueAsBuffer=f?s:undefined;this._name=t}getName(){return this._name}source(){if(this._value===undefined){this._value=this._valueAsBuffer.toString("utf-8")}return this._value}buffer(){if(this._valueAsBuffer===undefined){this._valueAsBuffer=Buffer.from(this._value,"utf-8")}return this._valueAsBuffer}map(s){return h(this,s)}sourceAndMap(s){return _(this,s)}streamChunks(s,t,f,h){if(this._value===undefined){this._value=this._valueAsBuffer.toString("utf-8")}f(0,this._name,this._value);const _=!!(s&&s.finalSource);if(!s||s.columns!==false){const s=this._value.match(o);let f=1;let h=0;if(s!==null){for(const e of s){const s=e.endsWith("\n");if(s&&e.length===1){if(!_)t(e,f,h,-1,-1,-1,-1)}else{const s=_?undefined:e;t(s,f,h,0,f,h,-1)}if(s){f++;h=0}else{h+=e.length}}}return{generatedLine:f,generatedColumn:h,source:_?this._value:undefined}}else if(_){const s=u(this._value);const{generatedLine:f,generatedColumn:h}=s;if(h===0){for(let s=1;s{if(h!==0){h+=u}else if(s!==undefined){if(c||e<0){s=_+s}else if(u>0){t(_,f,h,-1,-1,-1,-1);h+=u}}else if(!c){h+=u}t(s,f,h,e,o,p,i)},f,h);return{generatedLine:p,generatedColumn:i===0?0:u+i,source:d!==undefined?_+d.replace(o,"\n"+_):undefined}}updateHash(s){s.update("PrefixSource");this._source.updateHash(s);s.update(this._prefix)}}s.exports=PrefixSource},771:function(s,t,f){"use strict";const h=f(514);const _=f(331);class RawSource extends _{constructor(s,t=false){super();const f=Buffer.isBuffer(s);if(!f&&typeof s!=="string"){throw new TypeError("argument 'value' must be either string of Buffer")}this._valueIsBuffer=!t&&f;this._value=t&&f?undefined:s;this._valueAsBuffer=f?s:undefined;this._valueAsString=f?undefined:s}isBuffer(){return this._valueIsBuffer}source(){if(this._value===undefined){this._value=this._valueAsBuffer.toString("utf-8")}return this._value}buffer(){if(this._valueAsBuffer===undefined){this._valueAsBuffer=Buffer.from(this._value,"utf-8")}return this._valueAsBuffer}map(s){return null}streamChunks(s,t,f,_){if(this._value===undefined){this._value=Buffer.from(this._valueAsBuffer,"utf-8")}if(this._valueAsString===undefined){this._valueAsString=typeof this._value==="string"?this._value:this._value.toString("utf-8")}return h(this._valueAsString,t,f,_,!!(s&&s.finalSource))}updateHash(s){if(this._valueAsBuffer===undefined){this._valueAsBuffer=Buffer.from(this._value,"utf-8")}s.update("RawSource");s.update(this._valueAsBuffer)}}s.exports=RawSource},251:function(s,t,f){"use strict";const{getMap:h,getSourceAndMap:_}=f(45);const e=f(737);const u=f(331);const c=f(432);const o=typeof process==="object"&&process.versions&&typeof process.versions.v8==="string"&&!/^[0-6]\./.test(process.versions.v8);const p=536870912;class Replacement{constructor(s,t,f,h){this.start=s;this.end=t;this.content=f;this.name=h;if(!o){this.index=-1}}}class ReplaceSource extends u{constructor(s,t){super();this._source=s;this._name=t;this._replacements=[];this._isSorted=true}getName(){return this._name}getReplacements(){this._sortReplacements();return this._replacements}replace(s,t,f,h){if(typeof f!=="string")throw new Error("insertion must be a string, but is a "+typeof f);this._replacements.push(new Replacement(s,t,f,h));this._isSorted=false}insert(s,t,f){if(typeof t!=="string")throw new Error("insertion must be a string, but is a "+typeof t+": "+t);this._replacements.push(new Replacement(s,s-1,t,f));this._isSorted=false}source(){if(this._replacements.length===0){return this._source.source()}let s=this._source.source();let t=0;const f=[];this._sortReplacements();for(const h of this._replacements){const _=Math.floor(h.start);const e=Math.floor(h.end+1);if(t<_){const h=_-t;f.push(s.slice(0,h));s=s.slice(h);t=_}f.push(h.content);if(ts.index=t);this._replacements.sort(function(s,t){const f=s.start-t.start;if(f!==0)return f;const h=s.end-t.end;if(h!==0)return h;return s.index-t.index})}this._isSorted=true}streamChunks(s,t,f,h){this._sortReplacements();const _=this._replacements;let u=0;let o=0;let i=-1;let d=o<_.length?Math.floor(_[o].start):p;let A=0;let B=0;let S=0;const v=[];const y=new Map;const z=[];const r=(s,t,f,h)=>{let _=s{let H=0;let b=u+s.length;if(i>u){if(i>=b){const t=f+A;if(s.endsWith("\n")){A--;if(S===t){B+=e}}else if(S===t){B-=s.length}else{B=-s.length;S=t}u=b;return}H=i-u;if(r(c,v,j,s.slice(0,H))){j+=H}u+=H;const t=f+A;if(S===t){B-=H}else{B=-H;S=t}e+=H}if(du){const f=d-u;const h=s.slice(H,H+f);t(h,W,e+(W===S?B:0),c,v,j,M<0||M>=z.length?-1:z[M]);e+=f;H+=f;u=d;if(r(c,v,j,h)){j+=h.length}}const l=/[^\n]+\n?|\n/g;const{content:J,name:U}=_[o];let q=l.exec(J);let $=M;if(c>=0&&U){let s=y.get(U);if(s===undefined){s=y.size;y.set(U,s);h(s,U)}$=s}while(q!==null){const s=q[0];t(s,W,e+(W===S?B:0),c,v,j,$);$=-1;q=l.exec(J);if(q===null&&!s.endsWith("\n")){if(S===W){B+=s.length}else{B=s.length;S=W}}else{A++;W++;B=-e;S=W}}i=Math.max(i,Math.floor(_[o].end+1));o++;d=o<_.length?Math.floor(_[o].start):p;const F=s.length-b+i-H;if(F>0){if(i>=b){let t=f+A;if(s.endsWith("\n")){A--;if(S===t){B+=e}}else if(S===t){B-=s.length-H}else{B=H-s.length;S=t}u=b;return}const t=f+A;if(r(c,v,j,s.slice(H,H+F))){j+=F}H+=F;u+=F;if(S===t){B-=F}else{B=-F;S=t}e+=F}}while(d{while(v.length{let f=y.get(t);if(f===undefined){f=y.size;y.set(t,f);h(f,t)}z[s]=f});let H="";for(;o<_.length;o++){H+=_[o].content}let b=j+A;const W=/[^\n]+\n?|\n/g;let l=W.exec(H);while(l!==null){const s=l[0];t(s,b,M+(b===S?B:0),-1,-1,-1,-1);l=W.exec(H);if(l===null&&!s.endsWith("\n")){if(S===b){B+=s.length}else{B=s.length;S=b}}else{A++;b++;B=-M;S=b}}return{generatedLine:b,generatedColumn:M+(b===S?B:0)}}updateHash(s){this._sortReplacements();s.update("ReplaceSource");this._source.updateHash(s);s.update(this._name||"");for(const t of this._replacements){s.update(`${t.start}${t.end}${t.content}${t.name}`)}}}s.exports=ReplaceSource},746:function(s,t,f){"use strict";const h=f(331);class SizeOnlySource extends h{constructor(s){super();this._size=s}_error(){return new Error("Content and Map of this Source is not available (only size() is supported)")}size(){return this._size}source(){throw this._error()}buffer(){throw this._error()}map(s){throw this._error()}updateHash(){throw this._error()}}s.exports=SizeOnlySource},331:function(s){"use strict";class Source{source(){throw new Error("Abstract")}buffer(){const s=this.source();if(Buffer.isBuffer(s))return s;return Buffer.from(s,"utf-8")}size(){return this.buffer().length}map(s){return null}sourceAndMap(s){return{source:this.source(),map:this.map(s)}}updateHash(s){throw new Error("Abstract")}}s.exports=Source},33:function(s,t,f){"use strict";const h=f(331);const _=f(320);const e=f(10);const{getMap:u,getSourceAndMap:c}=f(45);class SourceMapSource extends h{constructor(s,t,f,h,_,e){super();const u=Buffer.isBuffer(s);this._valueAsString=u?undefined:s;this._valueAsBuffer=u?s:undefined;this._name=t;this._hasSourceMap=!!f;const c=Buffer.isBuffer(f);const o=typeof f==="string";this._sourceMapAsObject=c||o?undefined:f;this._sourceMapAsString=o?f:undefined;this._sourceMapAsBuffer=c?f:undefined;this._hasOriginalSource=!!h;const p=Buffer.isBuffer(h);this._originalSourceAsString=p?undefined:h;this._originalSourceAsBuffer=p?h:undefined;this._hasInnerSourceMap=!!_;const i=Buffer.isBuffer(_);const d=typeof _==="string";this._innerSourceMapAsObject=i||d?undefined:_;this._innerSourceMapAsString=d?_:undefined;this._innerSourceMapAsBuffer=i?_:undefined;this._removeOriginalSource=e}_ensureValueBuffer(){if(this._valueAsBuffer===undefined){this._valueAsBuffer=Buffer.from(this._valueAsString,"utf-8")}}_ensureValueString(){if(this._valueAsString===undefined){this._valueAsString=this._valueAsBuffer.toString("utf-8")}}_ensureOriginalSourceBuffer(){if(this._originalSourceAsBuffer===undefined&&this._hasOriginalSource){this._originalSourceAsBuffer=Buffer.from(this._originalSourceAsString,"utf-8")}}_ensureOriginalSourceString(){if(this._originalSourceAsString===undefined&&this._hasOriginalSource){this._originalSourceAsString=this._originalSourceAsBuffer.toString("utf-8")}}_ensureInnerSourceMapObject(){if(this._innerSourceMapAsObject===undefined&&this._hasInnerSourceMap){this._ensureInnerSourceMapString();this._innerSourceMapAsObject=JSON.parse(this._innerSourceMapAsString)}}_ensureInnerSourceMapBuffer(){if(this._innerSourceMapAsBuffer===undefined&&this._hasInnerSourceMap){this._ensureInnerSourceMapString();this._innerSourceMapAsBuffer=Buffer.from(this._innerSourceMapAsString,"utf-8")}}_ensureInnerSourceMapString(){if(this._innerSourceMapAsString===undefined&&this._hasInnerSourceMap){if(this._innerSourceMapAsBuffer!==undefined){this._innerSourceMapAsString=this._innerSourceMapAsBuffer.toString("utf-8")}else{this._innerSourceMapAsString=JSON.stringify(this._innerSourceMapAsObject)}}}_ensureSourceMapObject(){if(this._sourceMapAsObject===undefined){this._ensureSourceMapString();this._sourceMapAsObject=JSON.parse(this._sourceMapAsString)}}_ensureSourceMapBuffer(){if(this._sourceMapAsBuffer===undefined){this._ensureSourceMapString();this._sourceMapAsBuffer=Buffer.from(this._sourceMapAsString,"utf-8")}}_ensureSourceMapString(){if(this._sourceMapAsString===undefined){if(this._sourceMapAsBuffer!==undefined){this._sourceMapAsString=this._sourceMapAsBuffer.toString("utf-8")}else{this._sourceMapAsString=JSON.stringify(this._sourceMapAsObject)}}}getArgsAsBuffers(){this._ensureValueBuffer();this._ensureSourceMapBuffer();this._ensureOriginalSourceBuffer();this._ensureInnerSourceMapBuffer();return[this._valueAsBuffer,this._name,this._sourceMapAsBuffer,this._originalSourceAsBuffer,this._innerSourceMapAsBuffer,this._removeOriginalSource]}buffer(){this._ensureValueBuffer();return this._valueAsBuffer}source(){this._ensureValueString();return this._valueAsString}map(s){if(!this._hasInnerSourceMap){this._ensureSourceMapObject();return this._sourceMapAsObject}return u(this,s)}sourceAndMap(s){if(!this._hasInnerSourceMap){this._ensureValueString();this._ensureSourceMapObject();return{source:this._valueAsString,map:this._sourceMapAsObject}}return c(this,s)}streamChunks(s,t,f,h){this._ensureValueString();this._ensureSourceMapObject();this._ensureOriginalSourceString();if(this._hasInnerSourceMap){this._ensureInnerSourceMapObject();return e(this._valueAsString,this._sourceMapAsObject,this._name,this._originalSourceAsString,this._innerSourceMapAsObject,this._removeOriginalSource,t,f,h,!!(s&&s.finalSource),!!(s&&s.columns!==false))}else{return _(this._valueAsString,this._sourceMapAsObject,t,f,h,!!(s&&s.finalSource),!!(s&&s.columns!==false))}}updateHash(s){this._ensureValueBuffer();this._ensureSourceMapBuffer();this._ensureOriginalSourceBuffer();this._ensureInnerSourceMapBuffer();s.update("SourceMapSource");s.update(this._valueAsBuffer);s.update(this._sourceMapAsBuffer);if(this._hasOriginalSource){s.update(this._originalSourceAsBuffer)}if(this._hasInnerSourceMap){s.update(this._innerSourceMapAsBuffer)}s.update(this._removeOriginalSource?"true":"false")}}s.exports=SourceMapSource},744:function(s){"use strict";const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");const f=32;const h=s=>{const t=s&&s.columns===false;return t?e():_()};const _=()=>{let s=1;let h=0;let _=0;let e=1;let u=0;let c=0;let o=false;let p=false;let i=true;return(d,A,B,S,v,y)=>{if(o&&s===d){if(B===_&&S===e&&v===u&&!p&&y<0){return""}}else{if(B<0){return""}}let z;if(s{const h=s>>>31&1;const _=s>>31;const e=s+_^_;let u=e<<1|h;for(;;){const s=u&31;u>>=5;if(u===0){z+=t[s];break}else{z+=t[s|f]}}};r(A-h);h=A;if(B>=0){o=true;if(B===_){z+="A"}else{r(B-_);_=B}r(S-e);e=S;if(v===u){z+="A"}else{r(v-u);u=v}if(y>=0){r(y-c);c=y;p=true}else{p=false}}else{o=false}return z}};const e=()=>{let s=0;let h=1;let _=0;let e=1;return(u,c,o,p,i,d)=>{if(o<0){return""}if(s===u){return""}let A;const B=s=>{const h=s>>>31&1;const _=s>>31;const e=s+_^_;let u=e<<1|h;for(;;){const s=u&31;u>>=5;if(u===0){A+=t[s];break}else{A+=t[s|f]}}};s=u;if(u===h+1){h=u;if(o===_){_=o;if(p===e+1){e=p;return";AACA"}else{A=";AA";B(p-e);e=p;return A+"A"}}else{A=";A";B(o-_);_=o;B(p-e);e=p;return A+"A"}}else{A=";".repeat(u-h);h=u;if(o===_){_=o;if(p===e+1){e=p;return A+"AACA"}else{A+="AA";B(p-e);e=p;return A+"A"}}else{A+="A";B(o-_);_=o;B(p-e);e=p;return A+"A"}}}};s.exports=h},45:function(s,t,f){"use strict";const h=f(744);t.getSourceAndMap=((s,t)=>{let f="";let _="";let e=[];let u=[];let c=[];const o=h(t);const{source:p}=s.streamChunks(Object.assign({},t,{finalSource:true}),(s,t,h,e,u,c,p)=>{if(s!==undefined)f+=s;_+=o(t,h,e,u,c,p)},(s,t,f)=>{while(e.length{while(c.length0?{version:3,file:"x",mappings:_,sources:e,sourcesContent:u.length>0?u:undefined,names:c}:null}});t.getMap=((s,t)=>{let f="";let _=[];let e=[];let u=[];const c=h(t);s.streamChunks(Object.assign({},t,{source:false,finalSource:true}),(s,t,h,_,e,u,o)=>{f+=c(t,h,_,e,u,o)},(s,t,f)=>{while(_.length{while(u.length0?{version:3,file:"x",mappings:f,sources:_,sourcesContent:e.length>0?e:undefined,names:u}:null})},450:function(s){"use strict";const t="\n".charCodeAt(0);const f=s=>{if(s===undefined){return{}}const f=s.lastIndexOf("\n");if(f===-1){return{generatedLine:1,generatedColumn:s.length,source:s}}let h=2;for(let _=0;_{if(t<0)return null;const{sourceRoot:f,sources:h}=s;const _=h[t];if(!f)return _;if(f.endsWith("/"))return f+_;return f+"/"+_};s.exports=t},150:function(s){"use strict";const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";const f=32;const h=64;const _=h|1;const e=h|2;const u=31;const c=new Uint8Array("z".charCodeAt(0)+1);{c.fill(e);for(let s=0;s{const e=new Uint32Array([0,0,1,0,0]);let p=0;let i=0;let d=0;let A=1;let B=-1;for(let S=0;So)continue;const y=c[v];if((y&h)!==0){if(e[0]>B){if(p===1){t(A,e[0],-1,-1,-1,-1)}else if(p===4){t(A,e[0],e[1],e[2],e[3],-1)}else if(p===5){t(A,e[0],e[1],e[2],e[3],e[4])}B=e[0]}p=0;if(y===_){A++;e[0]=0;B=-1}}else if((y&f)===0){i|=y<>1):i>>1;e[p++]+=s;d=0;i=0}else{i|=(y&u)<{const t=[];const f=s.length;let h=0;for(;h{let c="";let o="";let p=[];let i=[];let d=[];const A=h(Object.assign({},t,{columns:true}));const B=!!(t&&t.finalSource);const{generatedLine:S,generatedColumn:v,source:y}=_(s,t,(s,t,h,_,e,u,p)=>{if(s!==undefined)c+=s;o+=A(t,h,_,e,u,p);return f(B?undefined:s,t,h,_,e,u,p)},(s,t,f)=>{while(p.length{while(d.length0?{version:3,file:"x",mappings:o,sources:p,sourcesContent:i.length>0?i:undefined,names:d}:null}};s.exports=e},737:function(s,t,f){"use strict";const h=f(514);const _=f(320);s.exports=((s,t,f,e,u)=>{if(typeof s.streamChunks==="function"){return s.streamChunks(t,f,e,u)}else{const c=s.sourceAndMap(t);if(c.map){return _(c.source,c.map,f,e,u,!!(t&&t.finalSource),!!(t&&t.columns!==false))}else{return h(c.source,f,e,u,!!(t&&t.finalSource))}}})},10:function(s,t,f){"use strict";const h=f(320);const _=f(432);const e=(s,t,f,e,u,c,o,p,i,d,A)=>{let B=new Map;let S=new Map;const v=[];const y=[];const z=[];let r=-2;const j=[];const M=[];const H=[];const b=[];const W=[];const l=[];const J=[];const U=(s,t)=>{if(s>J.length)return-1;const{mappingsData:f}=J[s-1];let h=0;let _=f.length/5;while(h<_){let s=h+_>>1;if(f[s*5]<=t){h=s+1}else{_=s}}if(h===0)return-1;return h-1};return h(s,t,(t,h,u,d,A,q,$)=>{if(d===r){const r=U(A,q);if(r!==-1){const{chunks:s,mappingsData:f}=J[A-1];const e=r*5;const c=f[e+1];const d=f[e+2];let v=f[e+3];let U=f[e+4];if(c>=0){const A=s[r];const J=f[e];const F=q-J;if(F>0){let s=c=0){Q=U=0){let s=b[c];if(s===undefined){const t=H[c];s=t?_(t):null;b[c]=s}if(s!==null){const t=z[$];const f=d<=s.length?s[d-1].slice(v,v+t.length):"";if(t===f){Q=$=v.length?-1:v[d];if(F<0){o(t,h,u,-1,-1,-1,-1)}else{let s=-1;if($>=0&&${if(t===f){r=s;if(e!==undefined)_=e;else e=_;v[s]=-2;h(_,u,(s,t,f,h,_,e,u)=>{while(J.length{H[s]=f;b[s]=undefined;j[s]=-2;M[s]=[t,f]},(s,t)=>{W[s]=-2;l[s]=t},false,A)}else{let f=B.get(t);if(f===undefined){B.set(t,f=B.size);p(f,t,_)}v[s]=f}},(s,t)=>{y[s]=-2;z[s]=t},d,A)};s.exports=e},514:function(s,t,f){"use strict";const h=f(450);const _=f(432);const e=(s,t,f,h)=>{let e=1;const u=_(s);let c;for(c of u){t(c,e,0,-1,-1,-1,-1);e++}return u.length===0||c.endsWith("\n")?{generatedLine:u.length+1,generatedColumn:0}:{generatedLine:u.length,generatedColumn:c.length}};s.exports=((s,t,f,_,u)=>{return u?h(s):e(s,t,f,_)})},320:function(s,t,f){"use strict";const h=f(450);const _=f(682);const e=f(150);const u=f(432);const c=(s,t,f,h,c)=>{const o=u(s);if(o.length===0){return{generatedLine:1,generatedColumn:0}}const{sources:p,sourcesContent:i,names:d,mappings:A}=t;for(let s=0;s{if(j&&z<=o.length){let h;const _=z;const e=r;const u=o[z-1];if(s!==z){h=u.slice(r);z++;r=0}else{h=u.slice(r,t);r=t}if(h){f(h,_,e,M,H,b,W)}j=false}if(s>z&&r>0){if(z<=o.length){const s=o[z-1].slice(r);f(s,z,r,-1,-1,-1,-1)}z++;r=0}while(s>z){if(z<=o.length){f(o[z-1],z,0,-1,-1,-1,-1)}z++}if(t>r){if(z<=o.length){const s=o[z-1].slice(r,t);f(s,z,r,-1,-1,-1,-1)}r=t}if(h>=0&&(s{const o=u(s);if(o.length===0){return{generatedLine:1,generatedColumn:0}}const{sources:p,sourcesContent:i,mappings:d}=t;for(let s=0;s{if(h<0||so.length){return}while(s>A){if(A<=o.length){f(o[A-1],A,0,-1,-1,-1,-1)}A++}if(s<=o.length){f(o[s-1],s,0,h,_,e,-1);A++}};e(d,B);for(;A<=o.length;A++){f(o[A-1],A,0,-1,-1,-1,-1)}const S=o[o.length-1];const v=S.endsWith("\n");const y=v?o.length+1:o.length;const z=v?0:S.length;return{generatedLine:y,generatedColumn:z}};const p=(s,t,f,u,c)=>{const o=h(s);const{generatedLine:p,generatedColumn:i}=o;if(p===1&&i===0)return o;const{sources:d,sourcesContent:A,names:B,mappings:S}=t;for(let s=0;s{if(s>=p&&(t>=i||s>p)){return}if(h>=0){f(undefined,s,t,h,_,e,u);v=s}else if(v===s){f(undefined,s,t,-1,-1,-1,-1);v=0}};e(S,y);return o};const i=(s,t,f,u,c)=>{const o=h(s);const{generatedLine:p,generatedColumn:i}=o;if(p===1&&i===0){return{generatedLine:1,generatedColumn:0}}const{sources:d,sourcesContent:A,mappings:B}=t;for(let s=0;s{if(h>=0&&v<=s&&s<=S){f(undefined,s,0,h,_,e,-1);v=s+1}};e(B,y);return o};s.exports=((s,t,f,h,_,e,u)=>{if(u){return e?p(s,t,f,h,_):c(s,t,f,h,_)}else{return e?i(s,t,f,h,_):o(s,t,f,h,_)}})},964:function(s,t,f){const h=(s,f)=>{let h;Object.defineProperty(t,s,{get:()=>{if(f!==undefined){h=f();f=undefined}return h},configurable:true})};h("Source",()=>f(331));h("RawSource",()=>f(771));h("OriginalSource",()=>f(591));h("SourceMapSource",()=>f(33));h("CachedSource",()=>f(761));h("ConcatSource",()=>f(177));h("ReplaceSource",()=>f(251));h("PrefixSource",()=>f(664));h("SizeOnlySource",()=>f(746));h("CompatSource",()=>f(318))}};var t={};function __nccwpck_require__(f){if(t[f]){return t[f].exports}var h=t[f]={exports:{}};var _=true;try{s[f](h,h.exports,__nccwpck_require__);_=false}finally{if(_)delete t[f]}return h.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(964)}(); \ No newline at end of file +module.exports=function(){var s={761:function(s,t,f){"use strict";const h=f(331);const _=f(320);const e=f(514);const u=f(671);const c=s=>{if(typeof s!=="object"||!s)return s;const t=Object.assign({},s);if(s.mappings){t.mappings=Buffer.from(s.mappings,"utf-8")}if(s.sourcesContent){t.sourcesContent=s.sourcesContent.map(s=>s&&Buffer.from(s,"utf-8"))}return t};const o=s=>{if(typeof s!=="object"||!s)return s;const t=Object.assign({},s);if(s.mappings){t.mappings=s.mappings.toString("utf-8")}if(s.sourcesContent){t.sourcesContent=s.sourcesContent.map(s=>s&&s.toString("utf-8"))}return t};class CachedSource extends h{constructor(s,t){super();this._source=s;this._cachedSourceType=t?t.source:undefined;this._cachedSource=undefined;this._cachedBuffer=t?t.buffer:undefined;this._cachedSize=t?t.size:undefined;this._cachedMaps=t?t.maps:new Map;this._cachedHashUpdate=t?t.hash:undefined}getCachedData(){const s=new Map;for(const t of this._cachedMaps){let f=t[1];if(f.bufferedMap===undefined){f.bufferedMap=c(this._getMapFromCacheEntry(f))}s.set(t[0],{map:undefined,bufferedMap:f.bufferedMap})}if(this._cachedSource){this.buffer()}return{buffer:this._cachedBuffer,source:this._cachedSourceType!==undefined?this._cachedSourceType:typeof this._cachedSource==="string"?true:Buffer.isBuffer(this._cachedSource)?false:undefined,size:this._cachedSize,maps:s,hash:this._cachedHashUpdate}}originalLazy(){return this._source}original(){if(typeof this._source==="function")this._source=this._source();return this._source}source(){const s=this._getCachedSource();if(s!==undefined)return s;return this._cachedSource=this.original().source()}_getMapFromCacheEntry(s){if(s.map!==undefined){return s.map}else if(s.bufferedMap!==undefined){return s.map=o(s.bufferedMap)}}_getCachedSource(){if(this._cachedSource!==undefined)return this._cachedSource;if(this._cachedBuffer&&this._cachedSourceType!==undefined){return this._cachedSource=this._cachedSourceType?this._cachedBuffer.toString("utf-8"):this._cachedBuffer}}buffer(){if(this._cachedBuffer!==undefined)return this._cachedBuffer;if(this._cachedSource!==undefined){if(Buffer.isBuffer(this._cachedSource)){return this._cachedBuffer=this._cachedSource}return this._cachedBuffer=Buffer.from(this._cachedSource,"utf-8")}if(typeof this.original().buffer==="function"){return this._cachedBuffer=this.original().buffer()}const s=this.source();if(Buffer.isBuffer(s)){return this._cachedBuffer=s}return this._cachedBuffer=Buffer.from(s,"utf-8")}size(){if(this._cachedSize!==undefined)return this._cachedSize;if(this._cachedBuffer!==undefined){return this._cachedSize=this._cachedBuffer.length}const s=this._getCachedSource();if(s!==undefined){return this._cachedSize=Buffer.byteLength(s)}return this._cachedSize=this.original().size()}sourceAndMap(s){const t=s?JSON.stringify(s):"{}";const f=this._cachedMaps.get(t);if(f!==undefined){const s=this._getMapFromCacheEntry(f);return{source:this.source(),map:s}}let h=this._getCachedSource();let _;if(h!==undefined){_=this.original().map(s)}else{const t=this.original().sourceAndMap(s);h=t.source;_=t.map;this._cachedSource=h}this._cachedMaps.set(t,{map:_,bufferedMap:undefined});return{source:h,map:_}}streamChunks(s,t,f,h){const c=s?JSON.stringify(s):"{}";if(this._cachedMaps.has(c)&&(this._cachedBuffer!==undefined||this._cachedSource!==undefined)){const{source:u,map:c}=this.sourceAndMap(s);if(c){return _(u,c,t,f,h,!!(s&&s.finalSource),true)}else{return e(u,t,f,h,!!(s&&s.finalSource))}}const{result:o,source:p,map:i}=u(this.original(),s,t,f,h);this._cachedSource=p;this._cachedMaps.set(c,{map:i,bufferedMap:undefined});return o}map(s){const t=s?JSON.stringify(s):"{}";const f=this._cachedMaps.get(t);if(f!==undefined){return this._getMapFromCacheEntry(f)}const h=this.original().map(s);this._cachedMaps.set(t,{map:h,bufferedMap:undefined});return h}updateHash(s){if(this._cachedHashUpdate!==undefined){for(const t of this._cachedHashUpdate)s.update(t);return}const t=[];let f=undefined;const h={update:s=>{if(typeof s==="string"&&s.length<10240){if(f===undefined){f=s}else{f+=s;if(f.length>102400){t.push(Buffer.from(f));f=undefined}}}else{if(f!==undefined){t.push(Buffer.from(f));f=undefined}t.push(s)}}};this.original().updateHash(h);if(f!==undefined){t.push(Buffer.from(f))}for(const f of t)s.update(f);this._cachedHashUpdate=t}}s.exports=CachedSource},318:function(s,t,f){"use strict";const h=f(331);class CompatSource extends h{static from(s){return s instanceof h?s:new CompatSource(s)}constructor(s){super();this._sourceLike=s}source(){return this._sourceLike.source()}buffer(){if(typeof this._sourceLike.buffer==="function"){return this._sourceLike.buffer()}return super.buffer()}size(){if(typeof this._sourceLike.size==="function"){return this._sourceLike.size()}return super.size()}map(s){if(typeof this._sourceLike.map==="function"){return this._sourceLike.map(s)}return super.map(s)}sourceAndMap(s){if(typeof this._sourceLike.sourceAndMap==="function"){return this._sourceLike.sourceAndMap(s)}return super.sourceAndMap(s)}updateHash(s){if(typeof this._sourceLike.updateHash==="function"){return this._sourceLike.updateHash(s)}if(typeof this._sourceLike.map==="function"){throw new Error("A Source-like object with a 'map' method must also provide an 'updateHash' method")}s.update(this.buffer())}}s.exports=CompatSource},177:function(s,t,f){"use strict";const h=f(331);const _=f(771);const e=f(737);const{getMap:u,getSourceAndMap:c}=f(45);const o=new WeakSet;class ConcatSource extends h{constructor(){super();this._children=[];for(let s=0;s{const y=f+_;const z=f===1?h+u:h;if(d){if(f!==1||h!==0){t(undefined,_+1,u,-1,-1,-1,-1)}d=false}const r=e<0||e>=B.length?-1:B[e];const j=A<0||A>=S.length?-1:S[A];v=r<0?0:f;if(p){if(s!==undefined)i+=s;if(r>=0){t(undefined,y,z,r,c,o,j)}}else{if(r<0){t(s,y,z,-1,-1,-1,-1)}else{t(s,y,z,r,c,o,j)}}},(s,t,h)=>{let _=c.get(t);if(_===undefined){c.set(t,_=c.size);f(_,t,h)}B[s]=_},(s,t)=>{let f=o.get(t);if(f===undefined){o.set(t,f=o.size);h(f,t)}S[s]=f});if(r!==undefined)i+=r;if(d){if(y!==1||z!==0){t(undefined,_+1,u,-1,-1,-1,-1);d=false}}if(y>1){u=z}else{u+=z}d=d||p&&v===y;_+=y-1}return{generatedLine:_+1,generatedColumn:u,source:p?i:undefined}}updateHash(s){if(!this._isOptimized)this._optimize();s.update("ConcatSource");for(const t of this._children){t.updateHash(s)}}_optimize(){const s=[];let t=undefined;let f=undefined;const h=s=>{if(f===undefined){f=s}else if(Array.isArray(f)){f.push(s)}else{f=[typeof f==="string"?f:f.source(),s]}};const e=s=>{if(f===undefined){f=s}else if(Array.isArray(f)){f.push(s.source())}else{f=[typeof f==="string"?f:f.source(),s.source()]}};const u=()=>{if(Array.isArray(f)){const t=new _(f.join(""));o.add(t);s.push(t)}else if(typeof f==="string"){const t=new _(f);o.add(t);s.push(t)}else{s.push(f)}};for(const _ of this._children){if(typeof _==="string"){if(t===undefined){t=_}else{t+=_}}else{if(t!==undefined){h(t);t=undefined}if(o.has(_)){e(_)}else{if(f!==undefined){u();f=undefined}s.push(_)}}}if(t!==undefined){h(t)}if(f!==undefined){u()}this._children=s;this._isOptimized=true}}s.exports=ConcatSource},591:function(s,t,f){"use strict";const{getMap:h,getSourceAndMap:_}=f(45);const e=f(432);const u=f(450);const c=f(331);const o=f(217);class OriginalSource extends c{constructor(s,t){super();const f=Buffer.isBuffer(s);this._value=f?undefined:s;this._valueAsBuffer=f?s:undefined;this._name=t}getName(){return this._name}source(){if(this._value===undefined){this._value=this._valueAsBuffer.toString("utf-8")}return this._value}buffer(){if(this._valueAsBuffer===undefined){this._valueAsBuffer=Buffer.from(this._value,"utf-8")}return this._valueAsBuffer}map(s){return h(this,s)}sourceAndMap(s){return _(this,s)}streamChunks(s,t,f,h){if(this._value===undefined){this._value=this._valueAsBuffer.toString("utf-8")}f(0,this._name,this._value);const _=!!(s&&s.finalSource);if(!s||s.columns!==false){const s=o(this._value);let f=1;let h=0;if(s!==null){for(const e of s){const s=e.endsWith("\n");if(s&&e.length===1){if(!_)t(e,f,h,-1,-1,-1,-1)}else{const s=_?undefined:e;t(s,f,h,0,f,h,-1)}if(s){f++;h=0}else{h+=e.length}}}return{generatedLine:f,generatedColumn:h,source:_?this._value:undefined}}else if(_){const s=u(this._value);const{generatedLine:f,generatedColumn:h}=s;if(h===0){for(let s=1;s{if(h!==0){h+=u}else if(s!==undefined){if(c||e<0){s=_+s}else if(u>0){t(_,f,h,-1,-1,-1,-1);h+=u}}else if(!c){h+=u}t(s,f,h,e,o,p,i)},f,h);return{generatedLine:p,generatedColumn:i===0?0:u+i,source:d!==undefined?_+d.replace(o,"\n"+_):undefined}}updateHash(s){s.update("PrefixSource");this._source.updateHash(s);s.update(this._prefix)}}s.exports=PrefixSource},771:function(s,t,f){"use strict";const h=f(514);const _=f(331);class RawSource extends _{constructor(s,t=false){super();const f=Buffer.isBuffer(s);if(!f&&typeof s!=="string"){throw new TypeError("argument 'value' must be either string of Buffer")}this._valueIsBuffer=!t&&f;this._value=t&&f?undefined:s;this._valueAsBuffer=f?s:undefined;this._valueAsString=f?undefined:s}isBuffer(){return this._valueIsBuffer}source(){if(this._value===undefined){this._value=this._valueAsBuffer.toString("utf-8")}return this._value}buffer(){if(this._valueAsBuffer===undefined){this._valueAsBuffer=Buffer.from(this._value,"utf-8")}return this._valueAsBuffer}map(s){return null}streamChunks(s,t,f,_){if(this._value===undefined){this._value=Buffer.from(this._valueAsBuffer,"utf-8")}if(this._valueAsString===undefined){this._valueAsString=typeof this._value==="string"?this._value:this._value.toString("utf-8")}return h(this._valueAsString,t,f,_,!!(s&&s.finalSource))}updateHash(s){if(this._valueAsBuffer===undefined){this._valueAsBuffer=Buffer.from(this._value,"utf-8")}s.update("RawSource");s.update(this._valueAsBuffer)}}s.exports=RawSource},251:function(s,t,f){"use strict";const{getMap:h,getSourceAndMap:_}=f(45);const e=f(737);const u=f(331);const c=f(432);const o=typeof process==="object"&&process.versions&&typeof process.versions.v8==="string"&&!/^[0-6]\./.test(process.versions.v8);const p=536870912;class Replacement{constructor(s,t,f,h){this.start=s;this.end=t;this.content=f;this.name=h;if(!o){this.index=-1}}}class ReplaceSource extends u{constructor(s,t){super();this._source=s;this._name=t;this._replacements=[];this._isSorted=true}getName(){return this._name}getReplacements(){this._sortReplacements();return this._replacements}replace(s,t,f,h){if(typeof f!=="string")throw new Error("insertion must be a string, but is a "+typeof f);this._replacements.push(new Replacement(s,t,f,h));this._isSorted=false}insert(s,t,f){if(typeof t!=="string")throw new Error("insertion must be a string, but is a "+typeof t+": "+t);this._replacements.push(new Replacement(s,s-1,t,f));this._isSorted=false}source(){if(this._replacements.length===0){return this._source.source()}let s=this._source.source();let t=0;const f=[];this._sortReplacements();for(const h of this._replacements){const _=Math.floor(h.start);const e=Math.floor(h.end+1);if(t<_){const h=_-t;f.push(s.slice(0,h));s=s.slice(h);t=_}f.push(h.content);if(ts.index=t);this._replacements.sort(function(s,t){const f=s.start-t.start;if(f!==0)return f;const h=s.end-t.end;if(h!==0)return h;return s.index-t.index})}this._isSorted=true}streamChunks(s,t,f,h){this._sortReplacements();const _=this._replacements;let u=0;let o=0;let i=-1;let d=o<_.length?Math.floor(_[o].start):p;let A=0;let B=0;let S=0;const v=[];const y=new Map;const z=[];const r=(s,t,f,h)=>{let _=s{let H=0;let b=u+s.length;if(i>u){if(i>=b){const t=f+A;if(s.endsWith("\n")){A--;if(S===t){B+=e}}else if(S===t){B-=s.length}else{B=-s.length;S=t}u=b;return}H=i-u;if(r(c,v,j,s.slice(0,H))){j+=H}u+=H;const t=f+A;if(S===t){B-=H}else{B=-H;S=t}e+=H}if(du){const f=d-u;const h=s.slice(H,H+f);t(h,l,e+(l===S?B:0),c,v,j,M<0||M>=z.length?-1:z[M]);e+=f;H+=f;u=d;if(r(c,v,j,h)){j+=h.length}}const W=/[^\n]+\n?|\n/g;const{content:J,name:U}=_[o];let q=W.exec(J);let $=M;if(c>=0&&U){let s=y.get(U);if(s===undefined){s=y.size;y.set(U,s);h(s,U)}$=s}while(q!==null){const s=q[0];t(s,l,e+(l===S?B:0),c,v,j,$);$=-1;q=W.exec(J);if(q===null&&!s.endsWith("\n")){if(S===l){B+=s.length}else{B=s.length;S=l}}else{A++;l++;B=-e;S=l}}i=Math.max(i,Math.floor(_[o].end+1));o++;d=o<_.length?Math.floor(_[o].start):p;const F=s.length-b+i-H;if(F>0){if(i>=b){let t=f+A;if(s.endsWith("\n")){A--;if(S===t){B+=e}}else if(S===t){B-=s.length-H}else{B=H-s.length;S=t}u=b;return}const t=f+A;if(r(c,v,j,s.slice(H,H+F))){j+=F}H+=F;u+=F;if(S===t){B-=F}else{B=-F;S=t}e+=F}}while(d{while(v.length{let f=y.get(t);if(f===undefined){f=y.size;y.set(t,f);h(f,t)}z[s]=f});let H="";for(;o<_.length;o++){H+=_[o].content}let b=j+A;const l=/[^\n]+\n?|\n/g;let W=l.exec(H);while(W!==null){const s=W[0];t(s,b,M+(b===S?B:0),-1,-1,-1,-1);W=l.exec(H);if(W===null&&!s.endsWith("\n")){if(S===b){B+=s.length}else{B=s.length;S=b}}else{A++;b++;B=-M;S=b}}return{generatedLine:b,generatedColumn:M+(b===S?B:0)}}updateHash(s){this._sortReplacements();s.update("ReplaceSource");this._source.updateHash(s);s.update(this._name||"");for(const t of this._replacements){s.update(`${t.start}${t.end}${t.content}${t.name}`)}}}s.exports=ReplaceSource},746:function(s,t,f){"use strict";const h=f(331);class SizeOnlySource extends h{constructor(s){super();this._size=s}_error(){return new Error("Content and Map of this Source is not available (only size() is supported)")}size(){return this._size}source(){throw this._error()}buffer(){throw this._error()}map(s){throw this._error()}updateHash(){throw this._error()}}s.exports=SizeOnlySource},331:function(s){"use strict";class Source{source(){throw new Error("Abstract")}buffer(){const s=this.source();if(Buffer.isBuffer(s))return s;return Buffer.from(s,"utf-8")}size(){return this.buffer().length}map(s){return null}sourceAndMap(s){return{source:this.source(),map:this.map(s)}}updateHash(s){throw new Error("Abstract")}}s.exports=Source},33:function(s,t,f){"use strict";const h=f(331);const _=f(320);const e=f(10);const{getMap:u,getSourceAndMap:c}=f(45);class SourceMapSource extends h{constructor(s,t,f,h,_,e){super();const u=Buffer.isBuffer(s);this._valueAsString=u?undefined:s;this._valueAsBuffer=u?s:undefined;this._name=t;this._hasSourceMap=!!f;const c=Buffer.isBuffer(f);const o=typeof f==="string";this._sourceMapAsObject=c||o?undefined:f;this._sourceMapAsString=o?f:undefined;this._sourceMapAsBuffer=c?f:undefined;this._hasOriginalSource=!!h;const p=Buffer.isBuffer(h);this._originalSourceAsString=p?undefined:h;this._originalSourceAsBuffer=p?h:undefined;this._hasInnerSourceMap=!!_;const i=Buffer.isBuffer(_);const d=typeof _==="string";this._innerSourceMapAsObject=i||d?undefined:_;this._innerSourceMapAsString=d?_:undefined;this._innerSourceMapAsBuffer=i?_:undefined;this._removeOriginalSource=e}_ensureValueBuffer(){if(this._valueAsBuffer===undefined){this._valueAsBuffer=Buffer.from(this._valueAsString,"utf-8")}}_ensureValueString(){if(this._valueAsString===undefined){this._valueAsString=this._valueAsBuffer.toString("utf-8")}}_ensureOriginalSourceBuffer(){if(this._originalSourceAsBuffer===undefined&&this._hasOriginalSource){this._originalSourceAsBuffer=Buffer.from(this._originalSourceAsString,"utf-8")}}_ensureOriginalSourceString(){if(this._originalSourceAsString===undefined&&this._hasOriginalSource){this._originalSourceAsString=this._originalSourceAsBuffer.toString("utf-8")}}_ensureInnerSourceMapObject(){if(this._innerSourceMapAsObject===undefined&&this._hasInnerSourceMap){this._ensureInnerSourceMapString();this._innerSourceMapAsObject=JSON.parse(this._innerSourceMapAsString)}}_ensureInnerSourceMapBuffer(){if(this._innerSourceMapAsBuffer===undefined&&this._hasInnerSourceMap){this._ensureInnerSourceMapString();this._innerSourceMapAsBuffer=Buffer.from(this._innerSourceMapAsString,"utf-8")}}_ensureInnerSourceMapString(){if(this._innerSourceMapAsString===undefined&&this._hasInnerSourceMap){if(this._innerSourceMapAsBuffer!==undefined){this._innerSourceMapAsString=this._innerSourceMapAsBuffer.toString("utf-8")}else{this._innerSourceMapAsString=JSON.stringify(this._innerSourceMapAsObject)}}}_ensureSourceMapObject(){if(this._sourceMapAsObject===undefined){this._ensureSourceMapString();this._sourceMapAsObject=JSON.parse(this._sourceMapAsString)}}_ensureSourceMapBuffer(){if(this._sourceMapAsBuffer===undefined){this._ensureSourceMapString();this._sourceMapAsBuffer=Buffer.from(this._sourceMapAsString,"utf-8")}}_ensureSourceMapString(){if(this._sourceMapAsString===undefined){if(this._sourceMapAsBuffer!==undefined){this._sourceMapAsString=this._sourceMapAsBuffer.toString("utf-8")}else{this._sourceMapAsString=JSON.stringify(this._sourceMapAsObject)}}}getArgsAsBuffers(){this._ensureValueBuffer();this._ensureSourceMapBuffer();this._ensureOriginalSourceBuffer();this._ensureInnerSourceMapBuffer();return[this._valueAsBuffer,this._name,this._sourceMapAsBuffer,this._originalSourceAsBuffer,this._innerSourceMapAsBuffer,this._removeOriginalSource]}buffer(){this._ensureValueBuffer();return this._valueAsBuffer}source(){this._ensureValueString();return this._valueAsString}map(s){if(!this._hasInnerSourceMap){this._ensureSourceMapObject();return this._sourceMapAsObject}return u(this,s)}sourceAndMap(s){if(!this._hasInnerSourceMap){this._ensureValueString();this._ensureSourceMapObject();return{source:this._valueAsString,map:this._sourceMapAsObject}}return c(this,s)}streamChunks(s,t,f,h){this._ensureValueString();this._ensureSourceMapObject();this._ensureOriginalSourceString();if(this._hasInnerSourceMap){this._ensureInnerSourceMapObject();return e(this._valueAsString,this._sourceMapAsObject,this._name,this._originalSourceAsString,this._innerSourceMapAsObject,this._removeOriginalSource,t,f,h,!!(s&&s.finalSource),!!(s&&s.columns!==false))}else{return _(this._valueAsString,this._sourceMapAsObject,t,f,h,!!(s&&s.finalSource),!!(s&&s.columns!==false))}}updateHash(s){this._ensureValueBuffer();this._ensureSourceMapBuffer();this._ensureOriginalSourceBuffer();this._ensureInnerSourceMapBuffer();s.update("SourceMapSource");s.update(this._valueAsBuffer);s.update(this._sourceMapAsBuffer);if(this._hasOriginalSource){s.update(this._originalSourceAsBuffer)}if(this._hasInnerSourceMap){s.update(this._innerSourceMapAsBuffer)}s.update(this._removeOriginalSource?"true":"false")}}s.exports=SourceMapSource},744:function(s){"use strict";const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");const f=32;const h=s=>{const t=s&&s.columns===false;return t?e():_()};const _=()=>{let s=1;let h=0;let _=0;let e=1;let u=0;let c=0;let o=false;let p=false;let i=true;return(d,A,B,S,v,y)=>{if(o&&s===d){if(B===_&&S===e&&v===u&&!p&&y<0){return""}}else{if(B<0){return""}}let z;if(s{const h=s>>>31&1;const _=s>>31;const e=s+_^_;let u=e<<1|h;for(;;){const s=u&31;u>>=5;if(u===0){z+=t[s];break}else{z+=t[s|f]}}};r(A-h);h=A;if(B>=0){o=true;if(B===_){z+="A"}else{r(B-_);_=B}r(S-e);e=S;if(v===u){z+="A"}else{r(v-u);u=v}if(y>=0){r(y-c);c=y;p=true}else{p=false}}else{o=false}return z}};const e=()=>{let s=0;let h=1;let _=0;let e=1;return(u,c,o,p,i,d)=>{if(o<0){return""}if(s===u){return""}let A;const B=s=>{const h=s>>>31&1;const _=s>>31;const e=s+_^_;let u=e<<1|h;for(;;){const s=u&31;u>>=5;if(u===0){A+=t[s];break}else{A+=t[s|f]}}};s=u;if(u===h+1){h=u;if(o===_){_=o;if(p===e+1){e=p;return";AACA"}else{A=";AA";B(p-e);e=p;return A+"A"}}else{A=";A";B(o-_);_=o;B(p-e);e=p;return A+"A"}}else{A=";".repeat(u-h);h=u;if(o===_){_=o;if(p===e+1){e=p;return A+"AACA"}else{A+="AA";B(p-e);e=p;return A+"A"}}else{A+="A";B(o-_);_=o;B(p-e);e=p;return A+"A"}}}};s.exports=h},45:function(s,t,f){"use strict";const h=f(744);t.getSourceAndMap=((s,t)=>{let f="";let _="";let e=[];let u=[];let c=[];const o=h(t);const{source:p}=s.streamChunks(Object.assign({},t,{finalSource:true}),(s,t,h,e,u,c,p)=>{if(s!==undefined)f+=s;_+=o(t,h,e,u,c,p)},(s,t,f)=>{while(e.length{while(c.length0?{version:3,file:"x",mappings:_,sources:e,sourcesContent:u.length>0?u:undefined,names:c}:null}});t.getMap=((s,t)=>{let f="";let _=[];let e=[];let u=[];const c=h(t);s.streamChunks(Object.assign({},t,{source:false,finalSource:true}),(s,t,h,_,e,u,o)=>{f+=c(t,h,_,e,u,o)},(s,t,f)=>{while(_.length{while(u.length0?{version:3,file:"x",mappings:f,sources:_,sourcesContent:e.length>0?e:undefined,names:u}:null})},450:function(s){"use strict";const t="\n".charCodeAt(0);const f=s=>{if(s===undefined){return{}}const f=s.lastIndexOf("\n");if(f===-1){return{generatedLine:1,generatedColumn:s.length,source:s}}let h=2;for(let _=0;_{if(t<0)return null;const{sourceRoot:f,sources:h}=s;const _=h[t];if(!f)return _;if(f.endsWith("/"))return f+_;return f+"/"+_};s.exports=t},150:function(s){"use strict";const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";const f=32;const h=64;const _=h|1;const e=h|2;const u=31;const c=new Uint8Array("z".charCodeAt(0)+1);{c.fill(e);for(let s=0;s{const e=new Uint32Array([0,0,1,0,0]);let p=0;let i=0;let d=0;let A=1;let B=-1;for(let S=0;So)continue;const y=c[v];if((y&h)!==0){if(e[0]>B){if(p===1){t(A,e[0],-1,-1,-1,-1)}else if(p===4){t(A,e[0],e[1],e[2],e[3],-1)}else if(p===5){t(A,e[0],e[1],e[2],e[3],e[4])}B=e[0]}p=0;if(y===_){A++;e[0]=0;B=-1}}else if((y&f)===0){i|=y<>1):i>>1;e[p++]+=s;d=0;i=0}else{i|=(y&u)<{const t=[];const f=s.length;let h=0;for(;h{const t=s.length;if(t===0)return null;const f=[];let h=0;for(;h=t)break s;f=s.charCodeAt(h)}while(f===59||f===32||f===123||f===125||f===13||f===9){if(++h>=t)break s;f=s.charCodeAt(h)}if(f===10){h++}}f.push(s.slice(_,h))}return f};s.exports=t},671:function(s,t,f){"use strict";const h=f(744);const _=f(737);const e=(s,t,f,e,u)=>{let c="";let o="";let p=[];let i=[];let d=[];const A=h(Object.assign({},t,{columns:true}));const B=!!(t&&t.finalSource);const{generatedLine:S,generatedColumn:v,source:y}=_(s,t,(s,t,h,_,e,u,p)=>{if(s!==undefined)c+=s;o+=A(t,h,_,e,u,p);return f(B?undefined:s,t,h,_,e,u,p)},(s,t,f)=>{while(p.length{while(d.length0?{version:3,file:"x",mappings:o,sources:p,sourcesContent:i.length>0?i:undefined,names:d}:null}};s.exports=e},737:function(s,t,f){"use strict";const h=f(514);const _=f(320);s.exports=((s,t,f,e,u)=>{if(typeof s.streamChunks==="function"){return s.streamChunks(t,f,e,u)}else{const c=s.sourceAndMap(t);if(c.map){return _(c.source,c.map,f,e,u,!!(t&&t.finalSource),!!(t&&t.columns!==false))}else{return h(c.source,f,e,u,!!(t&&t.finalSource))}}})},10:function(s,t,f){"use strict";const h=f(320);const _=f(432);const e=(s,t,f,e,u,c,o,p,i,d,A)=>{let B=new Map;let S=new Map;const v=[];const y=[];const z=[];let r=-2;const j=[];const M=[];const H=[];const b=[];const l=[];const W=[];const J=[];const U=(s,t)=>{if(s>J.length)return-1;const{mappingsData:f}=J[s-1];let h=0;let _=f.length/5;while(h<_){let s=h+_>>1;if(f[s*5]<=t){h=s+1}else{_=s}}if(h===0)return-1;return h-1};return h(s,t,(t,h,u,d,A,q,$)=>{if(d===r){const r=U(A,q);if(r!==-1){const{chunks:s,mappingsData:f}=J[A-1];const e=r*5;const c=f[e+1];const d=f[e+2];let v=f[e+3];let U=f[e+4];if(c>=0){const A=s[r];const J=f[e];const F=q-J;if(F>0){let s=c=0){Q=U=0){let s=b[c];if(s===undefined){const t=H[c];s=t?_(t):null;b[c]=s}if(s!==null){const t=z[$];const f=d<=s.length?s[d-1].slice(v,v+t.length):"";if(t===f){Q=$=v.length?-1:v[d];if(F<0){o(t,h,u,-1,-1,-1,-1)}else{let s=-1;if($>=0&&${if(t===f){r=s;if(e!==undefined)_=e;else e=_;v[s]=-2;h(_,u,(s,t,f,h,_,e,u)=>{while(J.length{H[s]=f;b[s]=undefined;j[s]=-2;M[s]=[t,f]},(s,t)=>{l[s]=-2;W[s]=t},false,A)}else{let f=B.get(t);if(f===undefined){B.set(t,f=B.size);p(f,t,_)}v[s]=f}},(s,t)=>{y[s]=-2;z[s]=t},d,A)};s.exports=e},514:function(s,t,f){"use strict";const h=f(450);const _=f(432);const e=(s,t,f,h)=>{let e=1;const u=_(s);let c;for(c of u){t(c,e,0,-1,-1,-1,-1);e++}return u.length===0||c.endsWith("\n")?{generatedLine:u.length+1,generatedColumn:0}:{generatedLine:u.length,generatedColumn:c.length}};s.exports=((s,t,f,_,u)=>{return u?h(s):e(s,t,f,_)})},320:function(s,t,f){"use strict";const h=f(450);const _=f(682);const e=f(150);const u=f(432);const c=(s,t,f,h,c)=>{const o=u(s);if(o.length===0){return{generatedLine:1,generatedColumn:0}}const{sources:p,sourcesContent:i,names:d,mappings:A}=t;for(let s=0;s{if(j&&z<=o.length){let h;const _=z;const e=r;const u=o[z-1];if(s!==z){h=u.slice(r);z++;r=0}else{h=u.slice(r,t);r=t}if(h){f(h,_,e,M,H,b,l)}j=false}if(s>z&&r>0){if(z<=o.length){const s=o[z-1].slice(r);f(s,z,r,-1,-1,-1,-1)}z++;r=0}while(s>z){if(z<=o.length){f(o[z-1],z,0,-1,-1,-1,-1)}z++}if(t>r){if(z<=o.length){const s=o[z-1].slice(r,t);f(s,z,r,-1,-1,-1,-1)}r=t}if(h>=0&&(s{const o=u(s);if(o.length===0){return{generatedLine:1,generatedColumn:0}}const{sources:p,sourcesContent:i,mappings:d}=t;for(let s=0;s{if(h<0||so.length){return}while(s>A){if(A<=o.length){f(o[A-1],A,0,-1,-1,-1,-1)}A++}if(s<=o.length){f(o[s-1],s,0,h,_,e,-1);A++}};e(d,B);for(;A<=o.length;A++){f(o[A-1],A,0,-1,-1,-1,-1)}const S=o[o.length-1];const v=S.endsWith("\n");const y=v?o.length+1:o.length;const z=v?0:S.length;return{generatedLine:y,generatedColumn:z}};const p=(s,t,f,u,c)=>{const o=h(s);const{generatedLine:p,generatedColumn:i}=o;if(p===1&&i===0)return o;const{sources:d,sourcesContent:A,names:B,mappings:S}=t;for(let s=0;s{if(s>=p&&(t>=i||s>p)){return}if(h>=0){f(undefined,s,t,h,_,e,u);v=s}else if(v===s){f(undefined,s,t,-1,-1,-1,-1);v=0}};e(S,y);return o};const i=(s,t,f,u,c)=>{const o=h(s);const{generatedLine:p,generatedColumn:i}=o;if(p===1&&i===0){return{generatedLine:1,generatedColumn:0}}const{sources:d,sourcesContent:A,mappings:B}=t;for(let s=0;s{if(h>=0&&v<=s&&s<=S){f(undefined,s,0,h,_,e,-1);v=s+1}};e(B,y);return o};s.exports=((s,t,f,h,_,e,u)=>{if(u){return e?p(s,t,f,h,_):c(s,t,f,h,_)}else{return e?i(s,t,f,h,_):o(s,t,f,h,_)}})},964:function(s,t,f){const h=(s,f)=>{let h;Object.defineProperty(t,s,{get:()=>{if(f!==undefined){h=f();f=undefined}return h},configurable:true})};h("Source",()=>f(331));h("RawSource",()=>f(771));h("OriginalSource",()=>f(591));h("SourceMapSource",()=>f(33));h("CachedSource",()=>f(761));h("ConcatSource",()=>f(177));h("ReplaceSource",()=>f(251));h("PrefixSource",()=>f(664));h("SizeOnlySource",()=>f(746));h("CompatSource",()=>f(318))}};var t={};function __nccwpck_require__(f){if(t[f]){return t[f].exports}var h=t[f]={exports:{}};var _=true;try{s[f](h,h.exports,__nccwpck_require__);_=false}finally{if(_)delete t[f]}return h.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(964)}(); \ No newline at end of file diff --git a/packages/next/compiled/webpack/bundle5.js b/packages/next/compiled/webpack/bundle5.js index e921c86d401ad13..070edcbd7a9074e 100644 --- a/packages/next/compiled/webpack/bundle5.js +++ b/packages/next/compiled/webpack/bundle5.js @@ -38,7 +38,7 @@ module.exports = JSON.parse("{\"application/1d-interleaved-parityfec\":{\"source /***/ (function(module) { "use strict"; -module.exports = {"i8":"5.64.0"}; +module.exports = {"i8":"5.64.1"}; /***/ }), @@ -27234,6 +27234,7 @@ const processAsyncTree = __webpack_require__(76815); /** @typedef {import("./Compiler")} Compiler */ /** @typedef {import("./logging/Logger").Logger} Logger */ /** @typedef {import("./util/fs").OutputFileSystem} OutputFileSystem */ +/** @typedef {import("./util/fs").StatsCallback} StatsCallback */ /** @typedef {(function(string):boolean)|RegExp} IgnoreItem */ /** @typedef {function(IgnoreItem): void} AddToIgnoreCallback */ @@ -27320,6 +27321,20 @@ const getDiffToOldAssets = (currentAssets, oldAssets) => { return diff; }; +/** + * @param {OutputFileSystem} fs filesystem + * @param {string} filename path to file + * @param {StatsCallback} callback callback for provided filename + * @returns {void} + */ +const doStat = (fs, filename, callback) => { + if ("lstat" in fs) { + fs.lstat(filename, callback); + } else { + fs.stat(filename, callback); + } +}; + /** * @param {OutputFileSystem} fs filesystem * @param {string} outputPath output path @@ -27368,7 +27383,7 @@ const applyDiff = (fs, outputPath, dry, logger, diff, isKept, callback) => { log(`${filename} will be kept`); return process.nextTick(callback); } - fs.stat(path, (err, stats) => { + doStat(fs, path, (err, stats) => { if (err) return handleError(err); if (!stats.isDirectory()) { push({ @@ -44492,8 +44507,7 @@ class FileSystemInfo { } return capturedItems; }; - if (files) { - const capturedFiles = captureNonManaged(files, managedFiles); + const processCapturedFiles = capturedFiles => { switch (mode) { case 3: this._fileTshsOptimization.optimize(snapshot, capturedFiles); @@ -44570,12 +44584,11 @@ class FileSystemInfo { } break; } + }; + if (files) { + processCapturedFiles(captureNonManaged(files, managedFiles)); } - if (directories) { - const capturedDirectories = captureNonManaged( - directories, - managedContexts - ); + const processCapturedDirectories = capturedDirectories => { switch (mode) { case 3: this._contextTshsOptimization.optimize(snapshot, capturedDirectories); @@ -44695,9 +44708,13 @@ class FileSystemInfo { } break; } + }; + if (directories) { + processCapturedDirectories( + captureNonManaged(directories, managedContexts) + ); } - if (missing) { - const capturedMissing = captureNonManaged(missing, managedMissing); + const processCapturedMissing = capturedMissing => { this._missingExistenceOptimization.optimize(snapshot, capturedMissing); for (const path of capturedMissing) { const cache = this._fileTimestamps.get(path); @@ -44722,11 +44739,15 @@ class FileSystemInfo { }); } } + }; + if (missing) { + processCapturedMissing(captureNonManaged(missing, managedMissing)); } this._managedItemInfoOptimization.optimize(snapshot, managedItems); for (const path of managedItems) { const cache = this._managedItems.get(path); if (cache !== undefined) { + managedFiles.add(join(this.fs, path, "package.json")); managedItemInfo.set(path, cache); } else { jobs++; @@ -44738,9 +44759,24 @@ class FileSystemInfo { ); } jobError(); - } else { + } else if (entry) { + managedFiles.add(join(this.fs, path, "package.json")); managedItemInfo.set(path, entry); jobDone(); + } else { + // Fallback to normal snapshotting + const process = (set, fn) => { + if (set.size === 0) return; + const captured = new Set(); + for (const file of set) { + if (file.startsWith(path)) captured.add(file); + } + if (captured.size > 0) fn(captured); + }; + process(managedFiles, processCapturedFiles); + process(managedContexts, processCapturedDirectories); + process(managedMissing, processCapturedMissing); + jobDone(); } }); } @@ -45953,9 +45989,10 @@ class FileSystemInfo { this._managedItems.set(path, "nested"); return callback(null, "nested"); } - const problem = `Managed item ${path} isn't a directory or doesn't contain a package.json`; - this.logger.warn(problem); - return callback(new Error(problem)); + this.logger.warn( + `Managed item ${path} isn't a directory or doesn't contain a package.json (see snapshot.managedPaths option)` + ); + return callback(); }); return; } @@ -45967,6 +46004,12 @@ class FileSystemInfo { } catch (e) { return callback(e); } + if (!data.name) { + this.logger.warn( + `${packageJsonPath} doesn't contain a "name" property (see snapshot.managedPaths option)` + ); + return callback(); + } const info = `${data.name || ""}@${data.version || ""}`; this._managedItems.set(path, info); callback(null, info); @@ -69315,7 +69358,7 @@ const applySnapshotDefaults = (snapshot, { production, futureDefaults }) => { return [path.resolve(match[1], "unplugged")]; } } else { - const match = /^(.+?[\\/]node_modules)[\\/]/.exec( + const match = /^(.+?[\\/]node_modules[\\/])/.exec( // eslint-disable-next-line node/no-extraneous-require /*require.resolve*/(98342) ); @@ -76144,7 +76187,7 @@ class CommonJsImportsParserPlugin { dep.asiSafe = !parser.isAsiPosition(expr.range[0]); dep.optional = !!parser.scope.inTry; dep.loc = expr.loc; - parser.state.module.addDependency(dep); + parser.state.current.addDependency(dep); return true; } }; @@ -76161,7 +76204,7 @@ class CommonJsImportsParserPlugin { dep.asiSafe = !parser.isAsiPosition(expr.range[0]); dep.optional = !!parser.scope.inTry; dep.loc = expr.callee.loc; - parser.state.module.addDependency(dep); + parser.state.current.addDependency(dep); parser.walkExpressions(expr.arguments); return true; } @@ -85753,7 +85796,7 @@ class URLPlugin { relative ); dep.loc = expr.loc; - parser.state.module.addDependency(dep); + parser.state.current.addDependency(dep); InnerGraph.onUsage(parser.state, e => (dep.usedByExports = e)); return true; }); @@ -127350,6 +127393,7 @@ const path = __webpack_require__(85622); * @property {function(string, Callback): void=} rmdir * @property {function(string, Callback): void=} unlink * @property {function(string, StatsCallback): void} stat + * @property {function(string, StatsCallback): void=} lstat * @property {function(string, BufferOrStringCallback): void} readFile * @property {(function(string, string): string)=} join * @property {(function(string, string): string)=} relative @@ -127677,8 +127721,8 @@ const create = __webpack_require__(21941); //#region wasm code: md4 (../../../assembly/hash/md4.asm.ts) --initialMemory 1 const md4 = new WebAssembly.Module( Buffer.from( - // 2150 bytes - "AGFzbQEAAAABCAJgAX8AYAAAAwUEAQAAAAUDAQABBhoFfwFBAAt/AUEAC38BQQALfwFBAAt/AUEACwciBARpbml0AAAGdXBkYXRlAAIFZmluYWwAAwZtZW1vcnkCAAqFEAQmAEGBxpS6BiQBQYnXtv5+JAJB/rnrxXkkA0H2qMmBASQEQQAkAAvMCgEYfyMBIQojAiEGIwMhByMEIQgDQCAAIAVLBEAgBSgCCCINIAcgBiAFKAIEIgsgCCAHIAUoAgAiDCAKIAggBiAHIAhzcXNqakEDdyIDIAYgB3Nxc2pqQQd3IgEgAyAGc3FzampBC3chAiAFKAIUIg8gASACIAUoAhAiCSADIAEgBSgCDCIOIAYgAyACIAEgA3Nxc2pqQRN3IgQgASACc3FzampBA3ciAyACIARzcXNqakEHdyEBIAUoAiAiEiADIAEgBSgCHCIRIAQgAyAFKAIYIhAgAiAEIAEgAyAEc3FzampBC3ciAiABIANzcXNqakETdyIEIAEgAnNxc2pqQQN3IQMgBSgCLCIVIAQgAyAFKAIoIhQgAiAEIAUoAiQiEyABIAIgAyACIARzcXNqakEHdyIBIAMgBHNxc2pqQQt3IgIgASADc3FzampBE3chBCAPIBAgCSAVIBQgEyAFKAI4IhYgAiAEIAUoAjQiFyABIAIgBSgCMCIYIAMgASAEIAEgAnNxc2pqQQN3IgEgAiAEc3FzampBB3ciAiABIARzcXNqakELdyIDIAkgAiAMIAEgBSgCPCIJIAQgASADIAEgAnNxc2pqQRN3IgEgAiADcnEgAiADcXJqakGZ84nUBWpBA3ciAiABIANycSABIANxcmpqQZnzidQFakEFdyIEIAEgAnJxIAEgAnFyaiASakGZ84nUBWpBCXciAyAPIAQgCyACIBggASADIAIgBHJxIAIgBHFyampBmfOJ1AVqQQ13IgEgAyAEcnEgAyAEcXJqakGZ84nUBWpBA3ciAiABIANycSABIANxcmpqQZnzidQFakEFdyIEIAEgAnJxIAEgAnFyampBmfOJ1AVqQQl3IgMgECAEIAIgFyABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmogDWpBmfOJ1AVqQQN3IgIgASADcnEgASADcXJqakGZ84nUBWpBBXciBCABIAJycSABIAJxcmpqQZnzidQFakEJdyIDIBEgBCAOIAIgFiABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmpqQZnzidQFakEDdyICIAEgA3JxIAEgA3FyampBmfOJ1AVqQQV3IgQgASACcnEgASACcXJqakGZ84nUBWpBCXciAyAMIAIgAyAJIAEgAyACIARycSACIARxcmpqQZnzidQFakENdyIBcyAEc2pqQaHX5/YGakEDdyICIAQgASACcyADc2ogEmpBodfn9gZqQQl3IgRzIAFzampBodfn9gZqQQt3IgMgAiADIBggASADIARzIAJzampBodfn9gZqQQ93IgFzIARzaiANakGh1+f2BmpBA3ciAiAUIAQgASACcyADc2pqQaHX5/YGakEJdyIEcyABc2pqQaHX5/YGakELdyIDIAsgAiADIBYgASADIARzIAJzampBodfn9gZqQQ93IgFzIARzampBodfn9gZqQQN3IgIgEyAEIAEgAnMgA3NqakGh1+f2BmpBCXciBHMgAXNqakGh1+f2BmpBC3chAyAKIA4gAiADIBcgASADIARzIAJzampBodfn9gZqQQ93IgFzIARzampBodfn9gZ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pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEIIwKtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEQIwOtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEYIwStIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAAs=", "base64" ) ); @@ -127877,7 +127921,7 @@ const create = __webpack_require__(21941); const xxhash64 = new WebAssembly.Module( Buffer.from( // 1173 bytes - "AGFzbQEAAAABCAJgAX8AYAAAAwQDAQAABQMBAAEGGgV+AUIAC34BQgALfgFCAAt+AUIAC34BQgALByIEBGluaXQAAAZ1cGRhdGUAAQVmaW5hbAACBm1lbW9yeQIACrUIAzAAQtbrgu7q/Yn14AAkAELP1tO+0ser2UIkAUIAJAJC+erQ0OfJoeThACQDQgAkBAvUAQIBfwR+IABFBEAPCyMEIACtfCQEIwAhAiMBIQMjAiEEIwMhBQNAIAIgASkDAELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiECIAMgASkDCELP1tO+0ser2UJ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QQRqIABNBEACfyACIAE1AgBCh5Wvr5i23puef36FQheJQs/W077Sx6vZQn5C+fPd8Zn2masWfCECIAFBBGoLIQELA0AgACABRwRAIAIgATEAAELFz9my8eW66id+hUILiUKHla+vmLbem55/fiECIAFBAWohAQwBCwtBACACIAJCIYiFQs/W077Sx6vZQn4iAkIdiCAChUL5893xmfaZqxZ+IgJCIIggAoUiAkIgiCIDQv//A4NCIIYgA0KAgPz/D4NCEIiEIgNC/4GAgPAfg0IQhiADQoD+g4CA4D+DQgiIhCIDQo+AvIDwgcAHg0IIhiADQvCBwIeAnoD4AINCBIiEIgNChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IANCsODAgYOGjJgwhHw3AwBBCCACQv////8PgyICQv//A4NCIIYgAkKAgPz/D4NCEIiEIgJC/4GAgPAfg0IQhiACQoD+g4CA4D+DQgiIhCICQo+AvIDwgcAHg0IIhiACQvCBwIeAnoD4AINCBIiEIgJChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IAJCsODAgYOGjJgwhHw3AwAL", "base64" ) ); @@ -134946,44 +134990,56 @@ class OperationMergerBackend { * @param {any} providerContext call context for the provider methods */ constructor(provider, syncProvider, providerContext) { - this._provider = provider; - this._syncProvider = syncProvider; - this._providerContext = providerContext; - this._activeAsyncOperations = new Map(); + const activeAsyncOperations = new Map(); - this.provide = this._provider + this.provide = provider ? (path, options, callback) => { if (typeof options === "function") { callback = options; options = undefined; } if (options) { - return this._provider.call( - this._providerContext, - path, - options, - callback - ); + return provider.call(providerContext, path, options, callback); } if (typeof path !== "string") { callback(new TypeError("path must be a string")); return; } - let callbacks = this._activeAsyncOperations.get(path); + let callbacks = activeAsyncOperations.get(path); if (callbacks) { callbacks.push(callback); return; } - this._activeAsyncOperations.set(path, (callbacks = [callback])); - provider(path, (err, result) => { - this._activeAsyncOperations.delete(path); + activeAsyncOperations.set(path, (callbacks = [callback])); + provider.call(providerContext, path, (err, result) => { + activeAsyncOperations.delete(path); runCallbacks(callbacks, err, result); }); } : null; - this.provideSync = this._syncProvider + this.provideSync = syncProvider ? (path, options) => { - return this._syncProvider.call(this._providerContext, path, options); + return syncProvider.call(providerContext, path, options); + } + : null; + + this.provideCustom = provider + ? (provider, providerContext, path, callback) => { + let callbacks = activeAsyncOperations.get(path); + if (callbacks) { + callbacks.push(callback); + return; + } + activeAsyncOperations.set(path, (callbacks = [callback])); + provider.call(providerContext, path, (err, result) => { + activeAsyncOperations.delete(path); + runCallbacks(callbacks, err, result); + }); + } + : null; + this.provideCustomSync = syncProvider + ? (syncProvider, providerContext, path) => { + return syncProvider.call(providerContext, path); } : null; } @@ -135048,6 +135104,11 @@ class CacheBackend { this.provide = provider ? this.provide.bind(this) : null; this.provideSync = syncProvider ? this.provideSync.bind(this) : null; + + this.provideCustom = provider ? this.provideCustom.bind(this) : null; + this.provideCustomSync = syncProvider + ? this.provideCustomSync.bind(this) + : null; } provide(path, options, callback) { @@ -135142,6 +135203,74 @@ class CacheBackend { return result; } + provideCustom(provider, providerContext, path, callback) { + // When in sync mode we can move to async mode + if (this._mode === STORAGE_MODE_SYNC) { + this._enterAsyncMode(); + } + + // Check in cache + let cacheEntry = this._data.get(path); + if (cacheEntry !== undefined) { + if (cacheEntry.err) return nextTick(callback, cacheEntry.err); + return nextTick(callback, null, cacheEntry.result); + } + + // Check if there is already the same operation running + let callbacks = this._activeAsyncOperations.get(path); + if (callbacks !== undefined) { + callbacks.push(callback); + return; + } + this._activeAsyncOperations.set(path, (callbacks = [callback])); + + // Run the operation + provider.call(providerContext, path, (err, result) => { + this._activeAsyncOperations.delete(path); + this._storeResult(path, err, result); + + // Enter async mode if not yet done + this._enterAsyncMode(); + + runCallbacks(callbacks, err, result); + }); + } + + provideCustomSync(provider, providerContext, path) { + // In sync mode we may have to decay some cache items + if (this._mode === STORAGE_MODE_SYNC) { + this._runDecays(); + } + + // Check in cache + let cacheEntry = this._data.get(path); + if (cacheEntry !== undefined) { + if (cacheEntry.err) throw cacheEntry.err; + return cacheEntry.result; + } + + // Get all active async operations + // This sync operation will also complete them + const callbacks = this._activeAsyncOperations.get(path); + this._activeAsyncOperations.delete(path); + + // Run the operation + // When in idle mode, we will enter sync mode + let result; + try { + result = provider.call(providerContext, path); + } catch (err) { + this._storeResult(path, err, undefined); + this._enterSyncModeWhenIdle(); + if (callbacks) runCallbacks(callbacks, err, undefined); + throw err; + } + this._storeResult(path, undefined, result); + this._enterSyncModeWhenIdle(); + if (callbacks) runCallbacks(callbacks, undefined, result); + return result; + } + purge(what) { if (!what) { if (this._mode !== STORAGE_MODE_IDLE) { @@ -135294,8 +135423,10 @@ module.exports = class CachedInputFileSystem { this.fileSystem ); const stat = this._statBackend.provide; + const customStat = this._statBackend.provideCustom; this.stat = /** @type {FileSystem["stat"]} */ (stat); const statSync = this._statBackend.provideSync; + const customStatSync = this._statBackend.provideCustomSync; this.statSync = /** @type {SyncFileSystem["statSync"]} */ (statSync); this._readdirBackend = createBackend( @@ -135311,8 +135442,161 @@ module.exports = class CachedInputFileSystem { this._readFileBackend = createBackend( duration, - this.fileSystem.readFile, - this.fileSystem.readFileSync, + this.fileSystem.readFile && + this.fileSystem.fstat && + this.fileSystem.read && + this.fileSystem.open && + this.fileSystem.close && + customStat + ? /** + * @this {{ fstat: NonNullable, readFile: NonNullable, open: NonNullable, read: NonNullable, close: NonNullable }} + */ + function (path, options, callback) { + if (typeof options === "function") { + callback = options; + options = undefined; + } + if (typeof options === "object") + return this.readFile(path, options, callback); + this.open(path, "r", (err, fd) => { + if (err) return callback(err); + if (typeof fd !== "number") + return callback(new Error("fd must be a number")); + customStat( + (path, callback) => this.fstat(fd, callback), + null, + path, + (err, stats) => { + if (err) return callback(err); + if (stats.size > 0 && stats.size < 128 * 1024) { + let remaining = stats.size + 1; + const buffer = Buffer.allocUnsafe(remaining); + const afterRead = (err, bytesRead) => { + if (err) { + return this.close(fd, () => { + callback(err); + }); + } + remaining -= bytesRead; + if (bytesRead === 0 || remaining === 1) { + this.close(fd, err => { + if (err) return callback(err); + return callback( + null, + buffer.slice(0, buffer.length - remaining) + ); + }); + } else if (remaining === 0) { + // The file size has changed from the cached info + // We keep reading until the end is found + let buf = Buffer.allocUnsafe(16 * 1024); + let bufPos = 0; + const buffers = [buffer]; + const afterUnknownRead = (err, bytesRead) => { + if (err) { + return this.close(fd, () => { + callback(err); + }); + } + bufPos += bytesRead; + if (bytesRead === 0) { + if (bufPos > 0) buffers.push(buf.slice(0, bufPos)); + this.close(fd, err => { + if (err) return callback(err); + return callback(null, Buffer.concat(buffers)); + }); + } else { + if (bufPos === buf.length) { + buffers.push(buf); + buf = Buffer.allocUnsafe(16 * 1024); + bufPos = 0; + } + this.read( + fd, + buf, + bufPos, + buf.length - bufPos, + -1, + afterUnknownRead + ); + } + }; + this.read( + fd, + buf, + bufPos, + buf.length - bufPos, + -1, + afterUnknownRead + ); + } else { + this.read( + fd, + buffer, + stats.size - remaining, + remaining + 1, + -1, + afterRead + ); + } + }; + this.read(fd, buffer, 0, remaining, -1, afterRead); + } else { + this.readFile(fd, options, (err, buffer) => { + this.close(fd, closeErr => { + if (err) return callback(err); + if (closeErr) return callback(closeErr); + callback(null, buffer); + }); + }); + } + } + ); + }); + } + : this.fileSystem.readFile, + this.fileSystem.readFileSync && + this.fileSystem.fstatSync && + this.fileSystem.readSync && + this.fileSystem.openSync && + this.fileSystem.closeSync && + customStatSync + ? /** + * @this {{ fstatSync: NonNullable, readFileSync: NonNullable, openSync: NonNullable, readSync: NonNullable, closeSync: NonNullable }} + */ + function (path, options) { + if (typeof options === "object") + return this.readFileSync(path, options); + const fd = this.openSync(path, "r"); + if (typeof fd !== "number") throw new Error("fd must be a number"); + const stats = customStatSync(() => this.fstatSync(fd), null, path); + if (stats.size > 0 && stats.size < 128 * 1024) { + let remaining = stats.size; + const buffer = Buffer.allocUnsafe(remaining); + try { + let bytesRead = this.readSync(fd, buffer, 0, remaining, -1); + remaining -= bytesRead; + while (bytesRead !== 0 && remaining !== 0) { + bytesRead = this.readSync( + fd, + buffer, + stats.size - remaining, + remaining, + -1 + ); + remaining -= bytesRead; + } + return buffer; + } finally { + this.closeSync(fd); + } + } else { + const buffer = this.readFileSync(fd); + this.closeSync(fd); + return buffer; + } + } + : this.fileSystem.readFileSync, this.fileSystem ); const readFile = this._readFileBackend.provide; @@ -136951,7 +137235,11 @@ const { /** * @typedef {Object} FileSystem - * @property {(function(string, FileSystemCallback): void) & function(string, object, FileSystemCallback): void} readFile + * @property {(function(string | number, FileSystemCallback): void) & function(string | number, object, FileSystemCallback): void} readFile + * @property {(function(string, string | number, FileSystemCallback): void) & function(string, string | number, string | number, FileSystemCallback): void=} open + * @property {(function(number, FileSystemCallback): void) & function(number, object, FileSystemCallback): void=} fstat + * @property {function(number, Buffer | Uint8Array, number, number, number, function(PossibleFileSystemError & Error | null | undefined, number=): void): void=} read + * @property {function(number, function(PossibleFileSystemError & Error | null | undefined): void): void=} close * @property {(function(string, FileSystemCallback<(Buffer | string)[] | FileSystemDirent[]>): void) & function(string, object, FileSystemCallback<(Buffer | string)[] | FileSystemDirent[]>): void} readdir * @property {((function(string, FileSystemCallback): void) & function(string, object, FileSystemCallback): void)=} readJson * @property {(function(string, FileSystemCallback): void) & function(string, object, FileSystemCallback): void} readlink @@ -136961,7 +137249,11 @@ const { /** * @typedef {Object} SyncFileSystem - * @property {function(string, object=): Buffer | string} readFileSync + * @property {function(string | number, object=): Buffer | string} readFileSync + * @property {function(string, string | number, string | number=): number=} openSync + * @property {function(number, object=): FileSystemStats=} fstatSync + * @property {function(number, Buffer | Uint8Array, number, number, number): number=} readSync + * @property {function(number): void=} closeSync * @property {function(string, object=): (Buffer | string)[] | FileSystemDirent[]} readdirSync * @property {(function(string, object=): object)=} readJsonSync * @property {function(string, object=): Buffer | string} readlinkSync