dd-trace
Version:
Datadog APM tracing client for JavaScript
1 lines • 27.8 kB
JavaScript
(()=>{var e={"./source-map/lib/array-set.js"(e,t){let ArraySet=class ArraySet{constructor(){this._array=[],this._set=new Map}static fromArray(e,t){let n=new ArraySet;for(let r=0,o=e.length;r<o;r++)n.add(e[r],t);return n}size(){return this._set.size}add(e,t){let n=this.has(e),r=this._array.length;(!n||t)&&this._array.push(e),n||this._set.set(e,r)}has(e){return this._set.has(e)}indexOf(e){let t=this._set.get(e);if(t>=0)return t;throw Error('"'+e+'" is not in the set.')}at(e){if(e>=0&&e<this._array.length)return this._array[e];throw Error("No element indexed by "+e)}toArray(){return this._array.slice()}};t.ArraySet=ArraySet},"./source-map/lib/base64-vlq.js"(e,t,n){let r=n("./source-map/lib/base64.js");function toVLQSigned(e){return e<0?(-e<<1)+1:(e<<1)+0}t.encode=function(e){let t,n="",o=toVLQSigned(e);do t=31&o,(o>>>=5)>0&&(t|=32),n+=r.encode(t);while(o>0);return n}},"./source-map/lib/base64.js"(e,t){let n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&e<n.length)return n[e];throw TypeError("Must be between 0 and 63: "+e)}},"./source-map/lib/binary-search.js"(e,t){function recursiveSearch(e,n,r,o,s,i){let l=Math.floor((n-e)/2)+e,a=s(r,o[l],!0);return 0===a?l:a>0?n-l>1?recursiveSearch(l,n,r,o,s,i):i===t.LEAST_UPPER_BOUND?n<o.length?n:-1:l:l-e>1?recursiveSearch(e,l,r,o,s,i):i==t.LEAST_UPPER_BOUND?l:e<0?-1:e}t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,n,r,o){if(0===n.length)return -1;let s=recursiveSearch(-1,n.length,e,n,r,o||t.GREATEST_LOWER_BOUND);if(s<0)return -1;for(;s-1>=0&&0===r(n[s],n[s-1],!0);)--s;return s}},"./source-map/lib/mapping-list.js"(e,t,n){let r=n("./source-map/lib/util.js");function generatedPositionAfter(e,t){let n=e.generatedLine,o=t.generatedLine,s=e.generatedColumn,i=t.generatedColumn;return o>n||o==n&&i>=s||0>=r.compareByGeneratedPositionsInflated(e,t)}let MappingList=class MappingList{constructor(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}unsortedForEach(e,t){this._array.forEach(e,t)}add(e){generatedPositionAfter(this._last,e)?this._last=e:this._sorted=!1,this._array.push(e)}toArray(){return this._sorted||(this._array.sort(r.compareByGeneratedPositionsInflated),this._sorted=!0),this._array}};t.MappingList=MappingList},"./source-map/lib/read-wasm.js"(e,t,n){"use strict";let r=n("fs"),o=n("path");e.exports=function(){return new Promise((e,t)=>{let n=o.join(__dirname,"mappings.wasm");r.readFile(n,null,(n,r)=>{n?t(n):e(r.buffer)})})},e.exports.initialize=e=>{console.debug("SourceMapConsumer.initialize is a no-op when running in node.js")}},"./source-map/lib/source-map-consumer.js"(e,t,n){let r=n("./source-map/lib/util.js"),o=n("./source-map/lib/binary-search.js"),s=n("./source-map/lib/array-set.js").ArraySet;n("./source-map/lib/base64-vlq.js");let i=n("./source-map/lib/read-wasm.js"),l=n("./source-map/lib/wasm.js"),a=Symbol("smcInternal");let SourceMapConsumer=class SourceMapConsumer{constructor(e,t){if(e==a)return Promise.resolve(this);return _factory(e,t)}static initialize(e){i.initialize(e["lib/mappings.wasm"])}static fromSourceMap(e,t){return _factoryBSM(e,t)}static async with(e,t,n){let r=await new SourceMapConsumer(e,t);try{return await n(r)}finally{r.destroy()}}eachMapping(e,t,n){throw Error("Subclasses must implement eachMapping")}allGeneratedPositionsFor(e){throw Error("Subclasses must implement allGeneratedPositionsFor")}destroy(){throw Error("Subclasses must implement destroy")}};SourceMapConsumer.prototype._version=3,SourceMapConsumer.GENERATED_ORDER=1,SourceMapConsumer.ORIGINAL_ORDER=2,SourceMapConsumer.GREATEST_LOWER_BOUND=1,SourceMapConsumer.LEAST_UPPER_BOUND=2,t.SourceMapConsumer=SourceMapConsumer;let BasicSourceMapConsumer=class BasicSourceMapConsumer extends SourceMapConsumer{constructor(e,t){return super(a).then(n=>{let o=e;"string"==typeof e&&(o=r.parseSourceMapInput(e));let i=r.getArg(o,"version"),a=r.getArg(o,"sources").map(String),u=r.getArg(o,"names",[]),c=r.getArg(o,"sourceRoot",null),p=r.getArg(o,"sourcesContent",null),g=r.getArg(o,"mappings"),m=r.getArg(o,"file",null),h=r.getArg(o,"x_google_ignoreList",null);if(i!=n._version)throw Error("Unsupported version: "+i);return n._sourceLookupCache=new Map,n._names=s.fromArray(u.map(String),!0),n._sources=s.fromArray(a,!0),n._absoluteSources=s.fromArray(n._sources.toArray().map(function(e){return r.computeSourceURL(c,e,t)}),!0),n.sourceRoot=c,n.sourcesContent=p,n._mappings=g,n._sourceMapURL=t,n.file=m,n.x_google_ignoreList=h,n._computedColumnSpans=!1,n._mappingsPtr=0,n._wasm=null,l().then(e=>(n._wasm=e,n))})}_findSourceIndex(e){let t=this._sourceLookupCache.get(e);if("number"==typeof t)return t;let n=r.computeSourceURL(null,e,this._sourceMapURL);if(this._absoluteSources.has(n)){let t=this._absoluteSources.indexOf(n);return this._sourceLookupCache.set(e,t),t}let o=r.computeSourceURL(this.sourceRoot,e,this._sourceMapURL);if(this._absoluteSources.has(o)){let t=this._absoluteSources.indexOf(o);return this._sourceLookupCache.set(e,t),t}return -1}static fromSourceMap(e,t){return new BasicSourceMapConsumer(e.toString())}get sources(){return this._absoluteSources.toArray()}_getMappingsPtr(){return 0===this._mappingsPtr&&this._parseMappings(),this._mappingsPtr}_parseMappings(){let e=this._mappings,t=e.length,n=this._wasm.exports.allocate_mappings(t)>>>0,r=new Uint8Array(this._wasm.exports.memory.buffer,n,t);for(let n=0;n<t;n++)r[n]=e.charCodeAt(n);let o=this._wasm.exports.parse_mappings(n);if(!o){let e=this._wasm.exports.get_last_error(),t=`Error parsing mappings (code ${e}): `;switch(e){case 1:t+="the mappings contained a negative line, column, source index, or name index";break;case 2:t+="the mappings contained a number larger than 2**32";break;case 3:t+="reached EOF while in the middle of parsing a VLQ";break;case 4:t+="invalid base 64 character while parsing a VLQ";break;default:t+="unknown error code"}throw Error(t)}this._mappingsPtr=o}eachMapping(e,t,n){let r=t||null,o=n||SourceMapConsumer.GENERATED_ORDER;this._wasm.withMappingCallback(t=>{null!==t.source&&(t.source=this._absoluteSources.at(t.source),null!==t.name&&(t.name=this._names.at(t.name))),this._computedColumnSpans&&null===t.lastGeneratedColumn&&(t.lastGeneratedColumn=1/0),e.call(r,t)},()=>{switch(o){case SourceMapConsumer.GENERATED_ORDER:this._wasm.exports.by_generated_location(this._getMappingsPtr());break;case SourceMapConsumer.ORIGINAL_ORDER:this._wasm.exports.by_original_location(this._getMappingsPtr());break;default:throw Error("Unknown order of iteration.")}})}allGeneratedPositionsFor(e){let t=r.getArg(e,"source"),n=r.getArg(e,"line"),o=e.column||0;if((t=this._findSourceIndex(t))<0)return[];if(n<1)throw Error("Line numbers must be >= 1");if(o<0)throw Error("Column numbers must be >= 0");let s=[];return this._wasm.withMappingCallback(e=>{let t=e.lastGeneratedColumn;this._computedColumnSpans&&null===t&&(t=1/0),s.push({line:e.generatedLine,column:e.generatedColumn,lastColumn:t})},()=>{this._wasm.exports.all_generated_locations_for(this._getMappingsPtr(),t,n-1,"column"in e,o)}),s}destroy(){0!==this._mappingsPtr&&(this._wasm.exports.free_mappings(this._mappingsPtr),this._mappingsPtr=0)}computeColumnSpans(){this._computedColumnSpans||(this._wasm.exports.compute_column_spans(this._getMappingsPtr()),this._computedColumnSpans=!0)}originalPositionFor(e){let t,n={generatedLine:r.getArg(e,"line"),generatedColumn:r.getArg(e,"column")};if(n.generatedLine<1)throw Error("Line numbers must be >= 1");if(n.generatedColumn<0)throw Error("Column numbers must be >= 0");let o=r.getArg(e,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND);if(null==o&&(o=SourceMapConsumer.GREATEST_LOWER_BOUND),this._wasm.withMappingCallback(e=>t=e,()=>{this._wasm.exports.original_location_for(this._getMappingsPtr(),n.generatedLine-1,n.generatedColumn,o)}),t&&t.generatedLine===n.generatedLine){let e=r.getArg(t,"source",null);null!==e&&(e=this._absoluteSources.at(e));let n=r.getArg(t,"name",null);return null!==n&&(n=this._names.at(n)),{source:e,line:r.getArg(t,"originalLine",null),column:r.getArg(t,"originalColumn",null),name:n}}return{source:null,line:null,column:null,name:null}}hasContentsOfAllSources(){return!!this.sourcesContent&&this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e})}sourceContentFor(e,t){if(!this.sourcesContent)return null;let n=this._findSourceIndex(e);if(n>=0)return this.sourcesContent[n];if(t)return null;throw Error('"'+e+'" is not in the SourceMap.')}generatedPositionFor(e){let t,n=r.getArg(e,"source");if((n=this._findSourceIndex(n))<0)return{line:null,column:null,lastColumn:null};let o={source:n,originalLine:r.getArg(e,"line"),originalColumn:r.getArg(e,"column")};if(o.originalLine<1)throw Error("Line numbers must be >= 1");if(o.originalColumn<0)throw Error("Column numbers must be >= 0");let s=r.getArg(e,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND);if(null==s&&(s=SourceMapConsumer.GREATEST_LOWER_BOUND),this._wasm.withMappingCallback(e=>t=e,()=>{this._wasm.exports.generated_location_for(this._getMappingsPtr(),o.source,o.originalLine-1,o.originalColumn,s)}),t&&t.source===o.source){let e=t.lastGeneratedColumn;return this._computedColumnSpans&&null===e&&(e=1/0),{line:r.getArg(t,"generatedLine",null),column:r.getArg(t,"generatedColumn",null),lastColumn:e}}return{line:null,column:null,lastColumn:null}}};BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer;let IndexedSourceMapConsumer=class IndexedSourceMapConsumer extends SourceMapConsumer{constructor(e,t){return super(a).then(n=>{let o=e;"string"==typeof e&&(o=r.parseSourceMapInput(e));let s=r.getArg(o,"version"),i=r.getArg(o,"sections");if(s!=n._version)throw Error("Unsupported version: "+s);let l={line:-1,column:0};return Promise.all(i.map(e=>{if(e.url)throw Error("Support for url field in sections not implemented.");let n=r.getArg(e,"offset"),o=r.getArg(n,"line"),s=r.getArg(n,"column");if(o<l.line||o===l.line&&s<l.column)throw Error("Section offsets must be ordered and non-overlapping.");return l=n,new SourceMapConsumer(r.getArg(e,"map"),t).then(e=>({generatedOffset:{generatedLine:o+1,generatedColumn:s+1},consumer:e}))})).then(e=>(n._sections=e,n))})}get sources(){let e=[];for(let t=0;t<this._sections.length;t++)for(let n=0;n<this._sections[t].consumer.sources.length;n++)e.push(this._sections[t].consumer.sources[n]);return e}originalPositionFor(e){let t={generatedLine:r.getArg(e,"line"),generatedColumn:r.getArg(e,"column")},n=o.search(t,this._sections,function(e,t){let n=e.generatedLine-t.generatedOffset.generatedLine;return n||e.generatedColumn-(t.generatedOffset.generatedColumn-1)}),s=this._sections[n];return s?s.consumer.originalPositionFor({line:t.generatedLine-(s.generatedOffset.generatedLine-1),column:t.generatedColumn-(s.generatedOffset.generatedLine===t.generatedLine?s.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}}hasContentsOfAllSources(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})}sourceContentFor(e,t){for(let t=0;t<this._sections.length;t++){let n=this._sections[t].consumer.sourceContentFor(e,!0);if(n)return n}if(t)return null;throw Error('"'+e+'" is not in the SourceMap.')}_findSectionIndex(e){for(let t=0;t<this._sections.length;t++){let{consumer:n}=this._sections[t];if(-1!==n._findSourceIndex(e))return t}return -1}generatedPositionFor(e){let t=this._findSectionIndex(r.getArg(e,"source")),n=t>=0?this._sections[t]:null,o=t>=0&&t+1<this._sections.length?this._sections[t+1]:null,s=n&&n.consumer.generatedPositionFor(e);if(s&&null!==s.line){let e=n.generatedOffset.generatedLine-1,t=n.generatedOffset.generatedColumn-1;return 1===s.line&&(s.column+=t,"number"==typeof s.lastColumn&&(s.lastColumn+=t)),s.lastColumn===1/0&&o&&s.line===o.generatedOffset.generatedLine&&(s.lastColumn=o.generatedOffset.generatedColumn-2),s.line+=e,s}return{line:null,column:null,lastColumn:null}}allGeneratedPositionsFor(e){let t=this._findSectionIndex(r.getArg(e,"source")),n=t>=0?this._sections[t]:null,o=t>=0&&t+1<this._sections.length?this._sections[t+1]:null;return n?n.consumer.allGeneratedPositionsFor(e).map(e=>{let t=n.generatedOffset.generatedLine-1,r=n.generatedOffset.generatedColumn-1;return 1===e.line&&(e.column+=r,"number"==typeof e.lastColumn&&(e.lastColumn+=r)),e.lastColumn===1/0&&o&&e.line===o.generatedOffset.generatedLine&&(e.lastColumn=o.generatedOffset.generatedColumn-2),e.line+=t,e}):[]}eachMapping(e,t,n){this._sections.forEach((r,o)=>{let s=o+1<this._sections.length?this._sections[o+1]:null,{generatedOffset:i}=r,l=i.generatedLine-1,a=i.generatedColumn-1;r.consumer.eachMapping(function(t){1===t.generatedLine&&(t.generatedColumn+=a,"number"==typeof t.lastGeneratedColumn&&(t.lastGeneratedColumn+=a)),t.lastGeneratedColumn===1/0&&s&&t.generatedLine===s.generatedOffset.generatedLine&&(t.lastGeneratedColumn=s.generatedOffset.generatedColumn-2),t.generatedLine+=l,e.call(this,t)},t,n)})}computeColumnSpans(){for(let e=0;e<this._sections.length;e++)this._sections[e].consumer.computeColumnSpans()}destroy(){for(let e=0;e<this._sections.length;e++)this._sections[e].consumer.destroy()}};function _factory(e,t){let n=e;return"string"==typeof e&&(n=r.parseSourceMapInput(e)),Promise.resolve(null!=n.sections?new IndexedSourceMapConsumer(n,t):new BasicSourceMapConsumer(n,t))}function _factoryBSM(e,t){return BasicSourceMapConsumer.fromSourceMap(e,t)}},"./source-map/lib/source-map-generator.js"(e,t,n){let r=n("./source-map/lib/base64-vlq.js"),o=n("./source-map/lib/util.js"),s=n("./source-map/lib/array-set.js").ArraySet,i=n("./source-map/lib/mapping-list.js").MappingList;let SourceMapGenerator=class SourceMapGenerator{constructor(e){e||(e={}),this._file=o.getArg(e,"file",null),this._sourceRoot=o.getArg(e,"sourceRoot",null),this._skipValidation=o.getArg(e,"skipValidation",!1),this._sources=new s,this._names=new s,this._mappings=new i,this._sourcesContents=null}static fromSourceMap(e){let t=e.sourceRoot,n=new SourceMapGenerator({file:e.file,sourceRoot:t});return e.eachMapping(function(e){let r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=o.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)}),e.sources.forEach(function(r){let s=r;null!=t&&(s=o.relative(t,r)),n._sources.has(s)||n._sources.add(s);let i=e.sourceContentFor(r);null!=i&&n.setSourceContent(r,i)}),n}addMapping(e){let t=o.getArg(e,"generated"),n=o.getArg(e,"original",null),r=o.getArg(e,"source",null),s=o.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,s),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=s&&(s=String(s),this._names.has(s)||this._names.add(s)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:n&&n.line,originalColumn:n&&n.column,source:r,name:s})}setSourceContent(e,t){let n=e;null!=this._sourceRoot&&(n=o.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[o.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[o.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))}applySourceMap(e,t,n){let r=t;if(null==t){if(null==e.file)throw Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file}let i=this._sourceRoot;null!=i&&(r=o.relative(i,r));let l=this._mappings.toArray().length>0?new s:this._sources,a=new s;this._mappings.unsortedForEach(function(t){if(t.source===r&&null!=t.originalLine){let r=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=r.source&&(t.source=r.source,null!=n&&(t.source=o.join(n,t.source)),null!=i&&(t.source=o.relative(i,t.source)),t.originalLine=r.line,t.originalColumn=r.column,null!=r.name&&(t.name=r.name))}let s=t.source;null==s||l.has(s)||l.add(s);let u=t.name;null==u||a.has(u)||a.add(u)},this),this._sources=l,this._names=a,e.sources.forEach(function(t){let r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=o.join(n,t)),null!=i&&(t=o.relative(i,t)),this.setSourceContent(t,r))},this)}_validateMapping(e,t,n,r){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!t&&!n&&!r);else if(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n);else throw Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))}_serializeMappings(){let e,t,n,s,i=0,l=1,a=0,u=0,c=0,p=0,g="",m=this._mappings.toArray();for(let h=0,d=m.length;h<d;h++){if(t=m[h],e="",t.generatedLine!==l)for(i=0;t.generatedLine!==l;)e+=";",l++;else if(h>0){if(!o.compareByGeneratedPositionsInflated(t,m[h-1]))continue;e+=","}e+=r.encode(t.generatedColumn-i),i=t.generatedColumn,null!=t.source&&(s=this._sources.indexOf(t.source),e+=r.encode(s-p),p=s,e+=r.encode(t.originalLine-1-u),u=t.originalLine-1,e+=r.encode(t.originalColumn-a),a=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=r.encode(n-c),c=n)),g+=e}return g}_generateSourcesContent(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=o.relative(t,e));let n=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)}toJSON(){let e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e}toString(){return JSON.stringify(this.toJSON())}};SourceMapGenerator.prototype._version=3,t.SourceMapGenerator=SourceMapGenerator},"./source-map/lib/source-node.js"(e,t,n){let r=n("./source-map/lib/source-map-generator.js").SourceMapGenerator,o=n("./source-map/lib/util.js"),s=/(\r?\n)/,i="$$$isSourceNode$$$";let SourceNode=class SourceNode{constructor(e,t,n,r,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==o?null:o,this[i]=!0,null!=r&&this.add(r)}static fromStringWithSourceMap(e,t,n){let r,i=new SourceNode,l=e.split(s),a=0,shiftNextLine=function(){return getNextLine()+(getNextLine()||"");function getNextLine(){return a<l.length?l[a++]:void 0}},u=1,c=0,p=null;return t.eachMapping(function(e){if(null!==p)if(u<e.generatedLine)addMappingWithCode(p,shiftNextLine()),u++,c=0;else{let t=(r=l[a]||"").substr(0,e.generatedColumn-c);l[a]=r.substr(e.generatedColumn-c),c=e.generatedColumn,addMappingWithCode(p,t),p=e;return}for(;u<e.generatedLine;)i.add(shiftNextLine()),u++;c<e.generatedColumn&&(r=l[a]||"",i.add(r.substr(0,e.generatedColumn)),l[a]=r.substr(e.generatedColumn),c=e.generatedColumn),p=e},this),a<l.length&&(p&&addMappingWithCode(p,shiftNextLine()),i.add(l.splice(a).join(""))),t.sources.forEach(function(e){let r=t.sourceContentFor(e);null!=r&&(null!=n&&(e=o.join(n,e)),i.setSourceContent(e,r))}),i;function addMappingWithCode(e,t){if(null===e||void 0===e.source)i.add(t);else{let r=n?o.join(n,e.source):e.source;i.add(new SourceNode(e.originalLine,e.originalColumn,r,t,e.name))}}}add(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else if(e[i]||"string"==typeof e)e&&this.children.push(e);else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this}prepend(e){if(Array.isArray(e))for(let t=e.length-1;t>=0;t--)this.prepend(e[t]);else if(e[i]||"string"==typeof e)this.children.unshift(e);else throw TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);return this}walk(e){let t;for(let n=0,r=this.children.length;n<r;n++)(t=this.children[n])[i]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})}join(e){let t,n,r=this.children.length;if(r>0){for(n=0,t=[];n<r-1;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this}replaceRight(e,t){let n=this.children[this.children.length-1];return n[i]?n.replaceRight(e,t):"string"==typeof n?this.children[this.children.length-1]=n.replace(e,t):this.children.push("".replace(e,t)),this}setSourceContent(e,t){this.sourceContents[o.toSetString(e)]=t}walkSourceContents(e){for(let t=0,n=this.children.length;t<n;t++)this.children[t][i]&&this.children[t].walkSourceContents(e);let t=Object.keys(this.sourceContents);for(let n=0,r=t.length;n<r;n++)e(o.fromSetString(t[n]),this.sourceContents[t[n]])}toString(){let e="";return this.walk(function(t){e+=t}),e}toStringWithSourceMap(e){let t={code:"",line:1,column:0},n=new r(e),o=!1,s=null,i=null,l=null,a=null;return this.walk(function(e,r){t.code+=e,null!==r.source&&null!==r.line&&null!==r.column?((s!==r.source||i!==r.line||l!==r.column||a!==r.name)&&n.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:t.line,column:t.column},name:r.name}),s=r.source,i=r.line,l=r.column,a=r.name,o=!0):o&&(n.addMapping({generated:{line:t.line,column:t.column}}),s=null,o=!1);for(let i=0,l=e.length;i<l;i++)10===e.charCodeAt(i)?(t.line++,t.column=0,i+1===l?(s=null,o=!1):o&&n.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:t.line,column:t.column},name:r.name})):t.column++}),this.walkSourceContents(function(e,t){n.setSourceContent(e,t)}),{code:t.code,map:n}}};t.SourceNode=SourceNode},"./source-map/lib/url.js"(e,t,n){"use strict";e.exports="function"==typeof URL?URL:n("url").URL},"./source-map/lib/util.js"(e,t,n){let r=n("./source-map/lib/url.js");t.getArg=function(e,t,n){if(t in e)return e[t];if(3==arguments.length)return n;throw Error('"'+t+'" is a required argument.')};let o=!("__proto__"in Object.create(null));function identity(e){return e}function toSetString(e){return isProtoString(e)?"$"+e:e}function fromSetString(e){return isProtoString(e)?e.slice(1):e}function isProtoString(e){if(!e)return!1;let t=e.length;if(t<9||95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(let n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function strcmp(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}t.toSetString=o?identity:toSetString,t.fromSetString=o?identity:fromSetString,t.compareByGeneratedPositionsInflated=function(e,t){let n=e.generatedLine-t.generatedLine;return 0!==n||0!=(n=e.generatedColumn-t.generatedColumn)||0!==(n=strcmp(e.source,t.source))||0!=(n=e.originalLine-t.originalLine)||0!=(n=e.originalColumn-t.originalColumn)?n:strcmp(e.name,t.name)},t.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))};let s="http:",i=`${s}//host`;function createSafeHandler(e){return t=>{let n=getURLType(t),o=buildSafeBase(t),l=new r(t,o);e(l);let a=l.toString();return"absolute"===n?a:"scheme-relative"===n?a.slice(s.length):"path-absolute"===n?a.slice(i.length):computeRelativeURL(o,a)}}function withBase(e,t){return new r(e,t).toString()}function buildUniqueSegment(e,t){let n=0;for(;;){let r=e+n++;if(-1===t.indexOf(r))return r}}function buildSafeBase(e){let t=e.split("..").length-1,n=buildUniqueSegment("p",e),r=`${i}/`;for(let e=0;e<t;e++)r+=`${n}/`;return r}let l=/^[A-Za-z0-9\+\-\.]+:/;function getURLType(e){return"/"===e[0]?"/"===e[1]?"scheme-relative":"path-absolute":l.test(e)?"absolute":"path-relative"}function computeRelativeURL(e,t){"string"==typeof e&&(e=new r(e)),"string"==typeof t&&(t=new r(t));let n=t.pathname.split("/"),o=e.pathname.split("/");for(o.length>0&&!o[o.length-1]&&o.pop();n.length>0&&o.length>0&&n[0]===o[0];)n.shift(),o.shift();return o.map(()=>"..").concat(n).join("/")+t.search+t.hash}let a=createSafeHandler(e=>{e.pathname=e.pathname.replace(/\/?$/,"/")}),u=createSafeHandler(e=>{e.href=new r(".",e.toString()).toString()}),c=createSafeHandler(e=>{});function join(e,t){let n=getURLType(t),r=getURLType(e);if(e=a(e),"absolute"===n)return withBase(t,void 0);if("absolute"===r)return withBase(t,e);if("scheme-relative"===n)return c(t);if("scheme-relative"===r)return withBase(t,withBase(e,i)).slice(s.length);if("path-absolute"===n)return c(t);if("path-absolute"===r)return withBase(t,withBase(e,i)).slice(i.length);let o=buildSafeBase(t+e),l=withBase(t,withBase(e,o));return computeRelativeURL(o,l)}function relativeIfPossible(e,t){if(getURLType(e)!==getURLType(t))return null;let n=buildSafeBase(e+t),o=new r(e,n),s=new r(t,n);try{new r("",s.toString())}catch(e){return null}return s.protocol!==o.protocol||s.user!==o.user||s.password!==o.password||s.hostname!==o.hostname||s.port!==o.port?null:computeRelativeURL(o,s)}t.normalize=c,t.join=join,t.relative=function(e,t){let n=relativeIfPossible(e,t);return"string"==typeof n?n:c(t)},t.computeSourceURL=function(e,t,n){e&&"path-absolute"===getURLType(t)&&(t=t.replace(/^\//,""));let r=c(t||"");return e&&(r=join(e,r)),n&&(r=join(u(n),r)),r}},"./source-map/lib/wasm.js"(e,t,n){let r=n("./source-map/lib/read-wasm.js");function Mapping(){this.generatedLine=0,this.generatedColumn=0,this.lastGeneratedColumn=null,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}let o=null;e.exports=function(){if(o)return o;let e=[];return o=r().then(t=>WebAssembly.instantiate(t,{env:{mapping_callback(t,n,r,o,s,i,l,a,u,c){let p=new Mapping;p.generatedLine=t+1,p.generatedColumn=n,r&&(p.lastGeneratedColumn=o-1),s&&(p.source=i,p.originalLine=l+1,p.originalColumn=a,u&&(p.name=c)),e[e.length-1](p)},start_all_generated_locations_for(){console.time("all_generated_locations_for")},end_all_generated_locations_for(){console.timeEnd("all_generated_locations_for")},start_compute_column_spans(){console.time("compute_column_spans")},end_compute_column_spans(){console.timeEnd("compute_column_spans")},start_generated_location_for(){console.time("generated_location_for")},end_generated_location_for(){console.timeEnd("generated_location_for")},start_original_location_for(){console.time("original_location_for")},end_original_location_for(){console.timeEnd("original_location_for")},start_parse_mappings(){console.time("parse_mappings")},end_parse_mappings(){console.timeEnd("parse_mappings")},start_sort_by_generated_location(){console.time("sort_by_generated_location")},end_sort_by_generated_location(){console.timeEnd("sort_by_generated_location")},start_sort_by_original_location(){console.time("sort_by_original_location")},end_sort_by_original_location(){console.timeEnd("sort_by_original_location")}}})).then(t=>({exports:t.instance.exports,withMappingCallback:(t,n)=>{e.push(t);try{n()}finally{e.pop()}}})).then(null,e=>{throw o=null,e})}},fs(e){"use strict";e.exports=require("fs")},path(e){"use strict";e.exports=require("path")},url(e){"use strict";e.exports=require("url")}},t={};function __webpack_require__(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,__webpack_require__),o.exports}var n={};n.SourceMapGenerator=__webpack_require__("./source-map/lib/source-map-generator.js").SourceMapGenerator,n.SourceMapConsumer=__webpack_require__("./source-map/lib/source-map-consumer.js").SourceMapConsumer,n.SourceNode=__webpack_require__("./source-map/lib/source-node.js").SourceNode,module.exports=n})();