UNPKG

@hot-updater/plugin-core

Version:

React Native OTA solution for self-hosted

1,043 lines (1,042 loc) 3.98 MB
/*! For license information please see index.cjs.LICENSE.txt */ var __webpack_modules__ = { "../../node_modules/.pnpm/@jridgewell+gen-mapping@0.3.5/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js": function(__unused_webpack_module, exports1, __webpack_require__) { (function(global1, factory) { factory(exports1, __webpack_require__("../../node_modules/.pnpm/@jridgewell+set-array@1.2.1/node_modules/@jridgewell/set-array/dist/set-array.umd.js"), __webpack_require__("../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js"), __webpack_require__("../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.25/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js")); })(0, function(exports1, setArray, sourcemapCodec, traceMapping) { 'use strict'; const COLUMN = 0; const SOURCES_INDEX = 1; const SOURCE_LINE = 2; const SOURCE_COLUMN = 3; const NAMES_INDEX = 4; const NO_NAME = -1; class GenMapping { constructor({ file, sourceRoot } = {}){ this._names = new setArray.SetArray(); this._sources = new setArray.SetArray(); this._sourcesContent = []; this._mappings = []; this.file = file; this.sourceRoot = sourceRoot; this._ignoreList = new setArray.SetArray(); } } function cast(map) { return map; } function addSegment(map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { return addSegmentInternal(false, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content); } function addMapping(map, mapping) { return addMappingInternal(false, map, mapping); } const maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content)=>addSegmentInternal(true, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content); const maybeAddMapping = (map, mapping)=>addMappingInternal(true, map, mapping); function setSourceContent(map, source, content) { const { _sources: sources, _sourcesContent: sourcesContent } = cast(map); const index = setArray.put(sources, source); sourcesContent[index] = content; } function setIgnore(map, source, ignore = true) { const { _sources: sources, _sourcesContent: sourcesContent, _ignoreList: ignoreList } = cast(map); const index = setArray.put(sources, source); if (index === sourcesContent.length) sourcesContent[index] = null; if (ignore) setArray.put(ignoreList, index); else setArray.remove(ignoreList, index); } function toDecodedMap(map) { const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, _ignoreList: ignoreList } = cast(map); removeEmptyFinalLines(mappings); return { version: 3, file: map.file || void 0, names: names.array, sourceRoot: map.sourceRoot || void 0, sources: sources.array, sourcesContent, mappings, ignoreList: ignoreList.array }; } function toEncodedMap(map) { const decoded = toDecodedMap(map); return Object.assign(Object.assign({}, decoded), { mappings: sourcemapCodec.encode(decoded.mappings) }); } function fromMap(input) { const map = new traceMapping.TraceMap(input); const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot }); putAll(cast(gen)._names, map.names); putAll(cast(gen)._sources, map.sources); cast(gen)._sourcesContent = map.sourcesContent || map.sources.map(()=>null); cast(gen)._mappings = traceMapping.decodedMappings(map); if (map.ignoreList) putAll(cast(gen)._ignoreList, map.ignoreList); return gen; } function allMappings(map) { const out = []; const { _mappings: mappings, _sources: sources, _names: names } = cast(map); for(let i = 0; i < mappings.length; i++){ const line = mappings[i]; for(let j = 0; j < line.length; j++){ const seg = line[j]; const generated = { line: i + 1, column: seg[COLUMN] }; let source; let original; let name; if (1 !== seg.length) { source = sources.array[seg[SOURCES_INDEX]]; original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] }; if (5 === seg.length) name = names.array[seg[NAMES_INDEX]]; } out.push({ generated, source, original, name }); } } return out; } function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) { const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names } = cast(map); const line = getLine(mappings, genLine); const index = getColumnIndex(line, genColumn); if (!source) { if (skipable && skipSourceless(line, index)) return; return insert(line, index, [ genColumn ]); } const sourcesIndex = setArray.put(sources, source); const namesIndex = name ? setArray.put(names, name) : NO_NAME; if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = null != content ? content : null; if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) return; return insert(line, index, name ? [ genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex ] : [ genColumn, sourcesIndex, sourceLine, sourceColumn ]); } function getLine(mappings, index) { for(let i = mappings.length; i <= index; i++)mappings[i] = []; return mappings[index]; } function getColumnIndex(line, genColumn) { let index = line.length; for(let i = index - 1; i >= 0; index = i--){ const current = line[i]; if (genColumn >= current[COLUMN]) break; } return index; } function insert(array, index, value1) { for(let i = array.length; i > index; i--)array[i] = array[i - 1]; array[index] = value1; } function removeEmptyFinalLines(mappings) { const { length } = mappings; let len = length; for(let i = len - 1; i >= 0 && !(mappings[i].length > 0); len = i, i--); if (len < length) mappings.length = len; } function putAll(setarr, array) { for(let i = 0; i < array.length; i++)setArray.put(setarr, array[i]); } function skipSourceless(line, index) { if (0 === index) return true; const prev = line[index - 1]; return 1 === prev.length; } function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) { if (0 === index) return false; const prev = line[index - 1]; if (1 === prev.length) return false; return sourcesIndex === prev[SOURCES_INDEX] && sourceLine === prev[SOURCE_LINE] && sourceColumn === prev[SOURCE_COLUMN] && namesIndex === (5 === prev.length ? prev[NAMES_INDEX] : NO_NAME); } function addMappingInternal(skipable, map, mapping) { const { generated, source, original, name, content } = mapping; if (!source) return addSegmentInternal(skipable, map, generated.line - 1, generated.column, null, null, null, null, null); return addSegmentInternal(skipable, map, generated.line - 1, generated.column, source, original.line - 1, original.column, name, content); } exports1.GenMapping = GenMapping; exports1.addMapping = addMapping; exports1.addSegment = addSegment; exports1.allMappings = allMappings; exports1.fromMap = fromMap; exports1.maybeAddMapping = maybeAddMapping; exports1.maybeAddSegment = maybeAddSegment; exports1.setIgnore = setIgnore; exports1.setSourceContent = setSourceContent; exports1.toDecodedMap = toDecodedMap; exports1.toEncodedMap = toEncodedMap; Object.defineProperty(exports1, '__esModule', { value: true }); }); }, "../../node_modules/.pnpm/@jridgewell+resolve-uri@3.1.1/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js": function(module) { (function(global1, factory) { module.exports = factory(); })(0, function() { 'use strict'; const schemeRegex = /^[\w+.-]+:\/\//; const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/; const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i; var UrlType; (function(UrlType) { UrlType[UrlType["Empty"] = 1] = "Empty"; UrlType[UrlType["Hash"] = 2] = "Hash"; UrlType[UrlType["Query"] = 3] = "Query"; UrlType[UrlType["RelativePath"] = 4] = "RelativePath"; UrlType[UrlType["AbsolutePath"] = 5] = "AbsolutePath"; UrlType[UrlType["SchemeRelative"] = 6] = "SchemeRelative"; UrlType[UrlType["Absolute"] = 7] = "Absolute"; })(UrlType || (UrlType = {})); function isAbsoluteUrl(input) { return schemeRegex.test(input); } function isSchemeRelativeUrl(input) { return input.startsWith('//'); } function isAbsolutePath(input) { return input.startsWith('/'); } function isFileUrl(input) { return input.startsWith('file:'); } function isRelative(input) { return /^[.?#]/.test(input); } function parseAbsoluteUrl(input) { const match = urlRegex.exec(input); return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || ''); } function parseFileUrl(input) { const match = fileRegex.exec(input); const path = match[2]; return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || ''); } function makeUrl(scheme, user, host, port, path, query, hash) { return { scheme, user, host, port, path, query, hash, type: UrlType.Absolute }; } function parseUrl(input) { if (isSchemeRelativeUrl(input)) { const url = parseAbsoluteUrl('http:' + input); url.scheme = ''; url.type = UrlType.SchemeRelative; return url; } if (isAbsolutePath(input)) { const url = parseAbsoluteUrl('http://foo.com' + input); url.scheme = ''; url.host = ''; url.type = UrlType.AbsolutePath; return url; } if (isFileUrl(input)) return parseFileUrl(input); if (isAbsoluteUrl(input)) return parseAbsoluteUrl(input); const url = parseAbsoluteUrl('http://foo.com/' + input); url.scheme = ''; url.host = ''; url.type = input ? input.startsWith('?') ? UrlType.Query : input.startsWith('#') ? UrlType.Hash : UrlType.RelativePath : UrlType.Empty; return url; } function stripPathFilename(path) { if (path.endsWith('/..')) return path; const index = path.lastIndexOf('/'); return path.slice(0, index + 1); } function mergePaths(url, base) { normalizePath(base, base.type); if ('/' === url.path) url.path = base.path; else url.path = stripPathFilename(base.path) + url.path; } function normalizePath(url, type) { const rel = type <= UrlType.RelativePath; const pieces = url.path.split('/'); let pointer = 1; let positive = 0; let addTrailingSlash = false; for(let i = 1; i < pieces.length; i++){ const piece = pieces[i]; if (!piece) { addTrailingSlash = true; continue; } addTrailingSlash = false; if ('.' !== piece) { if ('..' === piece) { if (positive) { addTrailingSlash = true; positive--; pointer--; } else if (rel) pieces[pointer++] = piece; continue; } pieces[pointer++] = piece; positive++; } } let path = ''; for(let i = 1; i < pointer; i++)path += '/' + pieces[i]; if (!path || addTrailingSlash && !path.endsWith('/..')) path += '/'; url.path = path; } function resolve(input, base) { if (!input && !base) return ''; const url = parseUrl(input); let inputType = url.type; if (base && inputType !== UrlType.Absolute) { const baseUrl = parseUrl(base); const baseType = baseUrl.type; switch(inputType){ case UrlType.Empty: url.hash = baseUrl.hash; case UrlType.Hash: url.query = baseUrl.query; case UrlType.Query: case UrlType.RelativePath: mergePaths(url, baseUrl); case UrlType.AbsolutePath: url.user = baseUrl.user; url.host = baseUrl.host; url.port = baseUrl.port; case UrlType.SchemeRelative: url.scheme = baseUrl.scheme; } if (baseType > inputType) inputType = baseType; } normalizePath(url, inputType); const queryHash = url.query + url.hash; switch(inputType){ case UrlType.Hash: case UrlType.Query: return queryHash; case UrlType.RelativePath: { const path = url.path.slice(1); if (!path) return queryHash || '.'; if (isRelative(base || input) && !isRelative(path)) return './' + path + queryHash; return path + queryHash; } case UrlType.AbsolutePath: return url.path + queryHash; default: return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash; } } return resolve; }); }, "../../node_modules/.pnpm/@jridgewell+set-array@1.2.1/node_modules/@jridgewell/set-array/dist/set-array.umd.js": function(__unused_webpack_module, exports1) { (function(global1, factory) { factory(exports1); })(0, function(exports1) { 'use strict'; class SetArray { constructor(){ this._indexes = { __proto__: null }; this.array = []; } } function cast(set) { return set; } function get(setarr, key) { return cast(setarr)._indexes[key]; } function put(setarr, key) { const index = get(setarr, key); if (void 0 !== index) return index; const { array, _indexes: indexes } = cast(setarr); const length = array.push(key); return indexes[key] = length - 1; } function pop(setarr) { const { array, _indexes: indexes } = cast(setarr); if (0 === array.length) return; const last = array.pop(); indexes[last] = void 0; } function remove(setarr, key) { const index = get(setarr, key); if (void 0 === index) return; const { array, _indexes: indexes } = cast(setarr); for(let i = index + 1; i < array.length; i++){ const k = array[i]; array[i - 1] = k; indexes[k]--; } indexes[key] = void 0; array.pop(); } exports1.SetArray = SetArray; exports1.get = get; exports1.pop = pop; exports1.put = put; exports1.remove = remove; Object.defineProperty(exports1, '__esModule', { value: true }); }); }, "../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js": function(__unused_webpack_module, exports1) { (function(global1, factory) { factory(exports1); })(0, function(exports1) { 'use strict'; const comma = ','.charCodeAt(0); const semicolon = ';'.charCodeAt(0); const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; const intToChar = new Uint8Array(64); const charToInt = new Uint8Array(128); for(let i = 0; i < chars.length; i++){ const c = chars.charCodeAt(i); intToChar[i] = c; charToInt[c] = i; } function decodeInteger(reader, relative) { let value1 = 0; let shift = 0; let integer = 0; do { const c = reader.next(); integer = charToInt[c]; value1 |= (31 & integer) << shift; shift += 5; }while (32 & integer); const shouldNegate = 1 & value1; value1 >>>= 1; if (shouldNegate) value1 = -2147483648 | -value1; return relative + value1; } function encodeInteger(builder, num, relative) { let delta = num - relative; delta = delta < 0 ? -delta << 1 | 1 : delta << 1; do { let clamped = 31 & delta; delta >>>= 5; if (delta > 0) clamped |= 32; builder.write(intToChar[clamped]); }while (delta > 0); return num; } function hasMoreVlq(reader, max) { if (reader.pos >= max) return false; return reader.peek() !== comma; } const bufLength = 16384; const td = 'undefined' != typeof TextDecoder ? /* #__PURE__ */ new TextDecoder() : 'undefined' != typeof Buffer ? { decode (buf) { const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength); return out.toString(); } } : { decode (buf) { let out = ''; for(let i = 0; i < buf.length; i++)out += String.fromCharCode(buf[i]); return out; } }; class StringWriter { constructor(){ this.pos = 0; this.out = ''; this.buffer = new Uint8Array(bufLength); } write(v) { const { buffer } = this; buffer[this.pos++] = v; if (this.pos === bufLength) { this.out += td.decode(buffer); this.pos = 0; } } flush() { const { buffer, out, pos } = this; return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out; } } class StringReader { constructor(buffer){ this.pos = 0; this.buffer = buffer; } next() { return this.buffer.charCodeAt(this.pos++); } peek() { return this.buffer.charCodeAt(this.pos); } indexOf(char) { const { buffer, pos } = this; const idx = buffer.indexOf(char, pos); return -1 === idx ? buffer.length : idx; } } const EMPTY = []; function decodeOriginalScopes(input) { const { length } = input; const reader = new StringReader(input); const scopes = []; const stack = []; let line = 0; for(; reader.pos < length; reader.pos++){ line = decodeInteger(reader, line); const column = decodeInteger(reader, 0); if (!hasMoreVlq(reader, length)) { const last = stack.pop(); last[2] = line; last[3] = column; continue; } const kind = decodeInteger(reader, 0); const fields = decodeInteger(reader, 0); const hasName = 1 & fields; const scope = hasName ? [ line, column, 0, 0, kind, decodeInteger(reader, 0) ] : [ line, column, 0, 0, kind ]; let vars = EMPTY; if (hasMoreVlq(reader, length)) { vars = []; do { const varsIndex = decodeInteger(reader, 0); vars.push(varsIndex); }while (hasMoreVlq(reader, length)); } scope.vars = vars; scopes.push(scope); stack.push(scope); } return scopes; } function encodeOriginalScopes(scopes) { const writer = new StringWriter(); for(let i = 0; i < scopes.length;)i = _encodeOriginalScopes(scopes, i, writer, [ 0 ]); return writer.flush(); } function _encodeOriginalScopes(scopes, index, writer, state) { const scope = scopes[index]; const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope; if (index > 0) writer.write(comma); state[0] = encodeInteger(writer, startLine, state[0]); encodeInteger(writer, startColumn, 0); encodeInteger(writer, kind, 0); const fields = 6 === scope.length ? 1 : 0; encodeInteger(writer, fields, 0); if (6 === scope.length) encodeInteger(writer, scope[5], 0); for (const v of vars)encodeInteger(writer, v, 0); for(index++; index < scopes.length;){ const next = scopes[index]; const { 0: l, 1: c } = next; if (l > endLine || l === endLine && c >= endColumn) break; index = _encodeOriginalScopes(scopes, index, writer, state); } writer.write(comma); state[0] = encodeInteger(writer, endLine, state[0]); encodeInteger(writer, endColumn, 0); return index; } function decodeGeneratedRanges(input) { const { length } = input; const reader = new StringReader(input); const ranges = []; const stack = []; let genLine = 0; let definitionSourcesIndex = 0; let definitionScopeIndex = 0; let callsiteSourcesIndex = 0; let callsiteLine = 0; let callsiteColumn = 0; let bindingLine = 0; let bindingColumn = 0; do { const semi = reader.indexOf(';'); let genColumn = 0; for(; reader.pos < semi; reader.pos++){ genColumn = decodeInteger(reader, genColumn); if (!hasMoreVlq(reader, semi)) { const last = stack.pop(); last[2] = genLine; last[3] = genColumn; continue; } const fields = decodeInteger(reader, 0); const hasDefinition = 1 & fields; const hasCallsite = 2 & fields; const hasScope = 4 & fields; let callsite = null; let bindings = EMPTY; let range; if (hasDefinition) { const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex); definitionScopeIndex = decodeInteger(reader, definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0); definitionSourcesIndex = defSourcesIndex; range = [ genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex ]; } else range = [ genLine, genColumn, 0, 0 ]; range.isScope = !!hasScope; if (hasCallsite) { const prevCsi = callsiteSourcesIndex; const prevLine = callsiteLine; callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex); const sameSource = prevCsi === callsiteSourcesIndex; callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0); callsiteColumn = decodeInteger(reader, sameSource && prevLine === callsiteLine ? callsiteColumn : 0); callsite = [ callsiteSourcesIndex, callsiteLine, callsiteColumn ]; } range.callsite = callsite; if (hasMoreVlq(reader, semi)) { bindings = []; do { bindingLine = genLine; bindingColumn = genColumn; const expressionsCount = decodeInteger(reader, 0); let expressionRanges; if (expressionsCount < -1) { expressionRanges = [ [ decodeInteger(reader, 0) ] ]; for(let i = -1; i > expressionsCount; i--){ const prevBl = bindingLine; bindingLine = decodeInteger(reader, bindingLine); bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0); const expression = decodeInteger(reader, 0); expressionRanges.push([ expression, bindingLine, bindingColumn ]); } } else expressionRanges = [ [ expressionsCount ] ]; bindings.push(expressionRanges); }while (hasMoreVlq(reader, semi)); } range.bindings = bindings; ranges.push(range); stack.push(range); } genLine++; reader.pos = semi + 1; }while (reader.pos < length); return ranges; } function encodeGeneratedRanges(ranges) { if (0 === ranges.length) return ''; const writer = new StringWriter(); for(let i = 0; i < ranges.length;)i = _encodeGeneratedRanges(ranges, i, writer, [ 0, 0, 0, 0, 0, 0, 0 ]); return writer.flush(); } function _encodeGeneratedRanges(ranges, index, writer, state) { const range = ranges[index]; const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, isScope, callsite, bindings } = range; if (state[0] < startLine) { catchupLine(writer, state[0], startLine); state[0] = startLine; state[1] = 0; } else if (index > 0) writer.write(comma); state[1] = encodeInteger(writer, range[1], state[1]); const fields = (6 === range.length ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0); encodeInteger(writer, fields, 0); if (6 === range.length) { const { 4: sourcesIndex, 5: scopesIndex } = range; if (sourcesIndex !== state[2]) state[3] = 0; state[2] = encodeInteger(writer, sourcesIndex, state[2]); state[3] = encodeInteger(writer, scopesIndex, state[3]); } if (callsite) { const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite; if (sourcesIndex !== state[4]) { state[5] = 0; state[6] = 0; } else if (callLine !== state[5]) state[6] = 0; state[4] = encodeInteger(writer, sourcesIndex, state[4]); state[5] = encodeInteger(writer, callLine, state[5]); state[6] = encodeInteger(writer, callColumn, state[6]); } if (bindings) for (const binding of bindings){ if (binding.length > 1) encodeInteger(writer, -binding.length, 0); const expression = binding[0][0]; encodeInteger(writer, expression, 0); let bindingStartLine = startLine; let bindingStartColumn = startColumn; for(let i = 1; i < binding.length; i++){ const expRange = binding[i]; bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine); bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn); encodeInteger(writer, expRange[0], 0); } } for(index++; index < ranges.length;){ const next = ranges[index]; const { 0: l, 1: c } = next; if (l > endLine || l === endLine && c >= endColumn) break; index = _encodeGeneratedRanges(ranges, index, writer, state); } if (state[0] < endLine) { catchupLine(writer, state[0], endLine); state[0] = endLine; state[1] = 0; } else writer.write(comma); state[1] = encodeInteger(writer, endColumn, state[1]); return index; } function catchupLine(writer, lastLine, line) { do writer.write(semicolon); while (++lastLine < line); } function decode(mappings) { const { length } = mappings; const reader = new StringReader(mappings); const decoded = []; let genColumn = 0; let sourcesIndex = 0; let sourceLine = 0; let sourceColumn = 0; let namesIndex = 0; do { const semi = reader.indexOf(';'); const line = []; let sorted = true; let lastCol = 0; genColumn = 0; while(reader.pos < semi){ let seg; genColumn = decodeInteger(reader, genColumn); if (genColumn < lastCol) sorted = false; lastCol = genColumn; if (hasMoreVlq(reader, semi)) { sourcesIndex = decodeInteger(reader, sourcesIndex); sourceLine = decodeInteger(reader, sourceLine); sourceColumn = decodeInteger(reader, sourceColumn); if (hasMoreVlq(reader, semi)) { namesIndex = decodeInteger(reader, namesIndex); seg = [ genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex ]; } else seg = [ genColumn, sourcesIndex, sourceLine, sourceColumn ]; } else seg = [ genColumn ]; line.push(seg); reader.pos++; } if (!sorted) sort(line); decoded.push(line); reader.pos = semi + 1; }while (reader.pos <= length); return decoded; } function sort(line) { line.sort(sortComparator); } function sortComparator(a, b) { return a[0] - b[0]; } function encode(decoded) { const writer = new StringWriter(); let sourcesIndex = 0; let sourceLine = 0; let sourceColumn = 0; let namesIndex = 0; for(let i = 0; i < decoded.length; i++){ const line = decoded[i]; if (i > 0) writer.write(semicolon); if (0 === line.length) continue; let genColumn = 0; for(let j = 0; j < line.length; j++){ const segment = line[j]; if (j > 0) writer.write(comma); genColumn = encodeInteger(writer, segment[0], genColumn); if (1 !== segment.length) { sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); sourceLine = encodeInteger(writer, segment[2], sourceLine); sourceColumn = encodeInteger(writer, segment[3], sourceColumn); if (4 !== segment.length) namesIndex = encodeInteger(writer, segment[4], namesIndex); } } } return writer.flush(); } exports1.decode = decode; exports1.decodeGeneratedRanges = decodeGeneratedRanges; exports1.decodeOriginalScopes = decodeOriginalScopes; exports1.encode = encode; exports1.encodeGeneratedRanges = encodeGeneratedRanges; exports1.encodeOriginalScopes = encodeOriginalScopes; Object.defineProperty(exports1, '__esModule', { value: true }); }); }, "../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.25/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js": function(__unused_webpack_module, exports1, __webpack_require__) { (function(global1, factory) { factory(exports1, __webpack_require__("../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js"), __webpack_require__("../../node_modules/.pnpm/@jridgewell+resolve-uri@3.1.1/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js")); })(0, function(exports1, sourcemapCodec, resolveUri) { 'use strict'; function resolve(input, base) { if (base && !base.endsWith('/')) base += '/'; return resolveUri(input, base); } function stripFilename(path) { if (!path) return ''; const index = path.lastIndexOf('/'); return path.slice(0, index + 1); } const COLUMN = 0; const SOURCES_INDEX = 1; const SOURCE_LINE = 2; const SOURCE_COLUMN = 3; const NAMES_INDEX = 4; const REV_GENERATED_LINE = 1; const REV_GENERATED_COLUMN = 2; function maybeSort(mappings, owned) { const unsortedIndex = nextUnsortedSegmentLine(mappings, 0); if (unsortedIndex === mappings.length) return mappings; if (!owned) mappings = mappings.slice(); for(let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1))mappings[i] = sortSegments(mappings[i], owned); return mappings; } function nextUnsortedSegmentLine(mappings, start) { for(let i = start; i < mappings.length; i++)if (!isSorted(mappings[i])) return i; return mappings.length; } function isSorted(line) { for(let j = 1; j < line.length; j++)if (line[j][COLUMN] < line[j - 1][COLUMN]) return false; return true; } function sortSegments(line, owned) { if (!owned) line = line.slice(); return line.sort(sortComparator); } function sortComparator(a, b) { return a[COLUMN] - b[COLUMN]; } let found = false; function binarySearch(haystack, needle, low, high) { while(low <= high){ const mid = low + (high - low >> 1); const cmp = haystack[mid][COLUMN] - needle; if (0 === cmp) { found = true; return mid; } if (cmp < 0) low = mid + 1; else high = mid - 1; } found = false; return low - 1; } function upperBound(haystack, needle, index) { for(let i = index + 1; i < haystack.length && haystack[i][COLUMN] === needle; index = i++); return index; } function lowerBound(haystack, needle, index) { for(let i = index - 1; i >= 0 && haystack[i][COLUMN] === needle; index = i--); return index; } function memoizedState() { return { lastKey: -1, lastNeedle: -1, lastIndex: -1 }; } function memoizedBinarySearch(haystack, needle, state, key) { const { lastKey, lastNeedle, lastIndex } = state; let low = 0; let high = haystack.length - 1; if (key === lastKey) { if (needle === lastNeedle) { found = -1 !== lastIndex && haystack[lastIndex][COLUMN] === needle; return lastIndex; } if (needle >= lastNeedle) low = -1 === lastIndex ? 0 : lastIndex; else high = lastIndex; } state.lastKey = key; state.lastNeedle = needle; return state.lastIndex = binarySearch(haystack, needle, low, high); } function buildBySources(decoded, memos) { const sources = memos.map(buildNullArray); for(let i = 0; i < decoded.length; i++){ const line = decoded[i]; for(let j = 0; j < line.length; j++){ const seg = line[j]; if (1 === seg.length) continue; const sourceIndex = seg[SOURCES_INDEX]; const sourceLine = seg[SOURCE_LINE]; const sourceColumn = seg[SOURCE_COLUMN]; const originalSource = sources[sourceIndex]; const originalLine = originalSource[sourceLine] || (originalSource[sourceLine] = []); const memo = memos[sourceIndex]; let index = upperBound(originalLine, sourceColumn, memoizedBinarySearch(originalLine, sourceColumn, memo, sourceLine)); memo.lastIndex = ++index; insert(originalLine, index, [ sourceColumn, i, seg[COLUMN] ]); } } return sources; } function insert(array, index, value1) { for(let i = array.length; i > index; i--)array[i] = array[i - 1]; array[index] = value1; } function buildNullArray() { return { __proto__: null }; } const AnyMap = function(map, mapUrl) { const parsed = parse(map); if (!('sections' in parsed)) return new TraceMap(parsed, mapUrl); const mappings = []; const sources = []; const sourcesContent = []; const names = []; const ignoreList = []; recurse(parsed, mapUrl, mappings, sources, sourcesContent, names, ignoreList, 0, 0, 1 / 0, 1 / 0); const joined = { version: 3, file: parsed.file, names, sources, sourcesContent, mappings, ignoreList }; return presortedDecodedMap(joined); }; function parse(map) { return 'string' == typeof map ? JSON.parse(map) : map; } function recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { const { sections } = input; for(let i = 0; i < sections.length; i++){ const { map, offset } = sections[i]; let sl = stopLine; let sc = stopColumn; if (i + 1 < sections.length) { const nextOffset = sections[i + 1].offset; sl = Math.min(stopLine, lineOffset + nextOffset.line); if (sl === stopLine) sc = Math.min(stopColumn, columnOffset + nextOffset.column); else if (sl < stopLine) sc = columnOffset + nextOffset.column; } addSection(map, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset + offset.line, columnOffset + offset.column, sl, sc); } } function addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) { const parsed = parse(input); if ('sections' in parsed) return recurse(...arguments); const map = new TraceMap(parsed, mapUrl); const sourcesOffset = sources.length; const namesOffset = names.length; const decoded = decodedMappings(map); const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map; append(sources, resolvedSources); append(names, map.names); if (contents) append(sourcesContent, contents); else for(let i = 0; i < resolvedSources.length; i++)sourcesContent.push(null); if (ignores) for(let i = 0; i < ignores.length; i++)ignoreList.push(ignores[i] + sourcesOffset); for(let i = 0; i < decoded.length; i++){ const lineI = lineOffset + i; if (lineI > stopLine) return; const out = getLine(mappings, lineI); const cOffset = 0 === i ? columnOffset : 0; const line = decoded[i]; for(let j = 0; j < line.length; j++){ const seg = line[j]; const column = cOffset + seg[COLUMN]; if (lineI === stopLine && column >= stopColumn) return; if (1 === seg.length) { out.push([ column ]); continue; }