Contains multiple classes which represent a {\ttfamily Source}. A {\ttfamily Source} can be asked for source code, size, source map and hash.\hypertarget{md_sfcode_node_modules_webpack_sources_README_autotoc_md33903}{}\doxysection{$<$tt$>$\+Source$<$/tt$>$}\label{md_sfcode_node_modules_webpack_sources_README_autotoc_md33903}
Base class for all sources.\hypertarget{md_sfcode_node_modules_webpack_sources_README_autotoc_md33904}{}\doxysubsection{Public methods}\label{md_sfcode_node_modules_webpack_sources_README_autotoc_md33904}
All methods should be considered as expensive as they may need to do computations.\hypertarget{md_sfcode_node_modules_webpack_sources_README_autotoc_md33905}{}\doxysubsubsection{$<$tt$>$source$<$/tt$>$}\label{md_sfcode_node_modules_webpack_sources_README_autotoc_md33905}

\begin{DoxyCode}{0}
\DoxyCodeLine{Source.prototype.source() -\/> String | ArrayBuffer }

\end{DoxyCode}


Returns the represented source code as string.\hypertarget{md_sfcode_node_modules_webpack_sources_README_autotoc_md33906}{}\doxysubsubsection{$<$tt$>$size$<$/tt$>$}\label{md_sfcode_node_modules_webpack_sources_README_autotoc_md33906}

\begin{DoxyCode}{0}
\DoxyCodeLine{Source.prototype.size() -\/> Number }

\end{DoxyCode}


Returns the size in chars of the represented source code.\hypertarget{md_sfcode_node_modules_webpack_sources_README_autotoc_md33907}{}\doxysubsubsection{$<$tt$>$map$<$/tt$>$}\label{md_sfcode_node_modules_webpack_sources_README_autotoc_md33907}

\begin{DoxyCode}{0}
\DoxyCodeLine{Source.prototype.map(options: Object) -\/> Object | null }

\end{DoxyCode}


Returns the Source\+Map of the represented source code as JSON. May return {\ttfamily null} if no Source\+Map is available.

The {\ttfamily options} object can contain the following keys\+:


\begin{DoxyItemize}
\item {\ttfamily columns\+: Boolean} (default {\ttfamily true})\+: If set to false the implementation may omit mappings for columns.
\item {\ttfamily module\+: Boolean} (default {\ttfamily true})\+: If set to false the implementation may omit inner mappings for modules.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_webpack_sources_README_autotoc_md33908}{}\doxysubsubsection{$<$tt$>$source\+And\+Map$<$/tt$>$}\label{md_sfcode_node_modules_webpack_sources_README_autotoc_md33908}

\begin{DoxyCode}{0}
\DoxyCodeLine{Source.prototype.sourceAndMap(options: Object) -\/> \{}
\DoxyCodeLine{    source: String,}
\DoxyCodeLine{    map: Object}
\DoxyCodeLine{\} }

\end{DoxyCode}


Returns both, source code (like {\ttfamily Source.\+prototype.\+source()} and Source\+Map (like {\ttfamily Source.\+prototype.\+map()}). This method could have better performance than calling {\ttfamily source()} and {\ttfamily map()} separately.

See {\ttfamily map()} for {\ttfamily options}.\hypertarget{md_sfcode_node_modules_webpack_sources_README_autotoc_md33909}{}\doxysubsubsection{$<$tt$>$update\+Hash$<$/tt$>$}\label{md_sfcode_node_modules_webpack_sources_README_autotoc_md33909}

\begin{DoxyCode}{0}
\DoxyCodeLine{Source.prototype.updateHash(hash: Hash) -\/> void }

\end{DoxyCode}


Updates the provided {\ttfamily Hash} object with the content of the represented source code. ({\ttfamily Hash} is an object with an {\ttfamily update} method, which is called with string values)\hypertarget{md_sfcode_node_modules_webpack_sources_README_autotoc_md33910}{}\doxysubsubsection{$<$tt$>$node$<$/tt$>$ (optional)}\label{md_sfcode_node_modules_webpack_sources_README_autotoc_md33910}

\begin{DoxyCode}{0}
\DoxyCodeLine{Source.prototype.node(options: Object) -\/> SourceNode }

\end{DoxyCode}


This is an optional method. It may be {\ttfamily null} if not implemented.

Returns a {\ttfamily Source\+Node} (see source-\/map library) for the represented source code.

See {\ttfamily map()} for {\ttfamily options}.\hypertarget{md_sfcode_node_modules_webpack_sources_README_autotoc_md33911}{}\doxysubsubsection{$<$tt$>$list\+Node$<$/tt$>$ (optional)}\label{md_sfcode_node_modules_webpack_sources_README_autotoc_md33911}

\begin{DoxyCode}{0}
\DoxyCodeLine{Source.prototype.listNode(options: Object) -\/> SourceNode }

\end{DoxyCode}


This is an optional method. It may be {\ttfamily null} if not implemented.

Returns a {\ttfamily Source\+List\+Map} (see source-\/list-\/map library) for the represented source code.

See {\ttfamily map()} for {\ttfamily options}.\hypertarget{md_sfcode_node_modules_webpack_sources_README_autotoc_md33912}{}\doxysection{$<$tt$>$\+Raw\+Source$<$/tt$>$}\label{md_sfcode_node_modules_webpack_sources_README_autotoc_md33912}
Represents source code without Source\+Map.


\begin{DoxyCode}{0}
\DoxyCodeLine{new RawSource(sourceCode: String) }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_webpack_sources_README_autotoc_md33913}{}\doxysection{$<$tt$>$\+Original\+Source$<$/tt$>$}\label{md_sfcode_node_modules_webpack_sources_README_autotoc_md33913}
Represents source code, which is a copy of the original file.


\begin{DoxyCode}{0}
\DoxyCodeLine{new OriginalSource(}
\DoxyCodeLine{    sourceCode: String,}
\DoxyCodeLine{    name: String}
\DoxyCodeLine{) }

\end{DoxyCode}



\begin{DoxyItemize}
\item {\ttfamily source\+Code}\+: The source code.
\item {\ttfamily name}\+: The filename of the original source code.
\end{DoxyItemize}

Original\+Source tries to create column mappings if requested, by splitting the source code at typical statement borders ({\ttfamily ;}, {\ttfamily \{}, {\ttfamily \}}).\hypertarget{md_sfcode_node_modules_webpack_sources_README_autotoc_md33914}{}\doxysection{$<$tt$>$\+Source\+Map\+Source$<$/tt$>$}\label{md_sfcode_node_modules_webpack_sources_README_autotoc_md33914}
Represents source code with Source\+Map, optionally having an additional Source\+Map for the original source.


\begin{DoxyCode}{0}
\DoxyCodeLine{new SourceMapSource(}
\DoxyCodeLine{    sourceCode: String,}
\DoxyCodeLine{    name: String,}
\DoxyCodeLine{    sourceMap: Object | String,}
\DoxyCodeLine{    originalSource?: String,}
\DoxyCodeLine{    innerSourceMap?: Object | String,}
\DoxyCodeLine{    removeOriginalSource?: boolean}
\DoxyCodeLine{) }

\end{DoxyCode}



\begin{DoxyItemize}
\item {\ttfamily source\+Code}\+: The source code.
\item {\ttfamily name}\+: The filename of the original source code.
\item {\ttfamily source\+Map}\+: The Source\+Map for the source code.
\item {\ttfamily original\+Source}\+: The source code of the original file. Can be omitted if the {\ttfamily source\+Map} already contains the original source code.
\item {\ttfamily inner\+Source\+Map}\+: The Source\+Map for the {\ttfamily original\+Source}/{\ttfamily name}.
\item {\ttfamily remove\+Original\+Source}\+: Removes the source code for {\ttfamily name} from the final map, keeping only the deeper mappings for that file.
\end{DoxyItemize}

The {\ttfamily Source\+Map\+Source} supports \char`\"{}identity\char`\"{} mappings for the {\ttfamily inner\+Source\+Map}. When original source matches generated source for a mapping it\textquotesingle{}s assumed to be mapped char by char allowing to keep finer mappings from {\ttfamily source\+Map}.\hypertarget{md_sfcode_node_modules_webpack_sources_README_autotoc_md33915}{}\doxysection{$<$tt$>$\+Line\+To\+Line\+Mapped\+Source$<$/tt$>$}\label{md_sfcode_node_modules_webpack_sources_README_autotoc_md33915}
Represents source code, which is mapped line by line to the original file.


\begin{DoxyCode}{0}
\DoxyCodeLine{new LineToLineMappedSource(}
\DoxyCodeLine{    sourceCode: String,}
\DoxyCodeLine{    name: String,}
\DoxyCodeLine{    originalSource: String}
\DoxyCodeLine{) }

\end{DoxyCode}



\begin{DoxyItemize}
\item {\ttfamily source\+Code}\+: The source code.
\item {\ttfamily name}\+: The filename of the original source code.
\item {\ttfamily original\+Source}\+: The original source code.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_webpack_sources_README_autotoc_md33916}{}\doxysection{$<$tt$>$\+Cached\+Source$<$/tt$>$}\label{md_sfcode_node_modules_webpack_sources_README_autotoc_md33916}
Decorates a {\ttfamily Source} and caches returned results of {\ttfamily map}, {\ttfamily source}, {\ttfamily size} and {\ttfamily source\+And\+Map} in memory. Every other operation is delegated to the wrapped {\ttfamily Source}.


\begin{DoxyCode}{0}
\DoxyCodeLine{new CachedSource(source: Source) }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_webpack_sources_README_autotoc_md33917}{}\doxysection{$<$tt$>$\+Prefix\+Source$<$/tt$>$}\label{md_sfcode_node_modules_webpack_sources_README_autotoc_md33917}
Prefix every line of the decorated {\ttfamily Source} with a provided string.


\begin{DoxyCode}{0}
\DoxyCodeLine{new PrefixSource(}
\DoxyCodeLine{    prefix: String,}
\DoxyCodeLine{    source: Source}
\DoxyCodeLine{) }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_webpack_sources_README_autotoc_md33918}{}\doxysection{$<$tt$>$\+Concat\+Source$<$/tt$>$}\label{md_sfcode_node_modules_webpack_sources_README_autotoc_md33918}
Concatenate multiple {\ttfamily Source}s or strings to a single source.


\begin{DoxyCode}{0}
\DoxyCodeLine{new ConcatSource(}
\DoxyCodeLine{    ...items?: Source | String}
\DoxyCodeLine{) }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_webpack_sources_README_autotoc_md33919}{}\doxysubsection{Public methods}\label{md_sfcode_node_modules_webpack_sources_README_autotoc_md33919}
\hypertarget{md_sfcode_node_modules_webpack_sources_README_autotoc_md33920}{}\doxysubsubsection{$<$tt$>$add$<$/tt$>$}\label{md_sfcode_node_modules_webpack_sources_README_autotoc_md33920}

\begin{DoxyCode}{0}
\DoxyCodeLine{ConcatSource.prototype.add(item: Source | String) }

\end{DoxyCode}


Adds an item to the source.\hypertarget{md_sfcode_node_modules_webpack_sources_README_autotoc_md33921}{}\doxysection{$<$tt$>$\+Replace\+Source$<$/tt$>$}\label{md_sfcode_node_modules_webpack_sources_README_autotoc_md33921}
Decorates a {\ttfamily Source} with replacements and insertions of source code.

The {\ttfamily Replace\+Source} supports \char`\"{}identity\char`\"{} mappings for child source. When original source matches generated source for a mapping it\textquotesingle{}s assumed to be mapped char by char allowing to split mappings at replacements/insertions.\hypertarget{md_sfcode_node_modules_webpack_sources_README_autotoc_md33922}{}\doxysubsection{Public methods}\label{md_sfcode_node_modules_webpack_sources_README_autotoc_md33922}
\hypertarget{md_sfcode_node_modules_webpack_sources_README_autotoc_md33923}{}\doxysubsubsection{$<$tt$>$replace$<$/tt$>$}\label{md_sfcode_node_modules_webpack_sources_README_autotoc_md33923}

\begin{DoxyCode}{0}
\DoxyCodeLine{ReplaceSource.prototype.replace(}
\DoxyCodeLine{    start: Number,}
\DoxyCodeLine{    end: Number,}
\DoxyCodeLine{    replacement: String}
\DoxyCodeLine{) }

\end{DoxyCode}


Replaces chars from {\ttfamily start} (0-\/indexed, inclusive) to {\ttfamily end} (0-\/indexed, inclusive) with {\ttfamily replacement}.

Locations represents locations in the original source and are not influenced by other replacements or insertions.\hypertarget{md_sfcode_node_modules_webpack_sources_README_autotoc_md33924}{}\doxysubsubsection{$<$tt$>$insert$<$/tt$>$}\label{md_sfcode_node_modules_webpack_sources_README_autotoc_md33924}

\begin{DoxyCode}{0}
\DoxyCodeLine{ReplaceSource.prototype.insert(}
\DoxyCodeLine{    pos: Number,}
\DoxyCodeLine{    insertion: String}
\DoxyCodeLine{) }

\end{DoxyCode}


Inserts the {\ttfamily insertion} before char {\ttfamily pos} (0-\/indexed).

Location represents location in the original source and is not influenced by other replacements or insertions.\hypertarget{md_sfcode_node_modules_webpack_sources_README_autotoc_md33925}{}\doxysubsubsection{$<$tt$>$original$<$/tt$>$}\label{md_sfcode_node_modules_webpack_sources_README_autotoc_md33925}
Get decorated {\ttfamily Source}. 