import { $fetch } from "./chunk-UTNX7UL3.js"; import { init_module, module_exports, require_browser, require_browser2, require_child_process, require_fs, require_node_assert, require_node_fs, require_node_module, require_node_path, require_node_process, require_node_url, require_node_util, require_node_v8, require_path, require_promises, require_readline, require_stream } from "./chunk-IUIXJDPE.js"; import "./chunk-IASSU6T5.js"; import { require_url } from "./chunk-T7HZRRSX.js"; import "./chunk-FF6HMLO6.js"; import { __commonJS, __export, __toCommonJS, __toESM } from "./chunk-GFT2G5UO.js"; // node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js var require_sourcemap_codec_umd = __commonJS({ "node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js"(exports, module) { (function(global3, factory) { typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global3 = typeof globalThis !== "undefined" ? globalThis : global3 || self, factory(global3.sourcemapCodec = {})); })(exports, function(exports2) { "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 value = 0; let shift2 = 0; let integer2 = 0; do { const c = reader.next(); integer2 = charToInt[c]; value |= (integer2 & 31) << shift2; shift2 += 5; } while (integer2 & 32); const shouldNegate = value & 1; value >>>= 1; if (shouldNegate) { value = -2147483648 | -value; } return relative + value; } function encodeInteger(builder, num, relative) { let delta = num - relative; delta = delta < 0 ? -delta << 1 | 1 : delta << 1; do { let clamped = delta & 31; 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 = 1024 * 16; const td = typeof TextDecoder !== "undefined" ? new TextDecoder() : typeof Buffer !== "undefined" ? { 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 idx === -1 ? buffer.length : idx; } } const EMPTY = []; function decodeOriginalScopes(input) { const { length: length2 } = input; const reader = new StringReader(input); const scopes = []; const stack = []; let line = 0; for (; reader.pos < length2; reader.pos++) { line = decodeInteger(reader, line); const column = decodeInteger(reader, 0); if (!hasMoreVlq(reader, length2)) { const last = stack.pop(); last[2] = line; last[3] = column; continue; } const kind = decodeInteger(reader, 0); const fields = decodeInteger(reader, 0); const hasName = fields & 1; const scope = hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]; let vars = EMPTY; if (hasMoreVlq(reader, length2)) { vars = []; do { const varsIndex = decodeInteger(reader, 0); vars.push(varsIndex); } while (hasMoreVlq(reader, length2)); } 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 = scope.length === 6 ? 1 : 0; encodeInteger(writer, fields, 0); if (scope.length === 6) 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: length2 } = 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 = fields & 1; const hasCallsite = fields & 2; const hasScope = fields & 4; 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 < length2); return ranges; } function encodeGeneratedRanges(ranges) { if (ranges.length === 0) 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 = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0); encodeInteger(writer, fields, 0); if (range.length === 6) { 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 decode3(mappings) { const { length: length2 } = 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 <= length2); return decoded; } function sort(line) { line.sort(sortComparator); } function sortComparator(a, b) { return a[0] - b[0]; } function encode4(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 (line.length === 0) 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 (segment.length === 1) continue; sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex); sourceLine = encodeInteger(writer, segment[2], sourceLine); sourceColumn = encodeInteger(writer, segment[3], sourceColumn); if (segment.length === 4) continue; namesIndex = encodeInteger(writer, segment[4], namesIndex); } } return writer.flush(); } exports2.decode = decode3; exports2.decodeGeneratedRanges = decodeGeneratedRanges; exports2.decodeOriginalScopes = decodeOriginalScopes; exports2.encode = encode4; exports2.encodeGeneratedRanges = encodeGeneratedRanges; exports2.encodeOriginalScopes = encodeOriginalScopes; Object.defineProperty(exports2, "__esModule", { value: true }); }); } }); // node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/icon/defaults.cjs var require_defaults = __commonJS({ "node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/icon/defaults.cjs"(exports) { "use strict"; var defaultIconDimensions2 = Object.freeze( { left: 0, top: 0, width: 16, height: 16 } ); var defaultIconTransformations2 = Object.freeze({ rotate: 0, vFlip: false, hFlip: false }); var defaultIconProps2 = Object.freeze({ ...defaultIconDimensions2, ...defaultIconTransformations2 }); var defaultExtendedIconProps2 = Object.freeze({ ...defaultIconProps2, body: "", hidden: false }); exports.defaultExtendedIconProps = defaultExtendedIconProps2; exports.defaultIconDimensions = defaultIconDimensions2; exports.defaultIconProps = defaultIconProps2; exports.defaultIconTransformations = defaultIconTransformations2; } }); // node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/customisations/defaults.cjs var require_defaults2 = __commonJS({ "node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/customisations/defaults.cjs"(exports) { "use strict"; var icon_defaults = require_defaults(); var defaultIconSizeCustomisations2 = Object.freeze({ width: null, height: null }); var defaultIconCustomisations2 = Object.freeze({ // Dimensions ...defaultIconSizeCustomisations2, // Transformations ...icon_defaults.defaultIconTransformations }); exports.defaultIconCustomisations = defaultIconCustomisations2; exports.defaultIconSizeCustomisations = defaultIconSizeCustomisations2; } }); // node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/svg/size.cjs var require_size = __commonJS({ "node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/svg/size.cjs"(exports) { "use strict"; var unitsSplit2 = /(-?[0-9.]*[0-9]+[0-9.]*)/g; var unitsTest2 = /^-?[0-9.]*[0-9]+[0-9.]*$/g; function calculateSize2(size, ratio, precision) { if (ratio === 1) { return size; } precision = precision || 100; if (typeof size === "number") { return Math.ceil(size * ratio * precision) / precision; } if (typeof size !== "string") { return size; } const oldParts = size.split(unitsSplit2); if (oldParts === null || !oldParts.length) { return size; } const newParts = []; let code2 = oldParts.shift(); let isNumber = unitsTest2.test(code2); while (true) { if (isNumber) { const num = parseFloat(code2); if (isNaN(num)) { newParts.push(code2); } else { newParts.push(Math.ceil(num * ratio * precision) / precision); } } else { newParts.push(code2); } code2 = oldParts.shift(); if (code2 === void 0) { return newParts.join(""); } isNumber = !isNumber; } } exports.calculateSize = calculateSize2; } }); // node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/svg/defs.cjs var require_defs = __commonJS({ "node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/svg/defs.cjs"(exports) { "use strict"; function splitSVGDefs2(content, tag = "defs") { let defs = ""; const index = content.indexOf("<" + tag); while (index >= 0) { const start = content.indexOf(">", index); const end = content.indexOf("", end); if (endEnd === -1) { break; } defs += content.slice(start + 1, end).trim(); content = content.slice(0, index).trim() + content.slice(endEnd + 1); } return { defs, content }; } function mergeDefsAndContent2(defs, content) { return defs ? "" + defs + "" + content : content; } function wrapSVGContent2(body, start, end) { const split = splitSVGDefs2(body); return mergeDefsAndContent2(split.defs, start + split.content + end); } exports.mergeDefsAndContent = mergeDefsAndContent2; exports.splitSVGDefs = splitSVGDefs2; exports.wrapSVGContent = wrapSVGContent2; } }); // node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/svg/build.cjs var require_build = __commonJS({ "node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/svg/build.cjs"(exports) { "use strict"; var icon_defaults = require_defaults(); var customisations_defaults = require_defaults2(); var svg_size = require_size(); var svg_defs = require_defs(); var isUnsetKeyword2 = (value) => value === "unset" || value === "undefined" || value === "none"; function iconToSVG2(icon, customisations) { const fullIcon = { ...icon_defaults.defaultIconProps, ...icon }; const fullCustomisations = { ...customisations_defaults.defaultIconCustomisations, ...customisations }; const box = { left: fullIcon.left, top: fullIcon.top, width: fullIcon.width, height: fullIcon.height }; let body = fullIcon.body; [fullIcon, fullCustomisations].forEach((props) => { const transformations = []; const hFlip = props.hFlip; const vFlip = props.vFlip; let rotation = props.rotate; if (hFlip) { if (vFlip) { rotation += 2; } else { transformations.push( "translate(" + (box.width + box.left).toString() + " " + (0 - box.top).toString() + ")" ); transformations.push("scale(-1 1)"); box.top = box.left = 0; } } else if (vFlip) { transformations.push( "translate(" + (0 - box.left).toString() + " " + (box.height + box.top).toString() + ")" ); transformations.push("scale(1 -1)"); box.top = box.left = 0; } let tempValue; if (rotation < 0) { rotation -= Math.floor(rotation / 4) * 4; } rotation = rotation % 4; switch (rotation) { case 1: tempValue = box.height / 2 + box.top; transformations.unshift( "rotate(90 " + tempValue.toString() + " " + tempValue.toString() + ")" ); break; case 2: transformations.unshift( "rotate(180 " + (box.width / 2 + box.left).toString() + " " + (box.height / 2 + box.top).toString() + ")" ); break; case 3: tempValue = box.width / 2 + box.left; transformations.unshift( "rotate(-90 " + tempValue.toString() + " " + tempValue.toString() + ")" ); break; } if (rotation % 2 === 1) { if (box.left !== box.top) { tempValue = box.left; box.left = box.top; box.top = tempValue; } if (box.width !== box.height) { tempValue = box.width; box.width = box.height; box.height = tempValue; } } if (transformations.length) { body = svg_defs.wrapSVGContent( body, '', "" ); } }); const customisationsWidth = fullCustomisations.width; const customisationsHeight = fullCustomisations.height; const boxWidth = box.width; const boxHeight = box.height; let width2; let height2; if (customisationsWidth === null) { height2 = customisationsHeight === null ? "1em" : customisationsHeight === "auto" ? boxHeight : customisationsHeight; width2 = svg_size.calculateSize(height2, boxWidth / boxHeight); } else { width2 = customisationsWidth === "auto" ? boxWidth : customisationsWidth; height2 = customisationsHeight === null ? svg_size.calculateSize(width2, boxHeight / boxWidth) : customisationsHeight === "auto" ? boxHeight : customisationsHeight; } const attributes = {}; const setAttr = (prop, value) => { if (!isUnsetKeyword2(value)) { attributes[prop] = value.toString(); } }; setAttr("width", width2); setAttr("height", height2); const viewBox = [box.left, box.top, boxWidth, boxHeight]; attributes.viewBox = viewBox.join(" "); return { attributes, viewBox, body }; } exports.iconToSVG = iconToSVG2; exports.isUnsetKeyword = isUnsetKeyword2; } }); // node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/icon/transformations.cjs var require_transformations = __commonJS({ "node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/icon/transformations.cjs"(exports) { "use strict"; function mergeIconTransformations2(obj1, obj2) { const result = {}; if (!obj1.hFlip !== !obj2.hFlip) { result.hFlip = true; } if (!obj1.vFlip !== !obj2.vFlip) { result.vFlip = true; } const rotate = ((obj1.rotate || 0) + (obj2.rotate || 0)) % 4; if (rotate) { result.rotate = rotate; } return result; } exports.mergeIconTransformations = mergeIconTransformations2; } }); // node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/icon/merge.cjs var require_merge = __commonJS({ "node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/icon/merge.cjs"(exports) { "use strict"; var icon_defaults = require_defaults(); var icon_transformations = require_transformations(); function mergeIconData2(parent, child) { const result = icon_transformations.mergeIconTransformations(parent, child); for (const key in icon_defaults.defaultExtendedIconProps) { if (key in icon_defaults.defaultIconTransformations) { if (key in parent && !(key in result)) { result[key] = icon_defaults.defaultIconTransformations[key]; } } else if (key in child) { result[key] = child[key]; } else if (key in parent) { result[key] = parent[key]; } } return result; } exports.mergeIconData = mergeIconData2; } }); // node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/icon-set/tree.cjs var require_tree = __commonJS({ "node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/icon-set/tree.cjs"(exports) { "use strict"; function getIconsTree2(data, names) { const icons2 = data.icons; const aliases = data.aliases || /* @__PURE__ */ Object.create(null); const resolved = /* @__PURE__ */ Object.create(null); function resolve(name42) { if (icons2[name42]) { return resolved[name42] = []; } if (!(name42 in resolved)) { resolved[name42] = null; const parent = aliases[name42] && aliases[name42].parent; const value = parent && resolve(parent); if (value) { resolved[name42] = [parent].concat(value); } } return resolved[name42]; } (names || Object.keys(icons2).concat(Object.keys(aliases))).forEach(resolve); return resolved; } exports.getIconsTree = getIconsTree2; } }); // node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/icon-set/get-icon.cjs var require_get_icon = __commonJS({ "node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/icon-set/get-icon.cjs"(exports) { "use strict"; var icon_merge = require_merge(); var iconSet_tree = require_tree(); require_defaults(); require_transformations(); function internalGetIconData2(data, name42, tree) { const icons2 = data.icons; const aliases = data.aliases || /* @__PURE__ */ Object.create(null); let currentProps = {}; function parse44(name210) { currentProps = icon_merge.mergeIconData( icons2[name210] || aliases[name210], currentProps ); } parse44(name42); tree.forEach(parse44); return icon_merge.mergeIconData(data, currentProps); } function getIconData2(data, name42) { if (data.icons[name42]) { return internalGetIconData2(data, name42, []); } const tree = iconSet_tree.getIconsTree(data, [name42])[name42]; return tree ? internalGetIconData2(data, name42, tree) : null; } exports.getIconData = getIconData2; exports.internalGetIconData = internalGetIconData2; } }); // node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/loader/utils.cjs var require_utils = __commonJS({ "node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/loader/utils.cjs"(exports) { "use strict"; var svg_build = require_build(); var svg_size = require_size(); require_defaults(); require_defaults2(); require_defs(); var svgWidthRegex2 = /\swidth\s*=\s*["']([\w.]+)["']/; var svgHeightRegex2 = /\sheight\s*=\s*["']([\w.]+)["']/; var svgTagRegex2 = /")); const check = (prop, regex) => { const result = regex.exec(svgNode); const isSet = result != null; const propValue = props[prop]; if (!propValue && !svg_build.isUnsetKeyword(propValue)) { if (typeof scale === "number") { if (scale > 0) { props[prop] = svg_size.calculateSize( // Base on result from iconToSVG() or 1em result?.[1] ?? "1em", scale ); } } else if (result) { props[prop] = result[1]; } } return isSet; }; return [check("width", svgWidthRegex2), check("height", svgHeightRegex2)]; } async function mergeIconProps2(svg, collection, icon, options, propsProvider, afterCustomizations) { const { scale, addXmlNs = false } = options ?? {}; const { additionalProps = {}, iconCustomizer } = options?.customizations ?? {}; const props = await propsProvider?.() ?? {}; await iconCustomizer?.(collection, icon, props); Object.keys(additionalProps).forEach((p) => { const v = additionalProps[p]; if (v !== void 0 && v !== null) props[p] = v; }); afterCustomizations?.(props); const [widthOnSvg, heightOnSvg] = configureSvgSize2(svg, props, scale); if (addXmlNs) { if (!svg.includes("xmlns=") && !props["xmlns"]) { props["xmlns"] = "http://www.w3.org/2000/svg"; } if (!svg.includes("xmlns:xlink=") && svg.includes("xlink:") && !props["xmlns:xlink"]) { props["xmlns:xlink"] = "http://www.w3.org/1999/xlink"; } } const propsToAdd = Object.keys(props).map( (p) => p === "width" && widthOnSvg || p === "height" && heightOnSvg ? null : `${p}="${props[p]}"` ).filter((p) => p != null); if (propsToAdd.length) { svg = svg.replace(svgTagRegex2, ` { const v = props[p]; if (v !== void 0 && v !== null) usedProps[p] = v; }); if (typeof props.width !== "undefined" && props.width !== null) { usedProps.width = props.width; } if (typeof props.height !== "undefined" && props.height !== null) { usedProps.height = props.height; } } return svg; } function getPossibleIconNames(icon) { return [ icon, icon.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), icon.replace(/([a-z])(\d+)/g, "$1-$2") ]; } exports.getPossibleIconNames = getPossibleIconNames; exports.mergeIconProps = mergeIconProps2; } }); // node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/loader/modern.cjs var require_modern = __commonJS({ "node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/loader/modern.cjs"(exports) { "use strict"; var svg_build = require_build(); var iconSet_getIcon = require_get_icon(); var svg_size = require_size(); var loader_utils = require_utils(); var createDebugger = require_browser(); var customisations_defaults = require_defaults2(); require_defaults(); require_defs(); require_merge(); require_transformations(); require_tree(); function _interopDefaultCompat(e2) { return e2 && typeof e2 === "object" && "default" in e2 ? e2.default : e2; } var createDebugger__default = _interopDefaultCompat(createDebugger); var debug = createDebugger__default("@iconify-loader:icon"); async function searchForIcon2(iconSet, collection, ids, options) { let iconData; const { customize } = options?.customizations ?? {}; for (const id of ids) { iconData = iconSet_getIcon.getIconData(iconSet, id); if (iconData) { debug(`${collection}:${id}`); let defaultCustomizations = { ...customisations_defaults.defaultIconCustomisations }; if (typeof customize === "function") { iconData = Object.assign({}, iconData); defaultCustomizations = customize( defaultCustomizations, iconData, `${collection}:${id}` ) ?? defaultCustomizations; } const { attributes: { width: width2, height: height2, ...restAttributes }, body } = svg_build.iconToSVG(iconData, defaultCustomizations); const scale = options?.scale; return await loader_utils.mergeIconProps( // DON'T remove space on `${body}`, collection, id, options, () => { return { ...restAttributes }; }, (props) => { const check = (prop, defaultValue) => { const propValue = props[prop]; let value; if (!svg_build.isUnsetKeyword(propValue)) { if (propValue) { return; } if (typeof scale === "number") { if (scale) { value = svg_size.calculateSize( // Base on result from iconToSVG() or 1em defaultValue ?? "1em", scale ); } } else { value = defaultValue; } } if (!value) { delete props[prop]; } else { props[prop] = value; } }; check("width", width2); check("height", height2); } ); } } } exports.searchForIcon = searchForIcon2; } }); // node_modules/.pnpm/acorn@8.14.0/node_modules/acorn/dist/acorn.js var require_acorn = __commonJS({ "node_modules/.pnpm/acorn@8.14.0/node_modules/acorn/dist/acorn.js"(exports, module) { (function(global3, factory) { typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global3 = typeof globalThis !== "undefined" ? globalThis : global3 || self, factory(global3.acorn = {})); })(exports, function(exports2) { "use strict"; var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 7, 9, 32, 4, 318, 1, 80, 3, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 68, 8, 2, 0, 3, 0, 2, 3, 2, 4, 2, 0, 15, 1, 83, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 7, 19, 58, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 343, 9, 54, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 10, 5350, 0, 7, 14, 11465, 27, 2343, 9, 87, 9, 39, 4, 60, 6, 26, 9, 535, 9, 470, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4178, 9, 519, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 245, 1, 2, 9, 726, 6, 110, 6, 6, 9, 4759, 9, 787719, 239]; var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 4, 51, 13, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 39, 27, 10, 22, 251, 41, 7, 1, 17, 2, 60, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 31, 9, 2, 0, 3, 0, 2, 37, 2, 0, 26, 0, 2, 0, 45, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 200, 32, 32, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 26, 3994, 6, 582, 6842, 29, 1763, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 433, 44, 212, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 42, 9, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 229, 29, 3, 0, 496, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191]; var nonASCIIidentifierChars = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・"; var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"; var reservedWords = { 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", 5: "class enum extends super const export import", 6: "enum", strict: "implements interface let package private protected public static yield", strictBind: "eval arguments" }; var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"; var keywords$1 = { 5: ecma5AndLessKeywords, "5module": ecma5AndLessKeywords + " export import", 6: ecma5AndLessKeywords + " const class extends export import super" }; var keywordRelationalOperator = /^in(stanceof)?$/; var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); function isInAstralSet(code2, set) { var pos = 65536; for (var i2 = 0; i2 < set.length; i2 += 2) { pos += set[i2]; if (pos > code2) { return false; } pos += set[i2 + 1]; if (pos >= code2) { return true; } } return false; } function isIdentifierStart2(code2, astral) { if (code2 < 65) { return code2 === 36; } if (code2 < 91) { return true; } if (code2 < 97) { return code2 === 95; } if (code2 < 123) { return true; } if (code2 <= 65535) { return code2 >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code2)); } if (astral === false) { return false; } return isInAstralSet(code2, astralIdentifierStartCodes); } function isIdentifierChar(code2, astral) { if (code2 < 48) { return code2 === 36; } if (code2 < 58) { return true; } if (code2 < 65) { return false; } if (code2 < 91) { return true; } if (code2 < 97) { return code2 === 95; } if (code2 < 123) { return true; } if (code2 <= 65535) { return code2 >= 170 && nonASCIIidentifier.test(String.fromCharCode(code2)); } if (astral === false) { return false; } return isInAstralSet(code2, astralIdentifierStartCodes) || isInAstralSet(code2, astralIdentifierCodes); } var TokenType = function TokenType2(label, conf) { if (conf === void 0) conf = {}; this.label = label; this.keyword = conf.keyword; this.beforeExpr = !!conf.beforeExpr; this.startsExpr = !!conf.startsExpr; this.isLoop = !!conf.isLoop; this.isAssign = !!conf.isAssign; this.prefix = !!conf.prefix; this.postfix = !!conf.postfix; this.binop = conf.binop || null; this.updateContext = null; }; function binop(name42, prec) { return new TokenType(name42, { beforeExpr: true, binop: prec }); } var beforeExpr = { beforeExpr: true }, startsExpr = { startsExpr: true }; var keywords2 = {}; function kw(name42, options) { if (options === void 0) options = {}; options.keyword = name42; return keywords2[name42] = new TokenType(name42, options); } var types$1 = { num: new TokenType("num", startsExpr), regexp: new TokenType("regexp", startsExpr), string: new TokenType("string", startsExpr), name: new TokenType("name", startsExpr), privateId: new TokenType("privateId", startsExpr), eof: new TokenType("eof"), // Punctuation token types. bracketL: new TokenType("[", { beforeExpr: true, startsExpr: true }), bracketR: new TokenType("]"), braceL: new TokenType("{", { beforeExpr: true, startsExpr: true }), braceR: new TokenType("}"), parenL: new TokenType("(", { beforeExpr: true, startsExpr: true }), parenR: new TokenType(")"), comma: new TokenType(",", beforeExpr), semi: new TokenType(";", beforeExpr), colon: new TokenType(":", beforeExpr), dot: new TokenType("."), question: new TokenType("?", beforeExpr), questionDot: new TokenType("?."), arrow: new TokenType("=>", beforeExpr), template: new TokenType("template"), invalidTemplate: new TokenType("invalidTemplate"), ellipsis: new TokenType("...", beforeExpr), backQuote: new TokenType("`", startsExpr), dollarBraceL: new TokenType("${", { beforeExpr: true, startsExpr: true }), // Operators. These carry several kinds of properties to help the // parser use them properly (the presence of these properties is // what categorizes them as operators). // // `binop`, when present, specifies that this operator is a binary // operator, and will refer to its precedence. // // `prefix` and `postfix` mark the operator as a prefix or postfix // unary operator. // // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as // binary operators with a very low precedence, that should result // in AssignmentExpression nodes. eq: new TokenType("=", { beforeExpr: true, isAssign: true }), assign: new TokenType("_=", { beforeExpr: true, isAssign: true }), incDec: new TokenType("++/--", { prefix: true, postfix: true, startsExpr: true }), prefix: new TokenType("!/~", { beforeExpr: true, prefix: true, startsExpr: true }), logicalOR: binop("||", 1), logicalAND: binop("&&", 2), bitwiseOR: binop("|", 3), bitwiseXOR: binop("^", 4), bitwiseAND: binop("&", 5), equality: binop("==/!=/===/!==", 6), relational: binop("/<=/>=", 7), bitShift: binop("<>/>>>", 8), plusMin: new TokenType("+/-", { beforeExpr: true, binop: 9, prefix: true, startsExpr: true }), modulo: binop("%", 10), star: binop("*", 10), slash: binop("/", 10), starstar: new TokenType("**", { beforeExpr: true }), coalesce: binop("??", 1), // Keyword token types. _break: kw("break"), _case: kw("case", beforeExpr), _catch: kw("catch"), _continue: kw("continue"), _debugger: kw("debugger"), _default: kw("default", beforeExpr), _do: kw("do", { isLoop: true, beforeExpr: true }), _else: kw("else", beforeExpr), _finally: kw("finally"), _for: kw("for", { isLoop: true }), _function: kw("function", startsExpr), _if: kw("if"), _return: kw("return", beforeExpr), _switch: kw("switch"), _throw: kw("throw", beforeExpr), _try: kw("try"), _var: kw("var"), _const: kw("const"), _while: kw("while", { isLoop: true }), _with: kw("with"), _new: kw("new", { beforeExpr: true, startsExpr: true }), _this: kw("this", startsExpr), _super: kw("super", startsExpr), _class: kw("class", startsExpr), _extends: kw("extends", beforeExpr), _export: kw("export"), _import: kw("import", startsExpr), _null: kw("null", startsExpr), _true: kw("true", startsExpr), _false: kw("false", startsExpr), _in: kw("in", { beforeExpr: true, binop: 7 }), _instanceof: kw("instanceof", { beforeExpr: true, binop: 7 }), _typeof: kw("typeof", { beforeExpr: true, prefix: true, startsExpr: true }), _void: kw("void", { beforeExpr: true, prefix: true, startsExpr: true }), _delete: kw("delete", { beforeExpr: true, prefix: true, startsExpr: true }) }; var lineBreak = /\r\n?|\n|\u2028|\u2029/; var lineBreakG = new RegExp(lineBreak.source, "g"); function isNewLine(code2) { return code2 === 10 || code2 === 13 || code2 === 8232 || code2 === 8233; } function nextLineBreak(code2, from, end) { if (end === void 0) end = code2.length; for (var i2 = from; i2 < end; i2++) { var next = code2.charCodeAt(i2); if (isNewLine(next)) { return i2 < end - 1 && next === 13 && code2.charCodeAt(i2 + 1) === 10 ? i2 + 2 : i2 + 1; } } return -1; } var nonASCIIwhitespace = /[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/; var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g; var ref = Object.prototype; var hasOwnProperty5 = ref.hasOwnProperty; var toString2 = ref.toString; var hasOwn = Object.hasOwn || function(obj, propName) { return hasOwnProperty5.call(obj, propName); }; var isArray = Array.isArray || function(obj) { return toString2.call(obj) === "[object Array]"; }; var regexpCache = /* @__PURE__ */ Object.create(null); function wordsRegexp(words) { return regexpCache[words] || (regexpCache[words] = new RegExp("^(?:" + words.replace(/ /g, "|") + ")$")); } function codePointToString(code2) { if (code2 <= 65535) { return String.fromCharCode(code2); } code2 -= 65536; return String.fromCharCode((code2 >> 10) + 55296, (code2 & 1023) + 56320); } var loneSurrogate = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/; var Position = function Position2(line, col) { this.line = line; this.column = col; }; Position.prototype.offset = function offset(n2) { return new Position(this.line, this.column + n2); }; var SourceLocation = function SourceLocation2(p, start, end) { this.start = start; this.end = end; if (p.sourceFile !== null) { this.source = p.sourceFile; } }; function getLineInfo(input, offset) { for (var line = 1, cur = 0; ; ) { var nextBreak = nextLineBreak(input, cur, offset); if (nextBreak < 0) { return new Position(line, offset - cur); } ++line; cur = nextBreak; } } var defaultOptions = { // `ecmaVersion` indicates the ECMAScript version to parse. Must be // either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 // (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"` // (the latest version the library supports). This influences // support for strict mode, the set of reserved words, and support // for new syntax features. ecmaVersion: null, // `sourceType` indicates the mode the code should be parsed in. // Can be either `"script"` or `"module"`. This influences global // strict mode and parsing of `import` and `export` declarations. sourceType: "script", // `onInsertedSemicolon` can be a callback that will be called when // a semicolon is automatically inserted. It will be passed the // position of the inserted semicolon as an offset, and if // `locations` is enabled, it is given the location as a `{line, // column}` object as second argument. onInsertedSemicolon: null, // `onTrailingComma` is similar to `onInsertedSemicolon`, but for // trailing commas. onTrailingComma: null, // By default, reserved words are only enforced if ecmaVersion >= 5. // Set `allowReserved` to a boolean value to explicitly turn this on // an off. When this option has the value "never", reserved words // and keywords can also not be used as property names. allowReserved: null, // When enabled, a return at the top level is not considered an // error. allowReturnOutsideFunction: false, // When enabled, import/export statements are not constrained to // appearing at the top of the program, and an import.meta expression // in a script isn't considered an error. allowImportExportEverywhere: false, // By default, await identifiers are allowed to appear at the top-level scope only if ecmaVersion >= 2022. // When enabled, await identifiers are allowed to appear at the top-level scope, // but they are still not allowed in non-async functions. allowAwaitOutsideFunction: null, // When enabled, super identifiers are not constrained to // appearing in methods and do not raise an error when they appear elsewhere. allowSuperOutsideMethod: null, // When enabled, hashbang directive in the beginning of file is // allowed and treated as a line comment. Enabled by default when // `ecmaVersion` >= 2023. allowHashBang: false, // By default, the parser will verify that private properties are // only used in places where they are valid and have been declared. // Set this to false to turn such checks off. checkPrivateFields: true, // When `locations` is on, `loc` properties holding objects with // `start` and `end` properties in `{line, column}` form (with // line being 1-based and column 0-based) will be attached to the // nodes. locations: false, // A function can be passed as `onToken` option, which will // cause Acorn to call that function with object in the same // format as tokens returned from `tokenizer().getToken()`. Note // that you are not allowed to call the parser from the // callback—that will corrupt its internal state. onToken: null, // A function can be passed as `onComment` option, which will // cause Acorn to call that function with `(block, text, start, // end)` parameters whenever a comment is skipped. `block` is a // boolean indicating whether this is a block (`/* */`) comment, // `text` is the content of the comment, and `start` and `end` are // character offsets that denote the start and end of the comment. // When the `locations` option is on, two more parameters are // passed, the full `{line, column}` locations of the start and // end of the comments. Note that you are not allowed to call the // parser from the callback—that will corrupt its internal state. // When this option has an array as value, objects representing the // comments are pushed to it. onComment: null, // Nodes have their start and end characters offsets recorded in // `start` and `end` properties (directly on the node, rather than // the `loc` object, which holds line/column data. To also add a // [semi-standardized][range] `range` property holding a `[start, // end]` array with the same numbers, set the `ranges` option to // `true`. // // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 ranges: false, // It is possible to parse multiple files into a single AST by // passing the tree produced by parsing the first file as // `program` option in subsequent parses. This will add the // toplevel forms of the parsed file to the `Program` (top) node // of an existing parse tree. program: null, // When `locations` is on, you can pass this to record the source // file in every node's `loc` object. sourceFile: null, // This value, if given, is stored in every node, whether // `locations` is on or off. directSourceFile: null, // When enabled, parenthesized expressions are represented by // (non-standard) ParenthesizedExpression nodes preserveParens: false }; var warnedAboutEcmaVersion = false; function getOptions(opts) { var options = {}; for (var opt in defaultOptions) { options[opt] = opts && hasOwn(opts, opt) ? opts[opt] : defaultOptions[opt]; } if (options.ecmaVersion === "latest") { options.ecmaVersion = 1e8; } else if (options.ecmaVersion == null) { if (!warnedAboutEcmaVersion && typeof console === "object" && console.warn) { warnedAboutEcmaVersion = true; console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future."); } options.ecmaVersion = 11; } else if (options.ecmaVersion >= 2015) { options.ecmaVersion -= 2009; } if (options.allowReserved == null) { options.allowReserved = options.ecmaVersion < 5; } if (!opts || opts.allowHashBang == null) { options.allowHashBang = options.ecmaVersion >= 14; } if (isArray(options.onToken)) { var tokens = options.onToken; options.onToken = function(token) { return tokens.push(token); }; } if (isArray(options.onComment)) { options.onComment = pushComment(options, options.onComment); } return options; } function pushComment(options, array) { return function(block, text, start, end, startLoc, endLoc) { var comment = { type: block ? "Block" : "Line", value: text, start, end }; if (options.locations) { comment.loc = new SourceLocation(this, startLoc, endLoc); } if (options.ranges) { comment.range = [start, end]; } array.push(comment); }; } var SCOPE_TOP = 1, SCOPE_FUNCTION = 2, SCOPE_ASYNC = 4, SCOPE_GENERATOR = 8, SCOPE_ARROW = 16, SCOPE_SIMPLE_CATCH = 32, SCOPE_SUPER = 64, SCOPE_DIRECT_SUPER = 128, SCOPE_CLASS_STATIC_BLOCK = 256, SCOPE_VAR = SCOPE_TOP | SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK; function functionFlags(async, generator) { return SCOPE_FUNCTION | (async ? SCOPE_ASYNC : 0) | (generator ? SCOPE_GENERATOR : 0); } var BIND_NONE = 0, BIND_VAR = 1, BIND_LEXICAL = 2, BIND_FUNCTION = 3, BIND_SIMPLE_CATCH = 4, BIND_OUTSIDE = 5; var Parser = function Parser2(options, input, startPos) { this.options = options = getOptions(options); this.sourceFile = options.sourceFile; this.keywords = wordsRegexp(keywords$1[options.ecmaVersion >= 6 ? 6 : options.sourceType === "module" ? "5module" : 5]); var reserved = ""; if (options.allowReserved !== true) { reserved = reservedWords[options.ecmaVersion >= 6 ? 6 : options.ecmaVersion === 5 ? 5 : 3]; if (options.sourceType === "module") { reserved += " await"; } } this.reservedWords = wordsRegexp(reserved); var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict; this.reservedWordsStrict = wordsRegexp(reservedStrict); this.reservedWordsStrictBind = wordsRegexp(reservedStrict + " " + reservedWords.strictBind); this.input = String(input); this.containsEsc = false; if (startPos) { this.pos = startPos; this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1; this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length; } else { this.pos = this.lineStart = 0; this.curLine = 1; } this.type = types$1.eof; this.value = null; this.start = this.end = this.pos; this.startLoc = this.endLoc = this.curPosition(); this.lastTokEndLoc = this.lastTokStartLoc = null; this.lastTokStart = this.lastTokEnd = this.pos; this.context = this.initialContext(); this.exprAllowed = true; this.inModule = options.sourceType === "module"; this.strict = this.inModule || this.strictDirective(this.pos); this.potentialArrowAt = -1; this.potentialArrowInForAwait = false; this.yieldPos = this.awaitPos = this.awaitIdentPos = 0; this.labels = []; this.undefinedExports = /* @__PURE__ */ Object.create(null); if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === "#!") { this.skipLineComment(2); } this.scopeStack = []; this.enterScope(SCOPE_TOP); this.regexpState = null; this.privateNameStack = []; }; var prototypeAccessors = { inFunction: { configurable: true }, inGenerator: { configurable: true }, inAsync: { configurable: true }, canAwait: { configurable: true }, allowSuper: { configurable: true }, allowDirectSuper: { configurable: true }, treatFunctionsAsVar: { configurable: true }, allowNewDotTarget: { configurable: true }, inClassStaticBlock: { configurable: true } }; Parser.prototype.parse = function parse45() { var node = this.options.program || this.startNode(); this.nextToken(); return this.parseTopLevel(node); }; prototypeAccessors.inFunction.get = function() { return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0; }; prototypeAccessors.inGenerator.get = function() { return (this.currentVarScope().flags & SCOPE_GENERATOR) > 0 && !this.currentVarScope().inClassFieldInit; }; prototypeAccessors.inAsync.get = function() { return (this.currentVarScope().flags & SCOPE_ASYNC) > 0 && !this.currentVarScope().inClassFieldInit; }; prototypeAccessors.canAwait.get = function() { for (var i2 = this.scopeStack.length - 1; i2 >= 0; i2--) { var scope = this.scopeStack[i2]; if (scope.inClassFieldInit || scope.flags & SCOPE_CLASS_STATIC_BLOCK) { return false; } if (scope.flags & SCOPE_FUNCTION) { return (scope.flags & SCOPE_ASYNC) > 0; } } return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction; }; prototypeAccessors.allowSuper.get = function() { var ref2 = this.currentThisScope(); var flags = ref2.flags; var inClassFieldInit = ref2.inClassFieldInit; return (flags & SCOPE_SUPER) > 0 || inClassFieldInit || this.options.allowSuperOutsideMethod; }; prototypeAccessors.allowDirectSuper.get = function() { return (this.currentThisScope().flags & SCOPE_DIRECT_SUPER) > 0; }; prototypeAccessors.treatFunctionsAsVar.get = function() { return this.treatFunctionsAsVarInScope(this.currentScope()); }; prototypeAccessors.allowNewDotTarget.get = function() { var ref2 = this.currentThisScope(); var flags = ref2.flags; var inClassFieldInit = ref2.inClassFieldInit; return (flags & (SCOPE_FUNCTION | SCOPE_CLASS_STATIC_BLOCK)) > 0 || inClassFieldInit; }; prototypeAccessors.inClassStaticBlock.get = function() { return (this.currentVarScope().flags & SCOPE_CLASS_STATIC_BLOCK) > 0; }; Parser.extend = function extend() { var plugins = [], len = arguments.length; while (len--) plugins[len] = arguments[len]; var cls = this; for (var i2 = 0; i2 < plugins.length; i2++) { cls = plugins[i2](cls); } return cls; }; Parser.parse = function parse45(input, options) { return new this(options, input).parse(); }; Parser.parseExpressionAt = function parseExpressionAt2(input, pos, options) { var parser = new this(options, input, pos); parser.nextToken(); return parser.parseExpression(); }; Parser.tokenizer = function tokenizer2(input, options) { return new this(options, input); }; Object.defineProperties(Parser.prototype, prototypeAccessors); var pp$9 = Parser.prototype; var literal = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/; pp$9.strictDirective = function(start) { if (this.options.ecmaVersion < 5) { return false; } for (; ; ) { skipWhiteSpace.lastIndex = start; start += skipWhiteSpace.exec(this.input)[0].length; var match = literal.exec(this.input.slice(start)); if (!match) { return false; } if ((match[1] || match[2]) === "use strict") { skipWhiteSpace.lastIndex = start + match[0].length; var spaceAfter = skipWhiteSpace.exec(this.input), end = spaceAfter.index + spaceAfter[0].length; var next = this.input.charAt(end); return next === ";" || next === "}" || lineBreak.test(spaceAfter[0]) && !(/[(`.[+\-/*%<>=,?^&]/.test(next) || next === "!" && this.input.charAt(end + 1) === "="); } start += match[0].length; skipWhiteSpace.lastIndex = start; start += skipWhiteSpace.exec(this.input)[0].length; if (this.input[start] === ";") { start++; } } }; pp$9.eat = function(type) { if (this.type === type) { this.next(); return true; } else { return false; } }; pp$9.isContextual = function(name42) { return this.type === types$1.name && this.value === name42 && !this.containsEsc; }; pp$9.eatContextual = function(name42) { if (!this.isContextual(name42)) { return false; } this.next(); return true; }; pp$9.expectContextual = function(name42) { if (!this.eatContextual(name42)) { this.unexpected(); } }; pp$9.canInsertSemicolon = function() { return this.type === types$1.eof || this.type === types$1.braceR || lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); }; pp$9.insertSemicolon = function() { if (this.canInsertSemicolon()) { if (this.options.onInsertedSemicolon) { this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc); } return true; } }; pp$9.semicolon = function() { if (!this.eat(types$1.semi) && !this.insertSemicolon()) { this.unexpected(); } }; pp$9.afterTrailingComma = function(tokType, notNext) { if (this.type === tokType) { if (this.options.onTrailingComma) { this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc); } if (!notNext) { this.next(); } return true; } }; pp$9.expect = function(type) { this.eat(type) || this.unexpected(); }; pp$9.unexpected = function(pos) { this.raise(pos != null ? pos : this.start, "Unexpected token"); }; var DestructuringErrors = function DestructuringErrors2() { this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = this.doubleProto = -1; }; pp$9.checkPatternErrors = function(refDestructuringErrors, isAssign) { if (!refDestructuringErrors) { return; } if (refDestructuringErrors.trailingComma > -1) { this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); } var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind; if (parens > -1) { this.raiseRecoverable(parens, isAssign ? "Assigning to rvalue" : "Parenthesized pattern"); } }; pp$9.checkExpressionErrors = function(refDestructuringErrors, andThrow) { if (!refDestructuringErrors) { return false; } var shorthandAssign = refDestructuringErrors.shorthandAssign; var doubleProto = refDestructuringErrors.doubleProto; if (!andThrow) { return shorthandAssign >= 0 || doubleProto >= 0; } if (shorthandAssign >= 0) { this.raise(shorthandAssign, "Shorthand property assignments are valid only in destructuring patterns"); } if (doubleProto >= 0) { this.raiseRecoverable(doubleProto, "Redefinition of __proto__ property"); } }; pp$9.checkYieldAwaitInDefaultParams = function() { if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) { this.raise(this.yieldPos, "Yield expression cannot be a default value"); } if (this.awaitPos) { this.raise(this.awaitPos, "Await expression cannot be a default value"); } }; pp$9.isSimpleAssignTarget = function(expr) { if (expr.type === "ParenthesizedExpression") { return this.isSimpleAssignTarget(expr.expression); } return expr.type === "Identifier" || expr.type === "MemberExpression"; }; var pp$8 = Parser.prototype; pp$8.parseTopLevel = function(node) { var exports3 = /* @__PURE__ */ Object.create(null); if (!node.body) { node.body = []; } while (this.type !== types$1.eof) { var stmt = this.parseStatement(null, true, exports3); node.body.push(stmt); } if (this.inModule) { for (var i2 = 0, list2 = Object.keys(this.undefinedExports); i2 < list2.length; i2 += 1) { var name42 = list2[i2]; this.raiseRecoverable(this.undefinedExports[name42].start, "Export '" + name42 + "' is not defined"); } } this.adaptDirectivePrologue(node.body); this.next(); node.sourceType = this.options.sourceType; return this.finishNode(node, "Program"); }; var loopLabel = { kind: "loop" }, switchLabel = { kind: "switch" }; pp$8.isLet = function(context) { if (this.options.ecmaVersion < 6 || !this.isContextual("let")) { return false; } skipWhiteSpace.lastIndex = this.pos; var skip = skipWhiteSpace.exec(this.input); var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); if (nextCh === 91 || nextCh === 92) { return true; } if (context) { return false; } if (nextCh === 123 || nextCh > 55295 && nextCh < 56320) { return true; } if (isIdentifierStart2(nextCh, true)) { var pos = next + 1; while (isIdentifierChar(nextCh = this.input.charCodeAt(pos), true)) { ++pos; } if (nextCh === 92 || nextCh > 55295 && nextCh < 56320) { return true; } var ident = this.input.slice(next, pos); if (!keywordRelationalOperator.test(ident)) { return true; } } return false; }; pp$8.isAsyncFunction = function() { if (this.options.ecmaVersion < 8 || !this.isContextual("async")) { return false; } skipWhiteSpace.lastIndex = this.pos; var skip = skipWhiteSpace.exec(this.input); var next = this.pos + skip[0].length, after; return !lineBreak.test(this.input.slice(this.pos, next)) && this.input.slice(next, next + 8) === "function" && (next + 8 === this.input.length || !(isIdentifierChar(after = this.input.charCodeAt(next + 8)) || after > 55295 && after < 56320)); }; pp$8.parseStatement = function(context, topLevel, exports3) { var starttype = this.type, node = this.startNode(), kind; if (this.isLet(context)) { starttype = types$1._var; kind = "let"; } switch (starttype) { case types$1._break: case types$1._continue: return this.parseBreakContinueStatement(node, starttype.keyword); case types$1._debugger: return this.parseDebuggerStatement(node); case types$1._do: return this.parseDoStatement(node); case types$1._for: return this.parseForStatement(node); case types$1._function: if (context && (this.strict || context !== "if" && context !== "label") && this.options.ecmaVersion >= 6) { this.unexpected(); } return this.parseFunctionStatement(node, false, !context); case types$1._class: if (context) { this.unexpected(); } return this.parseClass(node, true); case types$1._if: return this.parseIfStatement(node); case types$1._return: return this.parseReturnStatement(node); case types$1._switch: return this.parseSwitchStatement(node); case types$1._throw: return this.parseThrowStatement(node); case types$1._try: return this.parseTryStatement(node); case types$1._const: case types$1._var: kind = kind || this.value; if (context && kind !== "var") { this.unexpected(); } return this.parseVarStatement(node, kind); case types$1._while: return this.parseWhileStatement(node); case types$1._with: return this.parseWithStatement(node); case types$1.braceL: return this.parseBlock(true, node); case types$1.semi: return this.parseEmptyStatement(node); case types$1._export: case types$1._import: if (this.options.ecmaVersion > 10 && starttype === types$1._import) { skipWhiteSpace.lastIndex = this.pos; var skip = skipWhiteSpace.exec(this.input); var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next); if (nextCh === 40 || nextCh === 46) { return this.parseExpressionStatement(node, this.parseExpression()); } } if (!this.options.allowImportExportEverywhere) { if (!topLevel) { this.raise(this.start, "'import' and 'export' may only appear at the top level"); } if (!this.inModule) { this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'"); } } return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports3); default: if (this.isAsyncFunction()) { if (context) { this.unexpected(); } this.next(); return this.parseFunctionStatement(node, true, !context); } var maybeName = this.value, expr = this.parseExpression(); if (starttype === types$1.name && expr.type === "Identifier" && this.eat(types$1.colon)) { return this.parseLabeledStatement(node, maybeName, expr, context); } else { return this.parseExpressionStatement(node, expr); } } }; pp$8.parseBreakContinueStatement = function(node, keyword2) { var isBreak = keyword2 === "break"; this.next(); if (this.eat(types$1.semi) || this.insertSemicolon()) { node.label = null; } else if (this.type !== types$1.name) { this.unexpected(); } else { node.label = this.parseIdent(); this.semicolon(); } var i2 = 0; for (; i2 < this.labels.length; ++i2) { var lab = this.labels[i2]; if (node.label == null || lab.name === node.label.name) { if (lab.kind != null && (isBreak || lab.kind === "loop")) { break; } if (node.label && isBreak) { break; } } } if (i2 === this.labels.length) { this.raise(node.start, "Unsyntactic " + keyword2); } return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); }; pp$8.parseDebuggerStatement = function(node) { this.next(); this.semicolon(); return this.finishNode(node, "DebuggerStatement"); }; pp$8.parseDoStatement = function(node) { this.next(); this.labels.push(loopLabel); node.body = this.parseStatement("do"); this.labels.pop(); this.expect(types$1._while); node.test = this.parseParenExpression(); if (this.options.ecmaVersion >= 6) { this.eat(types$1.semi); } else { this.semicolon(); } return this.finishNode(node, "DoWhileStatement"); }; pp$8.parseForStatement = function(node) { this.next(); var awaitAt = this.options.ecmaVersion >= 9 && this.canAwait && this.eatContextual("await") ? this.lastTokStart : -1; this.labels.push(loopLabel); this.enterScope(0); this.expect(types$1.parenL); if (this.type === types$1.semi) { if (awaitAt > -1) { this.unexpected(awaitAt); } return this.parseFor(node, null); } var isLet = this.isLet(); if (this.type === types$1._var || this.type === types$1._const || isLet) { var init$1 = this.startNode(), kind = isLet ? "let" : this.value; this.next(); this.parseVar(init$1, true, kind); this.finishNode(init$1, "VariableDeclaration"); if ((this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init$1.declarations.length === 1) { if (this.options.ecmaVersion >= 9) { if (this.type === types$1._in) { if (awaitAt > -1) { this.unexpected(awaitAt); } } else { node.await = awaitAt > -1; } } return this.parseForIn(node, init$1); } if (awaitAt > -1) { this.unexpected(awaitAt); } return this.parseFor(node, init$1); } var startsWithLet = this.isContextual("let"), isForOf = false; var containsEsc = this.containsEsc; var refDestructuringErrors = new DestructuringErrors(); var initPos = this.start; var init = awaitAt > -1 ? this.parseExprSubscripts(refDestructuringErrors, "await") : this.parseExpression(true, refDestructuringErrors); if (this.type === types$1._in || (isForOf = this.options.ecmaVersion >= 6 && this.isContextual("of"))) { if (awaitAt > -1) { if (this.type === types$1._in) { this.unexpected(awaitAt); } node.await = true; } else if (isForOf && this.options.ecmaVersion >= 8) { if (init.start === initPos && !containsEsc && init.type === "Identifier" && init.name === "async") { this.unexpected(); } else if (this.options.ecmaVersion >= 9) { node.await = false; } } if (startsWithLet && isForOf) { this.raise(init.start, "The left-hand side of a for-of loop may not start with 'let'."); } this.toAssignable(init, false, refDestructuringErrors); this.checkLValPattern(init); return this.parseForIn(node, init); } else { this.checkExpressionErrors(refDestructuringErrors, true); } if (awaitAt > -1) { this.unexpected(awaitAt); } return this.parseFor(node, init); }; pp$8.parseFunctionStatement = function(node, isAsync, declarationPosition) { this.next(); return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), false, isAsync); }; pp$8.parseIfStatement = function(node) { this.next(); node.test = this.parseParenExpression(); node.consequent = this.parseStatement("if"); node.alternate = this.eat(types$1._else) ? this.parseStatement("if") : null; return this.finishNode(node, "IfStatement"); }; pp$8.parseReturnStatement = function(node) { if (!this.inFunction && !this.options.allowReturnOutsideFunction) { this.raise(this.start, "'return' outside of function"); } this.next(); if (this.eat(types$1.semi) || this.insertSemicolon()) { node.argument = null; } else { node.argument = this.parseExpression(); this.semicolon(); } return this.finishNode(node, "ReturnStatement"); }; pp$8.parseSwitchStatement = function(node) { this.next(); node.discriminant = this.parseParenExpression(); node.cases = []; this.expect(types$1.braceL); this.labels.push(switchLabel); this.enterScope(0); var cur; for (var sawDefault = false; this.type !== types$1.braceR; ) { if (this.type === types$1._case || this.type === types$1._default) { var isCase = this.type === types$1._case; if (cur) { this.finishNode(cur, "SwitchCase"); } node.cases.push(cur = this.startNode()); cur.consequent = []; this.next(); if (isCase) { cur.test = this.parseExpression(); } else { if (sawDefault) { this.raiseRecoverable(this.lastTokStart, "Multiple default clauses"); } sawDefault = true; cur.test = null; } this.expect(types$1.colon); } else { if (!cur) { this.unexpected(); } cur.consequent.push(this.parseStatement(null)); } } this.exitScope(); if (cur) { this.finishNode(cur, "SwitchCase"); } this.next(); this.labels.pop(); return this.finishNode(node, "SwitchStatement"); }; pp$8.parseThrowStatement = function(node) { this.next(); if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) { this.raise(this.lastTokEnd, "Illegal newline after throw"); } node.argument = this.parseExpression(); this.semicolon(); return this.finishNode(node, "ThrowStatement"); }; var empty$1 = []; pp$8.parseCatchClauseParam = function() { var param = this.parseBindingAtom(); var simple = param.type === "Identifier"; this.enterScope(simple ? SCOPE_SIMPLE_CATCH : 0); this.checkLValPattern(param, simple ? BIND_SIMPLE_CATCH : BIND_LEXICAL); this.expect(types$1.parenR); return param; }; pp$8.parseTryStatement = function(node) { this.next(); node.block = this.parseBlock(); node.handler = null; if (this.type === types$1._catch) { var clause = this.startNode(); this.next(); if (this.eat(types$1.parenL)) { clause.param = this.parseCatchClauseParam(); } else { if (this.options.ecmaVersion < 10) { this.unexpected(); } clause.param = null; this.enterScope(0); } clause.body = this.parseBlock(false); this.exitScope(); node.handler = this.finishNode(clause, "CatchClause"); } node.finalizer = this.eat(types$1._finally) ? this.parseBlock() : null; if (!node.handler && !node.finalizer) { this.raise(node.start, "Missing catch or finally clause"); } return this.finishNode(node, "TryStatement"); }; pp$8.parseVarStatement = function(node, kind, allowMissingInitializer) { this.next(); this.parseVar(node, false, kind, allowMissingInitializer); this.semicolon(); return this.finishNode(node, "VariableDeclaration"); }; pp$8.parseWhileStatement = function(node) { this.next(); node.test = this.parseParenExpression(); this.labels.push(loopLabel); node.body = this.parseStatement("while"); this.labels.pop(); return this.finishNode(node, "WhileStatement"); }; pp$8.parseWithStatement = function(node) { if (this.strict) { this.raise(this.start, "'with' in strict mode"); } this.next(); node.object = this.parseParenExpression(); node.body = this.parseStatement("with"); return this.finishNode(node, "WithStatement"); }; pp$8.parseEmptyStatement = function(node) { this.next(); return this.finishNode(node, "EmptyStatement"); }; pp$8.parseLabeledStatement = function(node, maybeName, expr, context) { for (var i$1 = 0, list2 = this.labels; i$1 < list2.length; i$1 += 1) { var label = list2[i$1]; if (label.name === maybeName) { this.raise(expr.start, "Label '" + maybeName + "' is already declared"); } } var kind = this.type.isLoop ? "loop" : this.type === types$1._switch ? "switch" : null; for (var i2 = this.labels.length - 1; i2 >= 0; i2--) { var label$1 = this.labels[i2]; if (label$1.statementStart === node.start) { label$1.statementStart = this.start; label$1.kind = kind; } else { break; } } this.labels.push({ name: maybeName, kind, statementStart: this.start }); node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label"); this.labels.pop(); node.label = expr; return this.finishNode(node, "LabeledStatement"); }; pp$8.parseExpressionStatement = function(node, expr) { node.expression = expr; this.semicolon(); return this.finishNode(node, "ExpressionStatement"); }; pp$8.parseBlock = function(createNewLexicalScope, node, exitStrict) { if (createNewLexicalScope === void 0) createNewLexicalScope = true; if (node === void 0) node = this.startNode(); node.body = []; this.expect(types$1.braceL); if (createNewLexicalScope) { this.enterScope(0); } while (this.type !== types$1.braceR) { var stmt = this.parseStatement(null); node.body.push(stmt); } if (exitStrict) { this.strict = false; } this.next(); if (createNewLexicalScope) { this.exitScope(); } return this.finishNode(node, "BlockStatement"); }; pp$8.parseFor = function(node, init) { node.init = init; this.expect(types$1.semi); node.test = this.type === types$1.semi ? null : this.parseExpression(); this.expect(types$1.semi); node.update = this.type === types$1.parenR ? null : this.parseExpression(); this.expect(types$1.parenR); node.body = this.parseStatement("for"); this.exitScope(); this.labels.pop(); return this.finishNode(node, "ForStatement"); }; pp$8.parseForIn = function(node, init) { var isForIn = this.type === types$1._in; this.next(); if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.options.ecmaVersion < 8 || this.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) { this.raise( init.start, (isForIn ? "for-in" : "for-of") + " loop variable declaration may not have an initializer" ); } node.left = init; node.right = isForIn ? this.parseExpression() : this.parseMaybeAssign(); this.expect(types$1.parenR); node.body = this.parseStatement("for"); this.exitScope(); this.labels.pop(); return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement"); }; pp$8.parseVar = function(node, isFor, kind, allowMissingInitializer) { node.declarations = []; node.kind = kind; for (; ; ) { var decl = this.startNode(); this.parseVarId(decl, kind); if (this.eat(types$1.eq)) { decl.init = this.parseMaybeAssign(isFor); } else if (!allowMissingInitializer && kind === "const" && !(this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) { this.unexpected(); } else if (!allowMissingInitializer && decl.id.type !== "Identifier" && !(isFor && (this.type === types$1._in || this.isContextual("of")))) { this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value"); } else { decl.init = null; } node.declarations.push(this.finishNode(decl, "VariableDeclarator")); if (!this.eat(types$1.comma)) { break; } } return node; }; pp$8.parseVarId = function(decl, kind) { decl.id = this.parseBindingAtom(); this.checkLValPattern(decl.id, kind === "var" ? BIND_VAR : BIND_LEXICAL, false); }; var FUNC_STATEMENT = 1, FUNC_HANGING_STATEMENT = 2, FUNC_NULLABLE_ID = 4; pp$8.parseFunction = function(node, statement, allowExpressionBody, isAsync, forInit) { this.initFunction(node); if (this.options.ecmaVersion >= 9 || this.options.ecmaVersion >= 6 && !isAsync) { if (this.type === types$1.star && statement & FUNC_HANGING_STATEMENT) { this.unexpected(); } node.generator = this.eat(types$1.star); } if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; } if (statement & FUNC_STATEMENT) { node.id = statement & FUNC_NULLABLE_ID && this.type !== types$1.name ? null : this.parseIdent(); if (node.id && !(statement & FUNC_HANGING_STATEMENT)) { this.checkLValSimple(node.id, this.strict || node.generator || node.async ? this.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION); } } var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; this.yieldPos = 0; this.awaitPos = 0; this.awaitIdentPos = 0; this.enterScope(functionFlags(node.async, node.generator)); if (!(statement & FUNC_STATEMENT)) { node.id = this.type === types$1.name ? this.parseIdent() : null; } this.parseFunctionParams(node); this.parseFunctionBody(node, allowExpressionBody, false, forInit); this.yieldPos = oldYieldPos; this.awaitPos = oldAwaitPos; this.awaitIdentPos = oldAwaitIdentPos; return this.finishNode(node, statement & FUNC_STATEMENT ? "FunctionDeclaration" : "FunctionExpression"); }; pp$8.parseFunctionParams = function(node) { this.expect(types$1.parenL); node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8); this.checkYieldAwaitInDefaultParams(); }; pp$8.parseClass = function(node, isStatement) { this.next(); var oldStrict = this.strict; this.strict = true; this.parseClassId(node, isStatement); this.parseClassSuper(node); var privateNameMap = this.enterClassBody(); var classBody = this.startNode(); var hadConstructor = false; classBody.body = []; this.expect(types$1.braceL); while (this.type !== types$1.braceR) { var element = this.parseClassElement(node.superClass !== null); if (element) { classBody.body.push(element); if (element.type === "MethodDefinition" && element.kind === "constructor") { if (hadConstructor) { this.raiseRecoverable(element.start, "Duplicate constructor in the same class"); } hadConstructor = true; } else if (element.key && element.key.type === "PrivateIdentifier" && isPrivateNameConflicted(privateNameMap, element)) { this.raiseRecoverable(element.key.start, "Identifier '#" + element.key.name + "' has already been declared"); } } } this.strict = oldStrict; this.next(); node.body = this.finishNode(classBody, "ClassBody"); this.exitClassBody(); return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression"); }; pp$8.parseClassElement = function(constructorAllowsSuper) { if (this.eat(types$1.semi)) { return null; } var ecmaVersion2 = this.options.ecmaVersion; var node = this.startNode(); var keyName = ""; var isGenerator = false; var isAsync = false; var kind = "method"; var isStatic = false; if (this.eatContextual("static")) { if (ecmaVersion2 >= 13 && this.eat(types$1.braceL)) { this.parseClassStaticBlock(node); return node; } if (this.isClassElementNameStart() || this.type === types$1.star) { isStatic = true; } else { keyName = "static"; } } node.static = isStatic; if (!keyName && ecmaVersion2 >= 8 && this.eatContextual("async")) { if ((this.isClassElementNameStart() || this.type === types$1.star) && !this.canInsertSemicolon()) { isAsync = true; } else { keyName = "async"; } } if (!keyName && (ecmaVersion2 >= 9 || !isAsync) && this.eat(types$1.star)) { isGenerator = true; } if (!keyName && !isAsync && !isGenerator) { var lastValue = this.value; if (this.eatContextual("get") || this.eatContextual("set")) { if (this.isClassElementNameStart()) { kind = lastValue; } else { keyName = lastValue; } } } if (keyName) { node.computed = false; node.key = this.startNodeAt(this.lastTokStart, this.lastTokStartLoc); node.key.name = keyName; this.finishNode(node.key, "Identifier"); } else { this.parseClassElementName(node); } if (ecmaVersion2 < 13 || this.type === types$1.parenL || kind !== "method" || isGenerator || isAsync) { var isConstructor = !node.static && checkKeyName(node, "constructor"); var allowsDirectSuper = isConstructor && constructorAllowsSuper; if (isConstructor && kind !== "method") { this.raise(node.key.start, "Constructor can't have get/set modifier"); } node.kind = isConstructor ? "constructor" : kind; this.parseClassMethod(node, isGenerator, isAsync, allowsDirectSuper); } else { this.parseClassField(node); } return node; }; pp$8.isClassElementNameStart = function() { return this.type === types$1.name || this.type === types$1.privateId || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword; }; pp$8.parseClassElementName = function(element) { if (this.type === types$1.privateId) { if (this.value === "constructor") { this.raise(this.start, "Classes can't have an element named '#constructor'"); } element.computed = false; element.key = this.parsePrivateIdent(); } else { this.parsePropertyName(element); } }; pp$8.parseClassMethod = function(method, isGenerator, isAsync, allowsDirectSuper) { var key = method.key; if (method.kind === "constructor") { if (isGenerator) { this.raise(key.start, "Constructor can't be a generator"); } if (isAsync) { this.raise(key.start, "Constructor can't be an async method"); } } else if (method.static && checkKeyName(method, "prototype")) { this.raise(key.start, "Classes may not have a static property named prototype"); } var value = method.value = this.parseMethod(isGenerator, isAsync, allowsDirectSuper); if (method.kind === "get" && value.params.length !== 0) { this.raiseRecoverable(value.start, "getter should have no params"); } if (method.kind === "set" && value.params.length !== 1) { this.raiseRecoverable(value.start, "setter should have exactly one param"); } if (method.kind === "set" && value.params[0].type === "RestElement") { this.raiseRecoverable(value.params[0].start, "Setter cannot use rest params"); } return this.finishNode(method, "MethodDefinition"); }; pp$8.parseClassField = function(field) { if (checkKeyName(field, "constructor")) { this.raise(field.key.start, "Classes can't have a field named 'constructor'"); } else if (field.static && checkKeyName(field, "prototype")) { this.raise(field.key.start, "Classes can't have a static field named 'prototype'"); } if (this.eat(types$1.eq)) { var scope = this.currentThisScope(); var inClassFieldInit = scope.inClassFieldInit; scope.inClassFieldInit = true; field.value = this.parseMaybeAssign(); scope.inClassFieldInit = inClassFieldInit; } else { field.value = null; } this.semicolon(); return this.finishNode(field, "PropertyDefinition"); }; pp$8.parseClassStaticBlock = function(node) { node.body = []; var oldLabels = this.labels; this.labels = []; this.enterScope(SCOPE_CLASS_STATIC_BLOCK | SCOPE_SUPER); while (this.type !== types$1.braceR) { var stmt = this.parseStatement(null); node.body.push(stmt); } this.next(); this.exitScope(); this.labels = oldLabels; return this.finishNode(node, "StaticBlock"); }; pp$8.parseClassId = function(node, isStatement) { if (this.type === types$1.name) { node.id = this.parseIdent(); if (isStatement) { this.checkLValSimple(node.id, BIND_LEXICAL, false); } } else { if (isStatement === true) { this.unexpected(); } node.id = null; } }; pp$8.parseClassSuper = function(node) { node.superClass = this.eat(types$1._extends) ? this.parseExprSubscripts(null, false) : null; }; pp$8.enterClassBody = function() { var element = { declared: /* @__PURE__ */ Object.create(null), used: [] }; this.privateNameStack.push(element); return element.declared; }; pp$8.exitClassBody = function() { var ref2 = this.privateNameStack.pop(); var declared = ref2.declared; var used = ref2.used; if (!this.options.checkPrivateFields) { return; } var len = this.privateNameStack.length; var parent = len === 0 ? null : this.privateNameStack[len - 1]; for (var i2 = 0; i2 < used.length; ++i2) { var id = used[i2]; if (!hasOwn(declared, id.name)) { if (parent) { parent.used.push(id); } else { this.raiseRecoverable(id.start, "Private field '#" + id.name + "' must be declared in an enclosing class"); } } } }; function isPrivateNameConflicted(privateNameMap, element) { var name42 = element.key.name; var curr = privateNameMap[name42]; var next = "true"; if (element.type === "MethodDefinition" && (element.kind === "get" || element.kind === "set")) { next = (element.static ? "s" : "i") + element.kind; } if (curr === "iget" && next === "iset" || curr === "iset" && next === "iget" || curr === "sget" && next === "sset" || curr === "sset" && next === "sget") { privateNameMap[name42] = "true"; return false; } else if (!curr) { privateNameMap[name42] = next; return false; } else { return true; } } function checkKeyName(node, name42) { var computed = node.computed; var key = node.key; return !computed && (key.type === "Identifier" && key.name === name42 || key.type === "Literal" && key.value === name42); } pp$8.parseExportAllDeclaration = function(node, exports3) { if (this.options.ecmaVersion >= 11) { if (this.eatContextual("as")) { node.exported = this.parseModuleExportName(); this.checkExport(exports3, node.exported, this.lastTokStart); } else { node.exported = null; } } this.expectContextual("from"); if (this.type !== types$1.string) { this.unexpected(); } node.source = this.parseExprAtom(); if (this.options.ecmaVersion >= 16) { node.attributes = this.parseWithClause(); } this.semicolon(); return this.finishNode(node, "ExportAllDeclaration"); }; pp$8.parseExport = function(node, exports3) { this.next(); if (this.eat(types$1.star)) { return this.parseExportAllDeclaration(node, exports3); } if (this.eat(types$1._default)) { this.checkExport(exports3, "default", this.lastTokStart); node.declaration = this.parseExportDefaultDeclaration(); return this.finishNode(node, "ExportDefaultDeclaration"); } if (this.shouldParseExportStatement()) { node.declaration = this.parseExportDeclaration(node); if (node.declaration.type === "VariableDeclaration") { this.checkVariableExport(exports3, node.declaration.declarations); } else { this.checkExport(exports3, node.declaration.id, node.declaration.id.start); } node.specifiers = []; node.source = null; } else { node.declaration = null; node.specifiers = this.parseExportSpecifiers(exports3); if (this.eatContextual("from")) { if (this.type !== types$1.string) { this.unexpected(); } node.source = this.parseExprAtom(); if (this.options.ecmaVersion >= 16) { node.attributes = this.parseWithClause(); } } else { for (var i2 = 0, list2 = node.specifiers; i2 < list2.length; i2 += 1) { var spec2 = list2[i2]; this.checkUnreserved(spec2.local); this.checkLocalExport(spec2.local); if (spec2.local.type === "Literal") { this.raise(spec2.local.start, "A string literal cannot be used as an exported binding without `from`."); } } node.source = null; } this.semicolon(); } return this.finishNode(node, "ExportNamedDeclaration"); }; pp$8.parseExportDeclaration = function(node) { return this.parseStatement(null); }; pp$8.parseExportDefaultDeclaration = function() { var isAsync; if (this.type === types$1._function || (isAsync = this.isAsyncFunction())) { var fNode = this.startNode(); this.next(); if (isAsync) { this.next(); } return this.parseFunction(fNode, FUNC_STATEMENT | FUNC_NULLABLE_ID, false, isAsync); } else if (this.type === types$1._class) { var cNode = this.startNode(); return this.parseClass(cNode, "nullableID"); } else { var declaration = this.parseMaybeAssign(); this.semicolon(); return declaration; } }; pp$8.checkExport = function(exports3, name42, pos) { if (!exports3) { return; } if (typeof name42 !== "string") { name42 = name42.type === "Identifier" ? name42.name : name42.value; } if (hasOwn(exports3, name42)) { this.raiseRecoverable(pos, "Duplicate export '" + name42 + "'"); } exports3[name42] = true; }; pp$8.checkPatternExport = function(exports3, pat) { var type = pat.type; if (type === "Identifier") { this.checkExport(exports3, pat, pat.start); } else if (type === "ObjectPattern") { for (var i2 = 0, list2 = pat.properties; i2 < list2.length; i2 += 1) { var prop = list2[i2]; this.checkPatternExport(exports3, prop); } } else if (type === "ArrayPattern") { for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) { var elt = list$1[i$1]; if (elt) { this.checkPatternExport(exports3, elt); } } } else if (type === "Property") { this.checkPatternExport(exports3, pat.value); } else if (type === "AssignmentPattern") { this.checkPatternExport(exports3, pat.left); } else if (type === "RestElement") { this.checkPatternExport(exports3, pat.argument); } }; pp$8.checkVariableExport = function(exports3, decls) { if (!exports3) { return; } for (var i2 = 0, list2 = decls; i2 < list2.length; i2 += 1) { var decl = list2[i2]; this.checkPatternExport(exports3, decl.id); } }; pp$8.shouldParseExportStatement = function() { return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction(); }; pp$8.parseExportSpecifier = function(exports3) { var node = this.startNode(); node.local = this.parseModuleExportName(); node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local; this.checkExport( exports3, node.exported, node.exported.start ); return this.finishNode(node, "ExportSpecifier"); }; pp$8.parseExportSpecifiers = function(exports3) { var nodes = [], first = true; this.expect(types$1.braceL); while (!this.eat(types$1.braceR)) { if (!first) { this.expect(types$1.comma); if (this.afterTrailingComma(types$1.braceR)) { break; } } else { first = false; } nodes.push(this.parseExportSpecifier(exports3)); } return nodes; }; pp$8.parseImport = function(node) { this.next(); if (this.type === types$1.string) { node.specifiers = empty$1; node.source = this.parseExprAtom(); } else { node.specifiers = this.parseImportSpecifiers(); this.expectContextual("from"); node.source = this.type === types$1.string ? this.parseExprAtom() : this.unexpected(); } if (this.options.ecmaVersion >= 16) { node.attributes = this.parseWithClause(); } this.semicolon(); return this.finishNode(node, "ImportDeclaration"); }; pp$8.parseImportSpecifier = function() { var node = this.startNode(); node.imported = this.parseModuleExportName(); if (this.eatContextual("as")) { node.local = this.parseIdent(); } else { this.checkUnreserved(node.imported); node.local = node.imported; } this.checkLValSimple(node.local, BIND_LEXICAL); return this.finishNode(node, "ImportSpecifier"); }; pp$8.parseImportDefaultSpecifier = function() { var node = this.startNode(); node.local = this.parseIdent(); this.checkLValSimple(node.local, BIND_LEXICAL); return this.finishNode(node, "ImportDefaultSpecifier"); }; pp$8.parseImportNamespaceSpecifier = function() { var node = this.startNode(); this.next(); this.expectContextual("as"); node.local = this.parseIdent(); this.checkLValSimple(node.local, BIND_LEXICAL); return this.finishNode(node, "ImportNamespaceSpecifier"); }; pp$8.parseImportSpecifiers = function() { var nodes = [], first = true; if (this.type === types$1.name) { nodes.push(this.parseImportDefaultSpecifier()); if (!this.eat(types$1.comma)) { return nodes; } } if (this.type === types$1.star) { nodes.push(this.parseImportNamespaceSpecifier()); return nodes; } this.expect(types$1.braceL); while (!this.eat(types$1.braceR)) { if (!first) { this.expect(types$1.comma); if (this.afterTrailingComma(types$1.braceR)) { break; } } else { first = false; } nodes.push(this.parseImportSpecifier()); } return nodes; }; pp$8.parseWithClause = function() { var nodes = []; if (!this.eat(types$1._with)) { return nodes; } this.expect(types$1.braceL); var attributeKeys = {}; var first = true; while (!this.eat(types$1.braceR)) { if (!first) { this.expect(types$1.comma); if (this.afterTrailingComma(types$1.braceR)) { break; } } else { first = false; } var attr = this.parseImportAttribute(); var keyName = attr.key.type === "Identifier" ? attr.key.name : attr.key.value; if (hasOwn(attributeKeys, keyName)) { this.raiseRecoverable(attr.key.start, "Duplicate attribute key '" + keyName + "'"); } attributeKeys[keyName] = true; nodes.push(attr); } return nodes; }; pp$8.parseImportAttribute = function() { var node = this.startNode(); node.key = this.type === types$1.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never"); this.expect(types$1.colon); if (this.type !== types$1.string) { this.unexpected(); } node.value = this.parseExprAtom(); return this.finishNode(node, "ImportAttribute"); }; pp$8.parseModuleExportName = function() { if (this.options.ecmaVersion >= 13 && this.type === types$1.string) { var stringLiteral = this.parseLiteral(this.value); if (loneSurrogate.test(stringLiteral.value)) { this.raise(stringLiteral.start, "An export name cannot include a lone surrogate."); } return stringLiteral; } return this.parseIdent(true); }; pp$8.adaptDirectivePrologue = function(statements) { for (var i2 = 0; i2 < statements.length && this.isDirectiveCandidate(statements[i2]); ++i2) { statements[i2].directive = statements[i2].expression.raw.slice(1, -1); } }; pp$8.isDirectiveCandidate = function(statement) { return this.options.ecmaVersion >= 5 && statement.type === "ExpressionStatement" && statement.expression.type === "Literal" && typeof statement.expression.value === "string" && // Reject parenthesized strings. (this.input[statement.start] === '"' || this.input[statement.start] === "'"); }; var pp$7 = Parser.prototype; pp$7.toAssignable = function(node, isBinding, refDestructuringErrors) { if (this.options.ecmaVersion >= 6 && node) { switch (node.type) { case "Identifier": if (this.inAsync && node.name === "await") { this.raise(node.start, "Cannot use 'await' as identifier inside an async function"); } break; case "ObjectPattern": case "ArrayPattern": case "AssignmentPattern": case "RestElement": break; case "ObjectExpression": node.type = "ObjectPattern"; if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } for (var i2 = 0, list2 = node.properties; i2 < list2.length; i2 += 1) { var prop = list2[i2]; this.toAssignable(prop, isBinding); if (prop.type === "RestElement" && (prop.argument.type === "ArrayPattern" || prop.argument.type === "ObjectPattern")) { this.raise(prop.argument.start, "Unexpected token"); } } break; case "Property": if (node.kind !== "init") { this.raise(node.key.start, "Object pattern can't contain getter or setter"); } this.toAssignable(node.value, isBinding); break; case "ArrayExpression": node.type = "ArrayPattern"; if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } this.toAssignableList(node.elements, isBinding); break; case "SpreadElement": node.type = "RestElement"; this.toAssignable(node.argument, isBinding); if (node.argument.type === "AssignmentPattern") { this.raise(node.argument.start, "Rest elements cannot have a default value"); } break; case "AssignmentExpression": if (node.operator !== "=") { this.raise(node.left.end, "Only '=' operator can be used for specifying default value."); } node.type = "AssignmentPattern"; delete node.operator; this.toAssignable(node.left, isBinding); break; case "ParenthesizedExpression": this.toAssignable(node.expression, isBinding, refDestructuringErrors); break; case "ChainExpression": this.raiseRecoverable(node.start, "Optional chaining cannot appear in left-hand side"); break; case "MemberExpression": if (!isBinding) { break; } default: this.raise(node.start, "Assigning to rvalue"); } } else if (refDestructuringErrors) { this.checkPatternErrors(refDestructuringErrors, true); } return node; }; pp$7.toAssignableList = function(exprList, isBinding) { var end = exprList.length; for (var i2 = 0; i2 < end; i2++) { var elt = exprList[i2]; if (elt) { this.toAssignable(elt, isBinding); } } if (end) { var last = exprList[end - 1]; if (this.options.ecmaVersion === 6 && isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") { this.unexpected(last.argument.start); } } return exprList; }; pp$7.parseSpread = function(refDestructuringErrors) { var node = this.startNode(); this.next(); node.argument = this.parseMaybeAssign(false, refDestructuringErrors); return this.finishNode(node, "SpreadElement"); }; pp$7.parseRestBinding = function() { var node = this.startNode(); this.next(); if (this.options.ecmaVersion === 6 && this.type !== types$1.name) { this.unexpected(); } node.argument = this.parseBindingAtom(); return this.finishNode(node, "RestElement"); }; pp$7.parseBindingAtom = function() { if (this.options.ecmaVersion >= 6) { switch (this.type) { case types$1.bracketL: var node = this.startNode(); this.next(); node.elements = this.parseBindingList(types$1.bracketR, true, true); return this.finishNode(node, "ArrayPattern"); case types$1.braceL: return this.parseObj(true); } } return this.parseIdent(); }; pp$7.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowModifiers) { var elts = [], first = true; while (!this.eat(close)) { if (first) { first = false; } else { this.expect(types$1.comma); } if (allowEmpty && this.type === types$1.comma) { elts.push(null); } else if (allowTrailingComma && this.afterTrailingComma(close)) { break; } else if (this.type === types$1.ellipsis) { var rest = this.parseRestBinding(); this.parseBindingListItem(rest); elts.push(rest); if (this.type === types$1.comma) { this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"); } this.expect(close); break; } else { elts.push(this.parseAssignableListItem(allowModifiers)); } } return elts; }; pp$7.parseAssignableListItem = function(allowModifiers) { var elem = this.parseMaybeDefault(this.start, this.startLoc); this.parseBindingListItem(elem); return elem; }; pp$7.parseBindingListItem = function(param) { return param; }; pp$7.parseMaybeDefault = function(startPos, startLoc, left) { left = left || this.parseBindingAtom(); if (this.options.ecmaVersion < 6 || !this.eat(types$1.eq)) { return left; } var node = this.startNodeAt(startPos, startLoc); node.left = left; node.right = this.parseMaybeAssign(); return this.finishNode(node, "AssignmentPattern"); }; pp$7.checkLValSimple = function(expr, bindingType, checkClashes) { if (bindingType === void 0) bindingType = BIND_NONE; var isBind = bindingType !== BIND_NONE; switch (expr.type) { case "Identifier": if (this.strict && this.reservedWordsStrictBind.test(expr.name)) { this.raiseRecoverable(expr.start, (isBind ? "Binding " : "Assigning to ") + expr.name + " in strict mode"); } if (isBind) { if (bindingType === BIND_LEXICAL && expr.name === "let") { this.raiseRecoverable(expr.start, "let is disallowed as a lexically bound name"); } if (checkClashes) { if (hasOwn(checkClashes, expr.name)) { this.raiseRecoverable(expr.start, "Argument name clash"); } checkClashes[expr.name] = true; } if (bindingType !== BIND_OUTSIDE) { this.declareName(expr.name, bindingType, expr.start); } } break; case "ChainExpression": this.raiseRecoverable(expr.start, "Optional chaining cannot appear in left-hand side"); break; case "MemberExpression": if (isBind) { this.raiseRecoverable(expr.start, "Binding member expression"); } break; case "ParenthesizedExpression": if (isBind) { this.raiseRecoverable(expr.start, "Binding parenthesized expression"); } return this.checkLValSimple(expr.expression, bindingType, checkClashes); default: this.raise(expr.start, (isBind ? "Binding" : "Assigning to") + " rvalue"); } }; pp$7.checkLValPattern = function(expr, bindingType, checkClashes) { if (bindingType === void 0) bindingType = BIND_NONE; switch (expr.type) { case "ObjectPattern": for (var i2 = 0, list2 = expr.properties; i2 < list2.length; i2 += 1) { var prop = list2[i2]; this.checkLValInnerPattern(prop, bindingType, checkClashes); } break; case "ArrayPattern": for (var i$1 = 0, list$1 = expr.elements; i$1 < list$1.length; i$1 += 1) { var elem = list$1[i$1]; if (elem) { this.checkLValInnerPattern(elem, bindingType, checkClashes); } } break; default: this.checkLValSimple(expr, bindingType, checkClashes); } }; pp$7.checkLValInnerPattern = function(expr, bindingType, checkClashes) { if (bindingType === void 0) bindingType = BIND_NONE; switch (expr.type) { case "Property": this.checkLValInnerPattern(expr.value, bindingType, checkClashes); break; case "AssignmentPattern": this.checkLValPattern(expr.left, bindingType, checkClashes); break; case "RestElement": this.checkLValPattern(expr.argument, bindingType, checkClashes); break; default: this.checkLValPattern(expr, bindingType, checkClashes); } }; var TokContext = function TokContext2(token, isExpr, preserveSpace, override, generator) { this.token = token; this.isExpr = !!isExpr; this.preserveSpace = !!preserveSpace; this.override = override; this.generator = !!generator; }; var types = { b_stat: new TokContext("{", false), b_expr: new TokContext("{", true), b_tmpl: new TokContext("${", false), p_stat: new TokContext("(", false), p_expr: new TokContext("(", true), q_tmpl: new TokContext("`", true, true, function(p) { return p.tryReadTemplateToken(); }), f_stat: new TokContext("function", false), f_expr: new TokContext("function", true), f_expr_gen: new TokContext("function", true, false, null, true), f_gen: new TokContext("function", false, false, null, true) }; var pp$6 = Parser.prototype; pp$6.initialContext = function() { return [types.b_stat]; }; pp$6.curContext = function() { return this.context[this.context.length - 1]; }; pp$6.braceIsBlock = function(prevType) { var parent = this.curContext(); if (parent === types.f_expr || parent === types.f_stat) { return true; } if (prevType === types$1.colon && (parent === types.b_stat || parent === types.b_expr)) { return !parent.isExpr; } if (prevType === types$1._return || prevType === types$1.name && this.exprAllowed) { return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); } if (prevType === types$1._else || prevType === types$1.semi || prevType === types$1.eof || prevType === types$1.parenR || prevType === types$1.arrow) { return true; } if (prevType === types$1.braceL) { return parent === types.b_stat; } if (prevType === types$1._var || prevType === types$1._const || prevType === types$1.name) { return false; } return !this.exprAllowed; }; pp$6.inGeneratorContext = function() { for (var i2 = this.context.length - 1; i2 >= 1; i2--) { var context = this.context[i2]; if (context.token === "function") { return context.generator; } } return false; }; pp$6.updateContext = function(prevType) { var update, type = this.type; if (type.keyword && prevType === types$1.dot) { this.exprAllowed = false; } else if (update = type.updateContext) { update.call(this, prevType); } else { this.exprAllowed = type.beforeExpr; } }; pp$6.overrideContext = function(tokenCtx) { if (this.curContext() !== tokenCtx) { this.context[this.context.length - 1] = tokenCtx; } }; types$1.parenR.updateContext = types$1.braceR.updateContext = function() { if (this.context.length === 1) { this.exprAllowed = true; return; } var out = this.context.pop(); if (out === types.b_stat && this.curContext().token === "function") { out = this.context.pop(); } this.exprAllowed = !out.isExpr; }; types$1.braceL.updateContext = function(prevType) { this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr); this.exprAllowed = true; }; types$1.dollarBraceL.updateContext = function() { this.context.push(types.b_tmpl); this.exprAllowed = true; }; types$1.parenL.updateContext = function(prevType) { var statementParens = prevType === types$1._if || prevType === types$1._for || prevType === types$1._with || prevType === types$1._while; this.context.push(statementParens ? types.p_stat : types.p_expr); this.exprAllowed = true; }; types$1.incDec.updateContext = function() { }; types$1._function.updateContext = types$1._class.updateContext = function(prevType) { if (prevType.beforeExpr && prevType !== types$1._else && !(prevType === types$1.semi && this.curContext() !== types.p_stat) && !(prevType === types$1._return && lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) && !((prevType === types$1.colon || prevType === types$1.braceL) && this.curContext() === types.b_stat)) { this.context.push(types.f_expr); } else { this.context.push(types.f_stat); } this.exprAllowed = false; }; types$1.colon.updateContext = function() { if (this.curContext().token === "function") { this.context.pop(); } this.exprAllowed = true; }; types$1.backQuote.updateContext = function() { if (this.curContext() === types.q_tmpl) { this.context.pop(); } else { this.context.push(types.q_tmpl); } this.exprAllowed = false; }; types$1.star.updateContext = function(prevType) { if (prevType === types$1._function) { var index = this.context.length - 1; if (this.context[index] === types.f_expr) { this.context[index] = types.f_expr_gen; } else { this.context[index] = types.f_gen; } } this.exprAllowed = true; }; types$1.name.updateContext = function(prevType) { var allowed = false; if (this.options.ecmaVersion >= 6 && prevType !== types$1.dot) { if (this.value === "of" && !this.exprAllowed || this.value === "yield" && this.inGeneratorContext()) { allowed = true; } } this.exprAllowed = allowed; }; var pp$5 = Parser.prototype; pp$5.checkPropClash = function(prop, propHash, refDestructuringErrors) { if (this.options.ecmaVersion >= 9 && prop.type === "SpreadElement") { return; } if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) { return; } var key = prop.key; var name42; switch (key.type) { case "Identifier": name42 = key.name; break; case "Literal": name42 = String(key.value); break; default: return; } var kind = prop.kind; if (this.options.ecmaVersion >= 6) { if (name42 === "__proto__" && kind === "init") { if (propHash.proto) { if (refDestructuringErrors) { if (refDestructuringErrors.doubleProto < 0) { refDestructuringErrors.doubleProto = key.start; } } else { this.raiseRecoverable(key.start, "Redefinition of __proto__ property"); } } propHash.proto = true; } return; } name42 = "$" + name42; var other = propHash[name42]; if (other) { var redefinition; if (kind === "init") { redefinition = this.strict && other.init || other.get || other.set; } else { redefinition = other.init || other[kind]; } if (redefinition) { this.raiseRecoverable(key.start, "Redefinition of property"); } } else { other = propHash[name42] = { init: false, get: false, set: false }; } other[kind] = true; }; pp$5.parseExpression = function(forInit, refDestructuringErrors) { var startPos = this.start, startLoc = this.startLoc; var expr = this.parseMaybeAssign(forInit, refDestructuringErrors); if (this.type === types$1.comma) { var node = this.startNodeAt(startPos, startLoc); node.expressions = [expr]; while (this.eat(types$1.comma)) { node.expressions.push(this.parseMaybeAssign(forInit, refDestructuringErrors)); } return this.finishNode(node, "SequenceExpression"); } return expr; }; pp$5.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) { if (this.isContextual("yield")) { if (this.inGenerator) { return this.parseYield(forInit); } else { this.exprAllowed = false; } } var ownDestructuringErrors = false, oldParenAssign = -1, oldTrailingComma = -1, oldDoubleProto = -1; if (refDestructuringErrors) { oldParenAssign = refDestructuringErrors.parenthesizedAssign; oldTrailingComma = refDestructuringErrors.trailingComma; oldDoubleProto = refDestructuringErrors.doubleProto; refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = -1; } else { refDestructuringErrors = new DestructuringErrors(); ownDestructuringErrors = true; } var startPos = this.start, startLoc = this.startLoc; if (this.type === types$1.parenL || this.type === types$1.name) { this.potentialArrowAt = this.start; this.potentialArrowInForAwait = forInit === "await"; } var left = this.parseMaybeConditional(forInit, refDestructuringErrors); if (afterLeftParse) { left = afterLeftParse.call(this, left, startPos, startLoc); } if (this.type.isAssign) { var node = this.startNodeAt(startPos, startLoc); node.operator = this.value; if (this.type === types$1.eq) { left = this.toAssignable(left, false, refDestructuringErrors); } if (!ownDestructuringErrors) { refDestructuringErrors.parenthesizedAssign = refDestructuringErrors.trailingComma = refDestructuringErrors.doubleProto = -1; } if (refDestructuringErrors.shorthandAssign >= left.start) { refDestructuringErrors.shorthandAssign = -1; } if (this.type === types$1.eq) { this.checkLValPattern(left); } else { this.checkLValSimple(left); } node.left = left; this.next(); node.right = this.parseMaybeAssign(forInit); if (oldDoubleProto > -1) { refDestructuringErrors.doubleProto = oldDoubleProto; } return this.finishNode(node, "AssignmentExpression"); } else { if (ownDestructuringErrors) { this.checkExpressionErrors(refDestructuringErrors, true); } } if (oldParenAssign > -1) { refDestructuringErrors.parenthesizedAssign = oldParenAssign; } if (oldTrailingComma > -1) { refDestructuringErrors.trailingComma = oldTrailingComma; } return left; }; pp$5.parseMaybeConditional = function(forInit, refDestructuringErrors) { var startPos = this.start, startLoc = this.startLoc; var expr = this.parseExprOps(forInit, refDestructuringErrors); if (this.checkExpressionErrors(refDestructuringErrors)) { return expr; } if (this.eat(types$1.question)) { var node = this.startNodeAt(startPos, startLoc); node.test = expr; node.consequent = this.parseMaybeAssign(); this.expect(types$1.colon); node.alternate = this.parseMaybeAssign(forInit); return this.finishNode(node, "ConditionalExpression"); } return expr; }; pp$5.parseExprOps = function(forInit, refDestructuringErrors) { var startPos = this.start, startLoc = this.startLoc; var expr = this.parseMaybeUnary(refDestructuringErrors, false, false, forInit); if (this.checkExpressionErrors(refDestructuringErrors)) { return expr; } return expr.start === startPos && expr.type === "ArrowFunctionExpression" ? expr : this.parseExprOp(expr, startPos, startLoc, -1, forInit); }; pp$5.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, forInit) { var prec = this.type.binop; if (prec != null && (!forInit || this.type !== types$1._in)) { if (prec > minPrec) { var logical = this.type === types$1.logicalOR || this.type === types$1.logicalAND; var coalesce = this.type === types$1.coalesce; if (coalesce) { prec = types$1.logicalAND.binop; } var op = this.value; this.next(); var startPos = this.start, startLoc = this.startLoc; var right = this.parseExprOp(this.parseMaybeUnary(null, false, false, forInit), startPos, startLoc, prec, forInit); var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical || coalesce); if (logical && this.type === types$1.coalesce || coalesce && (this.type === types$1.logicalOR || this.type === types$1.logicalAND)) { this.raiseRecoverable(this.start, "Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"); } return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, forInit); } } return left; }; pp$5.buildBinary = function(startPos, startLoc, left, right, op, logical) { if (right.type === "PrivateIdentifier") { this.raise(right.start, "Private identifier can only be left side of binary expression"); } var node = this.startNodeAt(startPos, startLoc); node.left = left; node.operator = op; node.right = right; return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression"); }; pp$5.parseMaybeUnary = function(refDestructuringErrors, sawUnary, incDec, forInit) { var startPos = this.start, startLoc = this.startLoc, expr; if (this.isContextual("await") && this.canAwait) { expr = this.parseAwait(forInit); sawUnary = true; } else if (this.type.prefix) { var node = this.startNode(), update = this.type === types$1.incDec; node.operator = this.value; node.prefix = true; this.next(); node.argument = this.parseMaybeUnary(null, true, update, forInit); this.checkExpressionErrors(refDestructuringErrors, true); if (update) { this.checkLValSimple(node.argument); } else if (this.strict && node.operator === "delete" && isLocalVariableAccess(node.argument)) { this.raiseRecoverable(node.start, "Deleting local variable in strict mode"); } else if (node.operator === "delete" && isPrivateFieldAccess(node.argument)) { this.raiseRecoverable(node.start, "Private fields can not be deleted"); } else { sawUnary = true; } expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); } else if (!sawUnary && this.type === types$1.privateId) { if ((forInit || this.privateNameStack.length === 0) && this.options.checkPrivateFields) { this.unexpected(); } expr = this.parsePrivateIdent(); if (this.type !== types$1._in) { this.unexpected(); } } else { expr = this.parseExprSubscripts(refDestructuringErrors, forInit); if (this.checkExpressionErrors(refDestructuringErrors)) { return expr; } while (this.type.postfix && !this.canInsertSemicolon()) { var node$1 = this.startNodeAt(startPos, startLoc); node$1.operator = this.value; node$1.prefix = false; node$1.argument = expr; this.checkLValSimple(expr); this.next(); expr = this.finishNode(node$1, "UpdateExpression"); } } if (!incDec && this.eat(types$1.starstar)) { if (sawUnary) { this.unexpected(this.lastTokStart); } else { return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false, false, forInit), "**", false); } } else { return expr; } }; function isLocalVariableAccess(node) { return node.type === "Identifier" || node.type === "ParenthesizedExpression" && isLocalVariableAccess(node.expression); } function isPrivateFieldAccess(node) { return node.type === "MemberExpression" && node.property.type === "PrivateIdentifier" || node.type === "ChainExpression" && isPrivateFieldAccess(node.expression) || node.type === "ParenthesizedExpression" && isPrivateFieldAccess(node.expression); } pp$5.parseExprSubscripts = function(refDestructuringErrors, forInit) { var startPos = this.start, startLoc = this.startLoc; var expr = this.parseExprAtom(refDestructuringErrors, forInit); if (expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")") { return expr; } var result = this.parseSubscripts(expr, startPos, startLoc, false, forInit); if (refDestructuringErrors && result.type === "MemberExpression") { if (refDestructuringErrors.parenthesizedAssign >= result.start) { refDestructuringErrors.parenthesizedAssign = -1; } if (refDestructuringErrors.parenthesizedBind >= result.start) { refDestructuringErrors.parenthesizedBind = -1; } if (refDestructuringErrors.trailingComma >= result.start) { refDestructuringErrors.trailingComma = -1; } } return result; }; pp$5.parseSubscripts = function(base, startPos, startLoc, noCalls, forInit) { var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && this.lastTokEnd === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && this.potentialArrowAt === base.start; var optionalChained = false; while (true) { var element = this.parseSubscript(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit); if (element.optional) { optionalChained = true; } if (element === base || element.type === "ArrowFunctionExpression") { if (optionalChained) { var chainNode = this.startNodeAt(startPos, startLoc); chainNode.expression = element; element = this.finishNode(chainNode, "ChainExpression"); } return element; } base = element; } }; pp$5.shouldParseAsyncArrow = function() { return !this.canInsertSemicolon() && this.eat(types$1.arrow); }; pp$5.parseSubscriptAsyncArrow = function(startPos, startLoc, exprList, forInit) { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, true, forInit); }; pp$5.parseSubscript = function(base, startPos, startLoc, noCalls, maybeAsyncArrow, optionalChained, forInit) { var optionalSupported = this.options.ecmaVersion >= 11; var optional = optionalSupported && this.eat(types$1.questionDot); if (noCalls && optional) { this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions"); } var computed = this.eat(types$1.bracketL); if (computed || optional && this.type !== types$1.parenL && this.type !== types$1.backQuote || this.eat(types$1.dot)) { var node = this.startNodeAt(startPos, startLoc); node.object = base; if (computed) { node.property = this.parseExpression(); this.expect(types$1.bracketR); } else if (this.type === types$1.privateId && base.type !== "Super") { node.property = this.parsePrivateIdent(); } else { node.property = this.parseIdent(this.options.allowReserved !== "never"); } node.computed = !!computed; if (optionalSupported) { node.optional = optional; } base = this.finishNode(node, "MemberExpression"); } else if (!noCalls && this.eat(types$1.parenL)) { var refDestructuringErrors = new DestructuringErrors(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; this.yieldPos = 0; this.awaitPos = 0; this.awaitIdentPos = 0; var exprList = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false, refDestructuringErrors); if (maybeAsyncArrow && !optional && this.shouldParseAsyncArrow()) { this.checkPatternErrors(refDestructuringErrors, false); this.checkYieldAwaitInDefaultParams(); if (this.awaitIdentPos > 0) { this.raise(this.awaitIdentPos, "Cannot use 'await' as identifier inside an async function"); } this.yieldPos = oldYieldPos; this.awaitPos = oldAwaitPos; this.awaitIdentPos = oldAwaitIdentPos; return this.parseSubscriptAsyncArrow(startPos, startLoc, exprList, forInit); } this.checkExpressionErrors(refDestructuringErrors, true); this.yieldPos = oldYieldPos || this.yieldPos; this.awaitPos = oldAwaitPos || this.awaitPos; this.awaitIdentPos = oldAwaitIdentPos || this.awaitIdentPos; var node$1 = this.startNodeAt(startPos, startLoc); node$1.callee = base; node$1.arguments = exprList; if (optionalSupported) { node$1.optional = optional; } base = this.finishNode(node$1, "CallExpression"); } else if (this.type === types$1.backQuote) { if (optional || optionalChained) { this.raise(this.start, "Optional chaining cannot appear in the tag of tagged template expressions"); } var node$2 = this.startNodeAt(startPos, startLoc); node$2.tag = base; node$2.quasi = this.parseTemplate({ isTagged: true }); base = this.finishNode(node$2, "TaggedTemplateExpression"); } return base; }; pp$5.parseExprAtom = function(refDestructuringErrors, forInit, forNew) { if (this.type === types$1.slash) { this.readRegexp(); } var node, canBeArrow = this.potentialArrowAt === this.start; switch (this.type) { case types$1._super: if (!this.allowSuper) { this.raise(this.start, "'super' keyword outside a method"); } node = this.startNode(); this.next(); if (this.type === types$1.parenL && !this.allowDirectSuper) { this.raise(node.start, "super() call outside constructor of a subclass"); } if (this.type !== types$1.dot && this.type !== types$1.bracketL && this.type !== types$1.parenL) { this.unexpected(); } return this.finishNode(node, "Super"); case types$1._this: node = this.startNode(); this.next(); return this.finishNode(node, "ThisExpression"); case types$1.name: var startPos = this.start, startLoc = this.startLoc, containsEsc = this.containsEsc; var id = this.parseIdent(false); if (this.options.ecmaVersion >= 8 && !containsEsc && id.name === "async" && !this.canInsertSemicolon() && this.eat(types$1._function)) { this.overrideContext(types.f_expr); return this.parseFunction(this.startNodeAt(startPos, startLoc), 0, false, true, forInit); } if (canBeArrow && !this.canInsertSemicolon()) { if (this.eat(types$1.arrow)) { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false, forInit); } if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === types$1.name && !containsEsc && (!this.potentialArrowInForAwait || this.value !== "of" || this.containsEsc)) { id = this.parseIdent(false); if (this.canInsertSemicolon() || !this.eat(types$1.arrow)) { this.unexpected(); } return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true, forInit); } } return id; case types$1.regexp: var value = this.value; node = this.parseLiteral(value.value); node.regex = { pattern: value.pattern, flags: value.flags }; return node; case types$1.num: case types$1.string: return this.parseLiteral(this.value); case types$1._null: case types$1._true: case types$1._false: node = this.startNode(); node.value = this.type === types$1._null ? null : this.type === types$1._true; node.raw = this.type.keyword; this.next(); return this.finishNode(node, "Literal"); case types$1.parenL: var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow, forInit); if (refDestructuringErrors) { if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) { refDestructuringErrors.parenthesizedAssign = start; } if (refDestructuringErrors.parenthesizedBind < 0) { refDestructuringErrors.parenthesizedBind = start; } } return expr; case types$1.bracketL: node = this.startNode(); this.next(); node.elements = this.parseExprList(types$1.bracketR, true, true, refDestructuringErrors); return this.finishNode(node, "ArrayExpression"); case types$1.braceL: this.overrideContext(types.b_expr); return this.parseObj(false, refDestructuringErrors); case types$1._function: node = this.startNode(); this.next(); return this.parseFunction(node, 0); case types$1._class: return this.parseClass(this.startNode(), false); case types$1._new: return this.parseNew(); case types$1.backQuote: return this.parseTemplate(); case types$1._import: if (this.options.ecmaVersion >= 11) { return this.parseExprImport(forNew); } else { return this.unexpected(); } default: return this.parseExprAtomDefault(); } }; pp$5.parseExprAtomDefault = function() { this.unexpected(); }; pp$5.parseExprImport = function(forNew) { var node = this.startNode(); if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword import"); } this.next(); if (this.type === types$1.parenL && !forNew) { return this.parseDynamicImport(node); } else if (this.type === types$1.dot) { var meta = this.startNodeAt(node.start, node.loc && node.loc.start); meta.name = "import"; node.meta = this.finishNode(meta, "Identifier"); return this.parseImportMeta(node); } else { this.unexpected(); } }; pp$5.parseDynamicImport = function(node) { this.next(); node.source = this.parseMaybeAssign(); if (this.options.ecmaVersion >= 16) { if (!this.eat(types$1.parenR)) { this.expect(types$1.comma); if (!this.afterTrailingComma(types$1.parenR)) { node.options = this.parseMaybeAssign(); if (!this.eat(types$1.parenR)) { this.expect(types$1.comma); if (!this.afterTrailingComma(types$1.parenR)) { this.unexpected(); } } } else { node.options = null; } } else { node.options = null; } } else { if (!this.eat(types$1.parenR)) { var errorPos = this.start; if (this.eat(types$1.comma) && this.eat(types$1.parenR)) { this.raiseRecoverable(errorPos, "Trailing comma is not allowed in import()"); } else { this.unexpected(errorPos); } } } return this.finishNode(node, "ImportExpression"); }; pp$5.parseImportMeta = function(node) { this.next(); var containsEsc = this.containsEsc; node.property = this.parseIdent(true); if (node.property.name !== "meta") { this.raiseRecoverable(node.property.start, "The only valid meta property for import is 'import.meta'"); } if (containsEsc) { this.raiseRecoverable(node.start, "'import.meta' must not contain escaped characters"); } if (this.options.sourceType !== "module" && !this.options.allowImportExportEverywhere) { this.raiseRecoverable(node.start, "Cannot use 'import.meta' outside a module"); } return this.finishNode(node, "MetaProperty"); }; pp$5.parseLiteral = function(value) { var node = this.startNode(); node.value = value; node.raw = this.input.slice(this.start, this.end); if (node.raw.charCodeAt(node.raw.length - 1) === 110) { node.bigint = node.raw.slice(0, -1).replace(/_/g, ""); } this.next(); return this.finishNode(node, "Literal"); }; pp$5.parseParenExpression = function() { this.expect(types$1.parenL); var val = this.parseExpression(); this.expect(types$1.parenR); return val; }; pp$5.shouldParseArrow = function(exprList) { return !this.canInsertSemicolon(); }; pp$5.parseParenAndDistinguishExpression = function(canBeArrow, forInit) { var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8; if (this.options.ecmaVersion >= 6) { this.next(); var innerStartPos = this.start, innerStartLoc = this.startLoc; var exprList = [], first = true, lastIsComma = false; var refDestructuringErrors = new DestructuringErrors(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart; this.yieldPos = 0; this.awaitPos = 0; while (this.type !== types$1.parenR) { first ? first = false : this.expect(types$1.comma); if (allowTrailingComma && this.afterTrailingComma(types$1.parenR, true)) { lastIsComma = true; break; } else if (this.type === types$1.ellipsis) { spreadStart = this.start; exprList.push(this.parseParenItem(this.parseRestBinding())); if (this.type === types$1.comma) { this.raiseRecoverable( this.start, "Comma is not permitted after the rest element" ); } break; } else { exprList.push(this.parseMaybeAssign(false, refDestructuringErrors, this.parseParenItem)); } } var innerEndPos = this.lastTokEnd, innerEndLoc = this.lastTokEndLoc; this.expect(types$1.parenR); if (canBeArrow && this.shouldParseArrow(exprList) && this.eat(types$1.arrow)) { this.checkPatternErrors(refDestructuringErrors, false); this.checkYieldAwaitInDefaultParams(); this.yieldPos = oldYieldPos; this.awaitPos = oldAwaitPos; return this.parseParenArrowList(startPos, startLoc, exprList, forInit); } if (!exprList.length || lastIsComma) { this.unexpected(this.lastTokStart); } if (spreadStart) { this.unexpected(spreadStart); } this.checkExpressionErrors(refDestructuringErrors, true); this.yieldPos = oldYieldPos || this.yieldPos; this.awaitPos = oldAwaitPos || this.awaitPos; if (exprList.length > 1) { val = this.startNodeAt(innerStartPos, innerStartLoc); val.expressions = exprList; this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc); } else { val = exprList[0]; } } else { val = this.parseParenExpression(); } if (this.options.preserveParens) { var par = this.startNodeAt(startPos, startLoc); par.expression = val; return this.finishNode(par, "ParenthesizedExpression"); } else { return val; } }; pp$5.parseParenItem = function(item) { return item; }; pp$5.parseParenArrowList = function(startPos, startLoc, exprList, forInit) { return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList, false, forInit); }; var empty = []; pp$5.parseNew = function() { if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword new"); } var node = this.startNode(); this.next(); if (this.options.ecmaVersion >= 6 && this.type === types$1.dot) { var meta = this.startNodeAt(node.start, node.loc && node.loc.start); meta.name = "new"; node.meta = this.finishNode(meta, "Identifier"); this.next(); var containsEsc = this.containsEsc; node.property = this.parseIdent(true); if (node.property.name !== "target") { this.raiseRecoverable(node.property.start, "The only valid meta property for new is 'new.target'"); } if (containsEsc) { this.raiseRecoverable(node.start, "'new.target' must not contain escaped characters"); } if (!this.allowNewDotTarget) { this.raiseRecoverable(node.start, "'new.target' can only be used in functions and class static block"); } return this.finishNode(node, "MetaProperty"); } var startPos = this.start, startLoc = this.startLoc; node.callee = this.parseSubscripts(this.parseExprAtom(null, false, true), startPos, startLoc, true, false); if (this.eat(types$1.parenL)) { node.arguments = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false); } else { node.arguments = empty; } return this.finishNode(node, "NewExpression"); }; pp$5.parseTemplateElement = function(ref2) { var isTagged = ref2.isTagged; var elem = this.startNode(); if (this.type === types$1.invalidTemplate) { if (!isTagged) { this.raiseRecoverable(this.start, "Bad escape sequence in untagged template literal"); } elem.value = { raw: this.value.replace(/\r\n?/g, "\n"), cooked: null }; } else { elem.value = { raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"), cooked: this.value }; } this.next(); elem.tail = this.type === types$1.backQuote; return this.finishNode(elem, "TemplateElement"); }; pp$5.parseTemplate = function(ref2) { if (ref2 === void 0) ref2 = {}; var isTagged = ref2.isTagged; if (isTagged === void 0) isTagged = false; var node = this.startNode(); this.next(); node.expressions = []; var curElt = this.parseTemplateElement({ isTagged }); node.quasis = [curElt]; while (!curElt.tail) { if (this.type === types$1.eof) { this.raise(this.pos, "Unterminated template literal"); } this.expect(types$1.dollarBraceL); node.expressions.push(this.parseExpression()); this.expect(types$1.braceR); node.quasis.push(curElt = this.parseTemplateElement({ isTagged })); } this.next(); return this.finishNode(node, "TemplateLiteral"); }; pp$5.isAsyncProp = function(prop) { return !prop.computed && prop.key.type === "Identifier" && prop.key.name === "async" && (this.type === types$1.name || this.type === types$1.num || this.type === types$1.string || this.type === types$1.bracketL || this.type.keyword || this.options.ecmaVersion >= 9 && this.type === types$1.star) && !lineBreak.test(this.input.slice(this.lastTokEnd, this.start)); }; pp$5.parseObj = function(isPattern, refDestructuringErrors) { var node = this.startNode(), first = true, propHash = {}; node.properties = []; this.next(); while (!this.eat(types$1.braceR)) { if (!first) { this.expect(types$1.comma); if (this.options.ecmaVersion >= 5 && this.afterTrailingComma(types$1.braceR)) { break; } } else { first = false; } var prop = this.parseProperty(isPattern, refDestructuringErrors); if (!isPattern) { this.checkPropClash(prop, propHash, refDestructuringErrors); } node.properties.push(prop); } return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression"); }; pp$5.parseProperty = function(isPattern, refDestructuringErrors) { var prop = this.startNode(), isGenerator, isAsync, startPos, startLoc; if (this.options.ecmaVersion >= 9 && this.eat(types$1.ellipsis)) { if (isPattern) { prop.argument = this.parseIdent(false); if (this.type === types$1.comma) { this.raiseRecoverable(this.start, "Comma is not permitted after the rest element"); } return this.finishNode(prop, "RestElement"); } prop.argument = this.parseMaybeAssign(false, refDestructuringErrors); if (this.type === types$1.comma && refDestructuringErrors && refDestructuringErrors.trailingComma < 0) { refDestructuringErrors.trailingComma = this.start; } return this.finishNode(prop, "SpreadElement"); } if (this.options.ecmaVersion >= 6) { prop.method = false; prop.shorthand = false; if (isPattern || refDestructuringErrors) { startPos = this.start; startLoc = this.startLoc; } if (!isPattern) { isGenerator = this.eat(types$1.star); } } var containsEsc = this.containsEsc; this.parsePropertyName(prop); if (!isPattern && !containsEsc && this.options.ecmaVersion >= 8 && !isGenerator && this.isAsyncProp(prop)) { isAsync = true; isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$1.star); this.parsePropertyName(prop); } else { isAsync = false; } this.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc); return this.finishNode(prop, "Property"); }; pp$5.parseGetterSetter = function(prop) { prop.kind = prop.key.name; this.parsePropertyName(prop); prop.value = this.parseMethod(false); var paramCount = prop.kind === "get" ? 0 : 1; if (prop.value.params.length !== paramCount) { var start = prop.value.start; if (prop.kind === "get") { this.raiseRecoverable(start, "getter should have no params"); } else { this.raiseRecoverable(start, "setter should have exactly one param"); } } else { if (prop.kind === "set" && prop.value.params[0].type === "RestElement") { this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params"); } } }; pp$5.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors, containsEsc) { if ((isGenerator || isAsync) && this.type === types$1.colon) { this.unexpected(); } if (this.eat(types$1.colon)) { prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors); prop.kind = "init"; } else if (this.options.ecmaVersion >= 6 && this.type === types$1.parenL) { if (isPattern) { this.unexpected(); } prop.kind = "init"; prop.method = true; prop.value = this.parseMethod(isGenerator, isAsync); } else if (!isPattern && !containsEsc && this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type !== types$1.comma && this.type !== types$1.braceR && this.type !== types$1.eq)) { if (isGenerator || isAsync) { this.unexpected(); } this.parseGetterSetter(prop); } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { if (isGenerator || isAsync) { this.unexpected(); } this.checkUnreserved(prop.key); if (prop.key.name === "await" && !this.awaitIdentPos) { this.awaitIdentPos = startPos; } prop.kind = "init"; if (isPattern) { prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key)); } else if (this.type === types$1.eq && refDestructuringErrors) { if (refDestructuringErrors.shorthandAssign < 0) { refDestructuringErrors.shorthandAssign = this.start; } prop.value = this.parseMaybeDefault(startPos, startLoc, this.copyNode(prop.key)); } else { prop.value = this.copyNode(prop.key); } prop.shorthand = true; } else { this.unexpected(); } }; pp$5.parsePropertyName = function(prop) { if (this.options.ecmaVersion >= 6) { if (this.eat(types$1.bracketL)) { prop.computed = true; prop.key = this.parseMaybeAssign(); this.expect(types$1.bracketR); return prop.key; } else { prop.computed = false; } } return prop.key = this.type === types$1.num || this.type === types$1.string ? this.parseExprAtom() : this.parseIdent(this.options.allowReserved !== "never"); }; pp$5.initFunction = function(node) { node.id = null; if (this.options.ecmaVersion >= 6) { node.generator = node.expression = false; } if (this.options.ecmaVersion >= 8) { node.async = false; } }; pp$5.parseMethod = function(isGenerator, isAsync, allowDirectSuper) { var node = this.startNode(), oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; this.initFunction(node); if (this.options.ecmaVersion >= 6) { node.generator = isGenerator; } if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; } this.yieldPos = 0; this.awaitPos = 0; this.awaitIdentPos = 0; this.enterScope(functionFlags(isAsync, node.generator) | SCOPE_SUPER | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0)); this.expect(types$1.parenL); node.params = this.parseBindingList(types$1.parenR, false, this.options.ecmaVersion >= 8); this.checkYieldAwaitInDefaultParams(); this.parseFunctionBody(node, false, true, false); this.yieldPos = oldYieldPos; this.awaitPos = oldAwaitPos; this.awaitIdentPos = oldAwaitIdentPos; return this.finishNode(node, "FunctionExpression"); }; pp$5.parseArrowExpression = function(node, params, isAsync, forInit) { var oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldAwaitIdentPos = this.awaitIdentPos; this.enterScope(functionFlags(isAsync, false) | SCOPE_ARROW); this.initFunction(node); if (this.options.ecmaVersion >= 8) { node.async = !!isAsync; } this.yieldPos = 0; this.awaitPos = 0; this.awaitIdentPos = 0; node.params = this.toAssignableList(params, true); this.parseFunctionBody(node, true, false, forInit); this.yieldPos = oldYieldPos; this.awaitPos = oldAwaitPos; this.awaitIdentPos = oldAwaitIdentPos; return this.finishNode(node, "ArrowFunctionExpression"); }; pp$5.parseFunctionBody = function(node, isArrowFunction, isMethod, forInit) { var isExpression = isArrowFunction && this.type !== types$1.braceL; var oldStrict = this.strict, useStrict = false; if (isExpression) { node.body = this.parseMaybeAssign(forInit); node.expression = true; this.checkParams(node, false); } else { var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params); if (!oldStrict || nonSimple) { useStrict = this.strictDirective(this.end); if (useStrict && nonSimple) { this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list"); } } var oldLabels = this.labels; this.labels = []; if (useStrict) { this.strict = true; } this.checkParams(node, !oldStrict && !useStrict && !isArrowFunction && !isMethod && this.isSimpleParamList(node.params)); if (this.strict && node.id) { this.checkLValSimple(node.id, BIND_OUTSIDE); } node.body = this.parseBlock(false, void 0, useStrict && !oldStrict); node.expression = false; this.adaptDirectivePrologue(node.body.body); this.labels = oldLabels; } this.exitScope(); }; pp$5.isSimpleParamList = function(params) { for (var i2 = 0, list2 = params; i2 < list2.length; i2 += 1) { var param = list2[i2]; if (param.type !== "Identifier") { return false; } } return true; }; pp$5.checkParams = function(node, allowDuplicates) { var nameHash = /* @__PURE__ */ Object.create(null); for (var i2 = 0, list2 = node.params; i2 < list2.length; i2 += 1) { var param = list2[i2]; this.checkLValInnerPattern(param, BIND_VAR, allowDuplicates ? null : nameHash); } }; pp$5.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { var elts = [], first = true; while (!this.eat(close)) { if (!first) { this.expect(types$1.comma); if (allowTrailingComma && this.afterTrailingComma(close)) { break; } } else { first = false; } var elt = void 0; if (allowEmpty && this.type === types$1.comma) { elt = null; } else if (this.type === types$1.ellipsis) { elt = this.parseSpread(refDestructuringErrors); if (refDestructuringErrors && this.type === types$1.comma && refDestructuringErrors.trailingComma < 0) { refDestructuringErrors.trailingComma = this.start; } } else { elt = this.parseMaybeAssign(false, refDestructuringErrors); } elts.push(elt); } return elts; }; pp$5.checkUnreserved = function(ref2) { var start = ref2.start; var end = ref2.end; var name42 = ref2.name; if (this.inGenerator && name42 === "yield") { this.raiseRecoverable(start, "Cannot use 'yield' as identifier inside a generator"); } if (this.inAsync && name42 === "await") { this.raiseRecoverable(start, "Cannot use 'await' as identifier inside an async function"); } if (this.currentThisScope().inClassFieldInit && name42 === "arguments") { this.raiseRecoverable(start, "Cannot use 'arguments' in class field initializer"); } if (this.inClassStaticBlock && (name42 === "arguments" || name42 === "await")) { this.raise(start, "Cannot use " + name42 + " in class static initialization block"); } if (this.keywords.test(name42)) { this.raise(start, "Unexpected keyword '" + name42 + "'"); } if (this.options.ecmaVersion < 6 && this.input.slice(start, end).indexOf("\\") !== -1) { return; } var re = this.strict ? this.reservedWordsStrict : this.reservedWords; if (re.test(name42)) { if (!this.inAsync && name42 === "await") { this.raiseRecoverable(start, "Cannot use keyword 'await' outside an async function"); } this.raiseRecoverable(start, "The keyword '" + name42 + "' is reserved"); } }; pp$5.parseIdent = function(liberal) { var node = this.parseIdentNode(); this.next(!!liberal); this.finishNode(node, "Identifier"); if (!liberal) { this.checkUnreserved(node); if (node.name === "await" && !this.awaitIdentPos) { this.awaitIdentPos = node.start; } } return node; }; pp$5.parseIdentNode = function() { var node = this.startNode(); if (this.type === types$1.name) { node.name = this.value; } else if (this.type.keyword) { node.name = this.type.keyword; if ((node.name === "class" || node.name === "function") && (this.lastTokEnd !== this.lastTokStart + 1 || this.input.charCodeAt(this.lastTokStart) !== 46)) { this.context.pop(); } this.type = types$1.name; } else { this.unexpected(); } return node; }; pp$5.parsePrivateIdent = function() { var node = this.startNode(); if (this.type === types$1.privateId) { node.name = this.value; } else { this.unexpected(); } this.next(); this.finishNode(node, "PrivateIdentifier"); if (this.options.checkPrivateFields) { if (this.privateNameStack.length === 0) { this.raise(node.start, "Private field '#" + node.name + "' must be declared in an enclosing class"); } else { this.privateNameStack[this.privateNameStack.length - 1].used.push(node); } } return node; }; pp$5.parseYield = function(forInit) { if (!this.yieldPos) { this.yieldPos = this.start; } var node = this.startNode(); this.next(); if (this.type === types$1.semi || this.canInsertSemicolon() || this.type !== types$1.star && !this.type.startsExpr) { node.delegate = false; node.argument = null; } else { node.delegate = this.eat(types$1.star); node.argument = this.parseMaybeAssign(forInit); } return this.finishNode(node, "YieldExpression"); }; pp$5.parseAwait = function(forInit) { if (!this.awaitPos) { this.awaitPos = this.start; } var node = this.startNode(); this.next(); node.argument = this.parseMaybeUnary(null, true, false, forInit); return this.finishNode(node, "AwaitExpression"); }; var pp$4 = Parser.prototype; pp$4.raise = function(pos, message) { var loc = getLineInfo(this.input, pos); message += " (" + loc.line + ":" + loc.column + ")"; var err = new SyntaxError(message); err.pos = pos; err.loc = loc; err.raisedAt = this.pos; throw err; }; pp$4.raiseRecoverable = pp$4.raise; pp$4.curPosition = function() { if (this.options.locations) { return new Position(this.curLine, this.pos - this.lineStart); } }; var pp$3 = Parser.prototype; var Scope = function Scope2(flags) { this.flags = flags; this.var = []; this.lexical = []; this.functions = []; this.inClassFieldInit = false; }; pp$3.enterScope = function(flags) { this.scopeStack.push(new Scope(flags)); }; pp$3.exitScope = function() { this.scopeStack.pop(); }; pp$3.treatFunctionsAsVarInScope = function(scope) { return scope.flags & SCOPE_FUNCTION || !this.inModule && scope.flags & SCOPE_TOP; }; pp$3.declareName = function(name42, bindingType, pos) { var redeclared = false; if (bindingType === BIND_LEXICAL) { var scope = this.currentScope(); redeclared = scope.lexical.indexOf(name42) > -1 || scope.functions.indexOf(name42) > -1 || scope.var.indexOf(name42) > -1; scope.lexical.push(name42); if (this.inModule && scope.flags & SCOPE_TOP) { delete this.undefinedExports[name42]; } } else if (bindingType === BIND_SIMPLE_CATCH) { var scope$1 = this.currentScope(); scope$1.lexical.push(name42); } else if (bindingType === BIND_FUNCTION) { var scope$2 = this.currentScope(); if (this.treatFunctionsAsVar) { redeclared = scope$2.lexical.indexOf(name42) > -1; } else { redeclared = scope$2.lexical.indexOf(name42) > -1 || scope$2.var.indexOf(name42) > -1; } scope$2.functions.push(name42); } else { for (var i2 = this.scopeStack.length - 1; i2 >= 0; --i2) { var scope$3 = this.scopeStack[i2]; if (scope$3.lexical.indexOf(name42) > -1 && !(scope$3.flags & SCOPE_SIMPLE_CATCH && scope$3.lexical[0] === name42) || !this.treatFunctionsAsVarInScope(scope$3) && scope$3.functions.indexOf(name42) > -1) { redeclared = true; break; } scope$3.var.push(name42); if (this.inModule && scope$3.flags & SCOPE_TOP) { delete this.undefinedExports[name42]; } if (scope$3.flags & SCOPE_VAR) { break; } } } if (redeclared) { this.raiseRecoverable(pos, "Identifier '" + name42 + "' has already been declared"); } }; pp$3.checkLocalExport = function(id) { if (this.scopeStack[0].lexical.indexOf(id.name) === -1 && this.scopeStack[0].var.indexOf(id.name) === -1) { this.undefinedExports[id.name] = id; } }; pp$3.currentScope = function() { return this.scopeStack[this.scopeStack.length - 1]; }; pp$3.currentVarScope = function() { for (var i2 = this.scopeStack.length - 1; ; i2--) { var scope = this.scopeStack[i2]; if (scope.flags & SCOPE_VAR) { return scope; } } }; pp$3.currentThisScope = function() { for (var i2 = this.scopeStack.length - 1; ; i2--) { var scope = this.scopeStack[i2]; if (scope.flags & SCOPE_VAR && !(scope.flags & SCOPE_ARROW)) { return scope; } } }; var Node = function Node2(parser, pos, loc) { this.type = ""; this.start = pos; this.end = 0; if (parser.options.locations) { this.loc = new SourceLocation(parser, loc); } if (parser.options.directSourceFile) { this.sourceFile = parser.options.directSourceFile; } if (parser.options.ranges) { this.range = [pos, 0]; } }; var pp$2 = Parser.prototype; pp$2.startNode = function() { return new Node(this, this.start, this.startLoc); }; pp$2.startNodeAt = function(pos, loc) { return new Node(this, pos, loc); }; function finishNodeAt(node, type, pos, loc) { node.type = type; node.end = pos; if (this.options.locations) { node.loc.end = loc; } if (this.options.ranges) { node.range[1] = pos; } return node; } pp$2.finishNode = function(node, type) { return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc); }; pp$2.finishNodeAt = function(node, type, pos, loc) { return finishNodeAt.call(this, node, type, pos, loc); }; pp$2.copyNode = function(node) { var newNode = new Node(this, node.start, this.startLoc); for (var prop in node) { newNode[prop] = node[prop]; } return newNode; }; var scriptValuesAddedInUnicode = "Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sunu Sunuwar Todhri Todr Tulu_Tigalari Tutg Unknown Zzzz"; var ecma9BinaryProperties = "ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS"; var ecma10BinaryProperties = ecma9BinaryProperties + " Extended_Pictographic"; var ecma11BinaryProperties = ecma10BinaryProperties; var ecma12BinaryProperties = ecma11BinaryProperties + " EBase EComp EMod EPres ExtPict"; var ecma13BinaryProperties = ecma12BinaryProperties; var ecma14BinaryProperties = ecma13BinaryProperties; var unicodeBinaryProperties = { 9: ecma9BinaryProperties, 10: ecma10BinaryProperties, 11: ecma11BinaryProperties, 12: ecma12BinaryProperties, 13: ecma13BinaryProperties, 14: ecma14BinaryProperties }; var ecma14BinaryPropertiesOfStrings = "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"; var unicodeBinaryPropertiesOfStrings = { 9: "", 10: "", 11: "", 12: "", 13: "", 14: ecma14BinaryPropertiesOfStrings }; var unicodeGeneralCategoryValues = "Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu"; var ecma9ScriptValues = "Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb"; var ecma10ScriptValues = ecma9ScriptValues + " Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd"; var ecma11ScriptValues = ecma10ScriptValues + " Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho"; var ecma12ScriptValues = ecma11ScriptValues + " Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi"; var ecma13ScriptValues = ecma12ScriptValues + " Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith"; var ecma14ScriptValues = ecma13ScriptValues + " " + scriptValuesAddedInUnicode; var unicodeScriptValues = { 9: ecma9ScriptValues, 10: ecma10ScriptValues, 11: ecma11ScriptValues, 12: ecma12ScriptValues, 13: ecma13ScriptValues, 14: ecma14ScriptValues }; var data = {}; function buildUnicodeData(ecmaVersion2) { var d = data[ecmaVersion2] = { binary: wordsRegexp(unicodeBinaryProperties[ecmaVersion2] + " " + unicodeGeneralCategoryValues), binaryOfStrings: wordsRegexp(unicodeBinaryPropertiesOfStrings[ecmaVersion2]), nonBinary: { General_Category: wordsRegexp(unicodeGeneralCategoryValues), Script: wordsRegexp(unicodeScriptValues[ecmaVersion2]) } }; d.nonBinary.Script_Extensions = d.nonBinary.Script; d.nonBinary.gc = d.nonBinary.General_Category; d.nonBinary.sc = d.nonBinary.Script; d.nonBinary.scx = d.nonBinary.Script_Extensions; } for (var i = 0, list = [9, 10, 11, 12, 13, 14]; i < list.length; i += 1) { var ecmaVersion = list[i]; buildUnicodeData(ecmaVersion); } var pp$1 = Parser.prototype; var BranchID = function BranchID2(parent, base) { this.parent = parent; this.base = base || this; }; BranchID.prototype.separatedFrom = function separatedFrom(alt) { for (var self2 = this; self2; self2 = self2.parent) { for (var other = alt; other; other = other.parent) { if (self2.base === other.base && self2 !== other) { return true; } } } return false; }; BranchID.prototype.sibling = function sibling() { return new BranchID(this.parent, this.base); }; var RegExpValidationState = function RegExpValidationState2(parser) { this.parser = parser; this.validFlags = "gim" + (parser.options.ecmaVersion >= 6 ? "uy" : "") + (parser.options.ecmaVersion >= 9 ? "s" : "") + (parser.options.ecmaVersion >= 13 ? "d" : "") + (parser.options.ecmaVersion >= 15 ? "v" : ""); this.unicodeProperties = data[parser.options.ecmaVersion >= 14 ? 14 : parser.options.ecmaVersion]; this.source = ""; this.flags = ""; this.start = 0; this.switchU = false; this.switchV = false; this.switchN = false; this.pos = 0; this.lastIntValue = 0; this.lastStringValue = ""; this.lastAssertionIsQuantifiable = false; this.numCapturingParens = 0; this.maxBackReference = 0; this.groupNames = /* @__PURE__ */ Object.create(null); this.backReferenceNames = []; this.branchID = null; }; RegExpValidationState.prototype.reset = function reset(start, pattern, flags) { var unicodeSets = flags.indexOf("v") !== -1; var unicode = flags.indexOf("u") !== -1; this.start = start | 0; this.source = pattern + ""; this.flags = flags; if (unicodeSets && this.parser.options.ecmaVersion >= 15) { this.switchU = true; this.switchV = true; this.switchN = true; } else { this.switchU = unicode && this.parser.options.ecmaVersion >= 6; this.switchV = false; this.switchN = unicode && this.parser.options.ecmaVersion >= 9; } }; RegExpValidationState.prototype.raise = function raise(message) { this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + message); }; RegExpValidationState.prototype.at = function at(i2, forceU) { if (forceU === void 0) forceU = false; var s = this.source; var l = s.length; if (i2 >= l) { return -1; } var c = s.charCodeAt(i2); if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 || i2 + 1 >= l) { return c; } var next = s.charCodeAt(i2 + 1); return next >= 56320 && next <= 57343 ? (c << 10) + next - 56613888 : c; }; RegExpValidationState.prototype.nextIndex = function nextIndex(i2, forceU) { if (forceU === void 0) forceU = false; var s = this.source; var l = s.length; if (i2 >= l) { return l; } var c = s.charCodeAt(i2), next; if (!(forceU || this.switchU) || c <= 55295 || c >= 57344 || i2 + 1 >= l || (next = s.charCodeAt(i2 + 1)) < 56320 || next > 57343) { return i2 + 1; } return i2 + 2; }; RegExpValidationState.prototype.current = function current(forceU) { if (forceU === void 0) forceU = false; return this.at(this.pos, forceU); }; RegExpValidationState.prototype.lookahead = function lookahead(forceU) { if (forceU === void 0) forceU = false; return this.at(this.nextIndex(this.pos, forceU), forceU); }; RegExpValidationState.prototype.advance = function advance(forceU) { if (forceU === void 0) forceU = false; this.pos = this.nextIndex(this.pos, forceU); }; RegExpValidationState.prototype.eat = function eat(ch, forceU) { if (forceU === void 0) forceU = false; if (this.current(forceU) === ch) { this.advance(forceU); return true; } return false; }; RegExpValidationState.prototype.eatChars = function eatChars(chs, forceU) { if (forceU === void 0) forceU = false; var pos = this.pos; for (var i2 = 0, list2 = chs; i2 < list2.length; i2 += 1) { var ch = list2[i2]; var current = this.at(pos, forceU); if (current === -1 || current !== ch) { return false; } pos = this.nextIndex(pos, forceU); } this.pos = pos; return true; }; pp$1.validateRegExpFlags = function(state) { var validFlags = state.validFlags; var flags = state.flags; var u = false; var v = false; for (var i2 = 0; i2 < flags.length; i2++) { var flag = flags.charAt(i2); if (validFlags.indexOf(flag) === -1) { this.raise(state.start, "Invalid regular expression flag"); } if (flags.indexOf(flag, i2 + 1) > -1) { this.raise(state.start, "Duplicate regular expression flag"); } if (flag === "u") { u = true; } if (flag === "v") { v = true; } } if (this.options.ecmaVersion >= 15 && u && v) { this.raise(state.start, "Invalid regular expression flag"); } }; function hasProp(obj) { for (var _ in obj) { return true; } return false; } pp$1.validateRegExpPattern = function(state) { this.regexp_pattern(state); if (!state.switchN && this.options.ecmaVersion >= 9 && hasProp(state.groupNames)) { state.switchN = true; this.regexp_pattern(state); } }; pp$1.regexp_pattern = function(state) { state.pos = 0; state.lastIntValue = 0; state.lastStringValue = ""; state.lastAssertionIsQuantifiable = false; state.numCapturingParens = 0; state.maxBackReference = 0; state.groupNames = /* @__PURE__ */ Object.create(null); state.backReferenceNames.length = 0; state.branchID = null; this.regexp_disjunction(state); if (state.pos !== state.source.length) { if (state.eat( 41 /* ) */ )) { state.raise("Unmatched ')'"); } if (state.eat( 93 /* ] */ ) || state.eat( 125 /* } */ )) { state.raise("Lone quantifier brackets"); } } if (state.maxBackReference > state.numCapturingParens) { state.raise("Invalid escape"); } for (var i2 = 0, list2 = state.backReferenceNames; i2 < list2.length; i2 += 1) { var name42 = list2[i2]; if (!state.groupNames[name42]) { state.raise("Invalid named capture referenced"); } } }; pp$1.regexp_disjunction = function(state) { var trackDisjunction = this.options.ecmaVersion >= 16; if (trackDisjunction) { state.branchID = new BranchID(state.branchID, null); } this.regexp_alternative(state); while (state.eat( 124 /* | */ )) { if (trackDisjunction) { state.branchID = state.branchID.sibling(); } this.regexp_alternative(state); } if (trackDisjunction) { state.branchID = state.branchID.parent; } if (this.regexp_eatQuantifier(state, true)) { state.raise("Nothing to repeat"); } if (state.eat( 123 /* { */ )) { state.raise("Lone quantifier brackets"); } }; pp$1.regexp_alternative = function(state) { while (state.pos < state.source.length && this.regexp_eatTerm(state)) { } }; pp$1.regexp_eatTerm = function(state) { if (this.regexp_eatAssertion(state)) { if (state.lastAssertionIsQuantifiable && this.regexp_eatQuantifier(state)) { if (state.switchU) { state.raise("Invalid quantifier"); } } return true; } if (state.switchU ? this.regexp_eatAtom(state) : this.regexp_eatExtendedAtom(state)) { this.regexp_eatQuantifier(state); return true; } return false; }; pp$1.regexp_eatAssertion = function(state) { var start = state.pos; state.lastAssertionIsQuantifiable = false; if (state.eat( 94 /* ^ */ ) || state.eat( 36 /* $ */ )) { return true; } if (state.eat( 92 /* \ */ )) { if (state.eat( 66 /* B */ ) || state.eat( 98 /* b */ )) { return true; } state.pos = start; } if (state.eat( 40 /* ( */ ) && state.eat( 63 /* ? */ )) { var lookbehind = false; if (this.options.ecmaVersion >= 9) { lookbehind = state.eat( 60 /* < */ ); } if (state.eat( 61 /* = */ ) || state.eat( 33 /* ! */ )) { this.regexp_disjunction(state); if (!state.eat( 41 /* ) */ )) { state.raise("Unterminated group"); } state.lastAssertionIsQuantifiable = !lookbehind; return true; } } state.pos = start; return false; }; pp$1.regexp_eatQuantifier = function(state, noError) { if (noError === void 0) noError = false; if (this.regexp_eatQuantifierPrefix(state, noError)) { state.eat( 63 /* ? */ ); return true; } return false; }; pp$1.regexp_eatQuantifierPrefix = function(state, noError) { return state.eat( 42 /* * */ ) || state.eat( 43 /* + */ ) || state.eat( 63 /* ? */ ) || this.regexp_eatBracedQuantifier(state, noError); }; pp$1.regexp_eatBracedQuantifier = function(state, noError) { var start = state.pos; if (state.eat( 123 /* { */ )) { var min = 0, max = -1; if (this.regexp_eatDecimalDigits(state)) { min = state.lastIntValue; if (state.eat( 44 /* , */ ) && this.regexp_eatDecimalDigits(state)) { max = state.lastIntValue; } if (state.eat( 125 /* } */ )) { if (max !== -1 && max < min && !noError) { state.raise("numbers out of order in {} quantifier"); } return true; } } if (state.switchU && !noError) { state.raise("Incomplete quantifier"); } state.pos = start; } return false; }; pp$1.regexp_eatAtom = function(state) { return this.regexp_eatPatternCharacters(state) || state.eat( 46 /* . */ ) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state); }; pp$1.regexp_eatReverseSolidusAtomEscape = function(state) { var start = state.pos; if (state.eat( 92 /* \ */ )) { if (this.regexp_eatAtomEscape(state)) { return true; } state.pos = start; } return false; }; pp$1.regexp_eatUncapturingGroup = function(state) { var start = state.pos; if (state.eat( 40 /* ( */ )) { if (state.eat( 63 /* ? */ )) { if (this.options.ecmaVersion >= 16) { var addModifiers = this.regexp_eatModifiers(state); var hasHyphen = state.eat( 45 /* - */ ); if (addModifiers || hasHyphen) { for (var i2 = 0; i2 < addModifiers.length; i2++) { var modifier = addModifiers.charAt(i2); if (addModifiers.indexOf(modifier, i2 + 1) > -1) { state.raise("Duplicate regular expression modifiers"); } } if (hasHyphen) { var removeModifiers = this.regexp_eatModifiers(state); if (!addModifiers && !removeModifiers && state.current() === 58) { state.raise("Invalid regular expression modifiers"); } for (var i$1 = 0; i$1 < removeModifiers.length; i$1++) { var modifier$1 = removeModifiers.charAt(i$1); if (removeModifiers.indexOf(modifier$1, i$1 + 1) > -1 || addModifiers.indexOf(modifier$1) > -1) { state.raise("Duplicate regular expression modifiers"); } } } } } if (state.eat( 58 /* : */ )) { this.regexp_disjunction(state); if (state.eat( 41 /* ) */ )) { return true; } state.raise("Unterminated group"); } } state.pos = start; } return false; }; pp$1.regexp_eatCapturingGroup = function(state) { if (state.eat( 40 /* ( */ )) { if (this.options.ecmaVersion >= 9) { this.regexp_groupSpecifier(state); } else if (state.current() === 63) { state.raise("Invalid group"); } this.regexp_disjunction(state); if (state.eat( 41 /* ) */ )) { state.numCapturingParens += 1; return true; } state.raise("Unterminated group"); } return false; }; pp$1.regexp_eatModifiers = function(state) { var modifiers = ""; var ch = 0; while ((ch = state.current()) !== -1 && isRegularExpressionModifier(ch)) { modifiers += codePointToString(ch); state.advance(); } return modifiers; }; function isRegularExpressionModifier(ch) { return ch === 105 || ch === 109 || ch === 115; } pp$1.regexp_eatExtendedAtom = function(state) { return state.eat( 46 /* . */ ) || this.regexp_eatReverseSolidusAtomEscape(state) || this.regexp_eatCharacterClass(state) || this.regexp_eatUncapturingGroup(state) || this.regexp_eatCapturingGroup(state) || this.regexp_eatInvalidBracedQuantifier(state) || this.regexp_eatExtendedPatternCharacter(state); }; pp$1.regexp_eatInvalidBracedQuantifier = function(state) { if (this.regexp_eatBracedQuantifier(state, true)) { state.raise("Nothing to repeat"); } return false; }; pp$1.regexp_eatSyntaxCharacter = function(state) { var ch = state.current(); if (isSyntaxCharacter(ch)) { state.lastIntValue = ch; state.advance(); return true; } return false; }; function isSyntaxCharacter(ch) { return ch === 36 || ch >= 40 && ch <= 43 || ch === 46 || ch === 63 || ch >= 91 && ch <= 94 || ch >= 123 && ch <= 125; } pp$1.regexp_eatPatternCharacters = function(state) { var start = state.pos; var ch = 0; while ((ch = state.current()) !== -1 && !isSyntaxCharacter(ch)) { state.advance(); } return state.pos !== start; }; pp$1.regexp_eatExtendedPatternCharacter = function(state) { var ch = state.current(); if (ch !== -1 && ch !== 36 && !(ch >= 40 && ch <= 43) && ch !== 46 && ch !== 63 && ch !== 91 && ch !== 94 && ch !== 124) { state.advance(); return true; } return false; }; pp$1.regexp_groupSpecifier = function(state) { if (state.eat( 63 /* ? */ )) { if (!this.regexp_eatGroupName(state)) { state.raise("Invalid group"); } var trackDisjunction = this.options.ecmaVersion >= 16; var known = state.groupNames[state.lastStringValue]; if (known) { if (trackDisjunction) { for (var i2 = 0, list2 = known; i2 < list2.length; i2 += 1) { var altID = list2[i2]; if (!altID.separatedFrom(state.branchID)) { state.raise("Duplicate capture group name"); } } } else { state.raise("Duplicate capture group name"); } } if (trackDisjunction) { (known || (state.groupNames[state.lastStringValue] = [])).push(state.branchID); } else { state.groupNames[state.lastStringValue] = true; } } }; pp$1.regexp_eatGroupName = function(state) { state.lastStringValue = ""; if (state.eat( 60 /* < */ )) { if (this.regexp_eatRegExpIdentifierName(state) && state.eat( 62 /* > */ )) { return true; } state.raise("Invalid capture group name"); } return false; }; pp$1.regexp_eatRegExpIdentifierName = function(state) { state.lastStringValue = ""; if (this.regexp_eatRegExpIdentifierStart(state)) { state.lastStringValue += codePointToString(state.lastIntValue); while (this.regexp_eatRegExpIdentifierPart(state)) { state.lastStringValue += codePointToString(state.lastIntValue); } return true; } return false; }; pp$1.regexp_eatRegExpIdentifierStart = function(state) { var start = state.pos; var forceU = this.options.ecmaVersion >= 11; var ch = state.current(forceU); state.advance(forceU); if (ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) { ch = state.lastIntValue; } if (isRegExpIdentifierStart(ch)) { state.lastIntValue = ch; return true; } state.pos = start; return false; }; function isRegExpIdentifierStart(ch) { return isIdentifierStart2(ch, true) || ch === 36 || ch === 95; } pp$1.regexp_eatRegExpIdentifierPart = function(state) { var start = state.pos; var forceU = this.options.ecmaVersion >= 11; var ch = state.current(forceU); state.advance(forceU); if (ch === 92 && this.regexp_eatRegExpUnicodeEscapeSequence(state, forceU)) { ch = state.lastIntValue; } if (isRegExpIdentifierPart(ch)) { state.lastIntValue = ch; return true; } state.pos = start; return false; }; function isRegExpIdentifierPart(ch) { return isIdentifierChar(ch, true) || ch === 36 || ch === 95 || ch === 8204 || ch === 8205; } pp$1.regexp_eatAtomEscape = function(state) { if (this.regexp_eatBackReference(state) || this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state) || state.switchN && this.regexp_eatKGroupName(state)) { return true; } if (state.switchU) { if (state.current() === 99) { state.raise("Invalid unicode escape"); } state.raise("Invalid escape"); } return false; }; pp$1.regexp_eatBackReference = function(state) { var start = state.pos; if (this.regexp_eatDecimalEscape(state)) { var n2 = state.lastIntValue; if (state.switchU) { if (n2 > state.maxBackReference) { state.maxBackReference = n2; } return true; } if (n2 <= state.numCapturingParens) { return true; } state.pos = start; } return false; }; pp$1.regexp_eatKGroupName = function(state) { if (state.eat( 107 /* k */ )) { if (this.regexp_eatGroupName(state)) { state.backReferenceNames.push(state.lastStringValue); return true; } state.raise("Invalid named reference"); } return false; }; pp$1.regexp_eatCharacterEscape = function(state) { return this.regexp_eatControlEscape(state) || this.regexp_eatCControlLetter(state) || this.regexp_eatZero(state) || this.regexp_eatHexEscapeSequence(state) || this.regexp_eatRegExpUnicodeEscapeSequence(state, false) || !state.switchU && this.regexp_eatLegacyOctalEscapeSequence(state) || this.regexp_eatIdentityEscape(state); }; pp$1.regexp_eatCControlLetter = function(state) { var start = state.pos; if (state.eat( 99 /* c */ )) { if (this.regexp_eatControlLetter(state)) { return true; } state.pos = start; } return false; }; pp$1.regexp_eatZero = function(state) { if (state.current() === 48 && !isDecimalDigit(state.lookahead())) { state.lastIntValue = 0; state.advance(); return true; } return false; }; pp$1.regexp_eatControlEscape = function(state) { var ch = state.current(); if (ch === 116) { state.lastIntValue = 9; state.advance(); return true; } if (ch === 110) { state.lastIntValue = 10; state.advance(); return true; } if (ch === 118) { state.lastIntValue = 11; state.advance(); return true; } if (ch === 102) { state.lastIntValue = 12; state.advance(); return true; } if (ch === 114) { state.lastIntValue = 13; state.advance(); return true; } return false; }; pp$1.regexp_eatControlLetter = function(state) { var ch = state.current(); if (isControlLetter(ch)) { state.lastIntValue = ch % 32; state.advance(); return true; } return false; }; function isControlLetter(ch) { return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122; } pp$1.regexp_eatRegExpUnicodeEscapeSequence = function(state, forceU) { if (forceU === void 0) forceU = false; var start = state.pos; var switchU = forceU || state.switchU; if (state.eat( 117 /* u */ )) { if (this.regexp_eatFixedHexDigits(state, 4)) { var lead = state.lastIntValue; if (switchU && lead >= 55296 && lead <= 56319) { var leadSurrogateEnd = state.pos; if (state.eat( 92 /* \ */ ) && state.eat( 117 /* u */ ) && this.regexp_eatFixedHexDigits(state, 4)) { var trail = state.lastIntValue; if (trail >= 56320 && trail <= 57343) { state.lastIntValue = (lead - 55296) * 1024 + (trail - 56320) + 65536; return true; } } state.pos = leadSurrogateEnd; state.lastIntValue = lead; } return true; } if (switchU && state.eat( 123 /* { */ ) && this.regexp_eatHexDigits(state) && state.eat( 125 /* } */ ) && isValidUnicode(state.lastIntValue)) { return true; } if (switchU) { state.raise("Invalid unicode escape"); } state.pos = start; } return false; }; function isValidUnicode(ch) { return ch >= 0 && ch <= 1114111; } pp$1.regexp_eatIdentityEscape = function(state) { if (state.switchU) { if (this.regexp_eatSyntaxCharacter(state)) { return true; } if (state.eat( 47 /* / */ )) { state.lastIntValue = 47; return true; } return false; } var ch = state.current(); if (ch !== 99 && (!state.switchN || ch !== 107)) { state.lastIntValue = ch; state.advance(); return true; } return false; }; pp$1.regexp_eatDecimalEscape = function(state) { state.lastIntValue = 0; var ch = state.current(); if (ch >= 49 && ch <= 57) { do { state.lastIntValue = 10 * state.lastIntValue + (ch - 48); state.advance(); } while ((ch = state.current()) >= 48 && ch <= 57); return true; } return false; }; var CharSetNone = 0; var CharSetOk = 1; var CharSetString = 2; pp$1.regexp_eatCharacterClassEscape = function(state) { var ch = state.current(); if (isCharacterClassEscape(ch)) { state.lastIntValue = -1; state.advance(); return CharSetOk; } var negate = false; if (state.switchU && this.options.ecmaVersion >= 9 && ((negate = ch === 80) || ch === 112)) { state.lastIntValue = -1; state.advance(); var result; if (state.eat( 123 /* { */ ) && (result = this.regexp_eatUnicodePropertyValueExpression(state)) && state.eat( 125 /* } */ )) { if (negate && result === CharSetString) { state.raise("Invalid property name"); } return result; } state.raise("Invalid property name"); } return CharSetNone; }; function isCharacterClassEscape(ch) { return ch === 100 || ch === 68 || ch === 115 || ch === 83 || ch === 119 || ch === 87; } pp$1.regexp_eatUnicodePropertyValueExpression = function(state) { var start = state.pos; if (this.regexp_eatUnicodePropertyName(state) && state.eat( 61 /* = */ )) { var name42 = state.lastStringValue; if (this.regexp_eatUnicodePropertyValue(state)) { var value = state.lastStringValue; this.regexp_validateUnicodePropertyNameAndValue(state, name42, value); return CharSetOk; } } state.pos = start; if (this.regexp_eatLoneUnicodePropertyNameOrValue(state)) { var nameOrValue = state.lastStringValue; return this.regexp_validateUnicodePropertyNameOrValue(state, nameOrValue); } return CharSetNone; }; pp$1.regexp_validateUnicodePropertyNameAndValue = function(state, name42, value) { if (!hasOwn(state.unicodeProperties.nonBinary, name42)) { state.raise("Invalid property name"); } if (!state.unicodeProperties.nonBinary[name42].test(value)) { state.raise("Invalid property value"); } }; pp$1.regexp_validateUnicodePropertyNameOrValue = function(state, nameOrValue) { if (state.unicodeProperties.binary.test(nameOrValue)) { return CharSetOk; } if (state.switchV && state.unicodeProperties.binaryOfStrings.test(nameOrValue)) { return CharSetString; } state.raise("Invalid property name"); }; pp$1.regexp_eatUnicodePropertyName = function(state) { var ch = 0; state.lastStringValue = ""; while (isUnicodePropertyNameCharacter(ch = state.current())) { state.lastStringValue += codePointToString(ch); state.advance(); } return state.lastStringValue !== ""; }; function isUnicodePropertyNameCharacter(ch) { return isControlLetter(ch) || ch === 95; } pp$1.regexp_eatUnicodePropertyValue = function(state) { var ch = 0; state.lastStringValue = ""; while (isUnicodePropertyValueCharacter(ch = state.current())) { state.lastStringValue += codePointToString(ch); state.advance(); } return state.lastStringValue !== ""; }; function isUnicodePropertyValueCharacter(ch) { return isUnicodePropertyNameCharacter(ch) || isDecimalDigit(ch); } pp$1.regexp_eatLoneUnicodePropertyNameOrValue = function(state) { return this.regexp_eatUnicodePropertyValue(state); }; pp$1.regexp_eatCharacterClass = function(state) { if (state.eat( 91 /* [ */ )) { var negate = state.eat( 94 /* ^ */ ); var result = this.regexp_classContents(state); if (!state.eat( 93 /* ] */ )) { state.raise("Unterminated character class"); } if (negate && result === CharSetString) { state.raise("Negated character class may contain strings"); } return true; } return false; }; pp$1.regexp_classContents = function(state) { if (state.current() === 93) { return CharSetOk; } if (state.switchV) { return this.regexp_classSetExpression(state); } this.regexp_nonEmptyClassRanges(state); return CharSetOk; }; pp$1.regexp_nonEmptyClassRanges = function(state) { while (this.regexp_eatClassAtom(state)) { var left = state.lastIntValue; if (state.eat( 45 /* - */ ) && this.regexp_eatClassAtom(state)) { var right = state.lastIntValue; if (state.switchU && (left === -1 || right === -1)) { state.raise("Invalid character class"); } if (left !== -1 && right !== -1 && left > right) { state.raise("Range out of order in character class"); } } } }; pp$1.regexp_eatClassAtom = function(state) { var start = state.pos; if (state.eat( 92 /* \ */ )) { if (this.regexp_eatClassEscape(state)) { return true; } if (state.switchU) { var ch$1 = state.current(); if (ch$1 === 99 || isOctalDigit(ch$1)) { state.raise("Invalid class escape"); } state.raise("Invalid escape"); } state.pos = start; } var ch = state.current(); if (ch !== 93) { state.lastIntValue = ch; state.advance(); return true; } return false; }; pp$1.regexp_eatClassEscape = function(state) { var start = state.pos; if (state.eat( 98 /* b */ )) { state.lastIntValue = 8; return true; } if (state.switchU && state.eat( 45 /* - */ )) { state.lastIntValue = 45; return true; } if (!state.switchU && state.eat( 99 /* c */ )) { if (this.regexp_eatClassControlLetter(state)) { return true; } state.pos = start; } return this.regexp_eatCharacterClassEscape(state) || this.regexp_eatCharacterEscape(state); }; pp$1.regexp_classSetExpression = function(state) { var result = CharSetOk, subResult; if (this.regexp_eatClassSetRange(state)) ; else if (subResult = this.regexp_eatClassSetOperand(state)) { if (subResult === CharSetString) { result = CharSetString; } var start = state.pos; while (state.eatChars( [38, 38] /* && */ )) { if (state.current() !== 38 && (subResult = this.regexp_eatClassSetOperand(state))) { if (subResult !== CharSetString) { result = CharSetOk; } continue; } state.raise("Invalid character in character class"); } if (start !== state.pos) { return result; } while (state.eatChars( [45, 45] /* -- */ )) { if (this.regexp_eatClassSetOperand(state)) { continue; } state.raise("Invalid character in character class"); } if (start !== state.pos) { return result; } } else { state.raise("Invalid character in character class"); } for (; ; ) { if (this.regexp_eatClassSetRange(state)) { continue; } subResult = this.regexp_eatClassSetOperand(state); if (!subResult) { return result; } if (subResult === CharSetString) { result = CharSetString; } } }; pp$1.regexp_eatClassSetRange = function(state) { var start = state.pos; if (this.regexp_eatClassSetCharacter(state)) { var left = state.lastIntValue; if (state.eat( 45 /* - */ ) && this.regexp_eatClassSetCharacter(state)) { var right = state.lastIntValue; if (left !== -1 && right !== -1 && left > right) { state.raise("Range out of order in character class"); } return true; } state.pos = start; } return false; }; pp$1.regexp_eatClassSetOperand = function(state) { if (this.regexp_eatClassSetCharacter(state)) { return CharSetOk; } return this.regexp_eatClassStringDisjunction(state) || this.regexp_eatNestedClass(state); }; pp$1.regexp_eatNestedClass = function(state) { var start = state.pos; if (state.eat( 91 /* [ */ )) { var negate = state.eat( 94 /* ^ */ ); var result = this.regexp_classContents(state); if (state.eat( 93 /* ] */ )) { if (negate && result === CharSetString) { state.raise("Negated character class may contain strings"); } return result; } state.pos = start; } if (state.eat( 92 /* \ */ )) { var result$1 = this.regexp_eatCharacterClassEscape(state); if (result$1) { return result$1; } state.pos = start; } return null; }; pp$1.regexp_eatClassStringDisjunction = function(state) { var start = state.pos; if (state.eatChars( [92, 113] /* \q */ )) { if (state.eat( 123 /* { */ )) { var result = this.regexp_classStringDisjunctionContents(state); if (state.eat( 125 /* } */ )) { return result; } } else { state.raise("Invalid escape"); } state.pos = start; } return null; }; pp$1.regexp_classStringDisjunctionContents = function(state) { var result = this.regexp_classString(state); while (state.eat( 124 /* | */ )) { if (this.regexp_classString(state) === CharSetString) { result = CharSetString; } } return result; }; pp$1.regexp_classString = function(state) { var count = 0; while (this.regexp_eatClassSetCharacter(state)) { count++; } return count === 1 ? CharSetOk : CharSetString; }; pp$1.regexp_eatClassSetCharacter = function(state) { var start = state.pos; if (state.eat( 92 /* \ */ )) { if (this.regexp_eatCharacterEscape(state) || this.regexp_eatClassSetReservedPunctuator(state)) { return true; } if (state.eat( 98 /* b */ )) { state.lastIntValue = 8; return true; } state.pos = start; return false; } var ch = state.current(); if (ch < 0 || ch === state.lookahead() && isClassSetReservedDoublePunctuatorCharacter(ch)) { return false; } if (isClassSetSyntaxCharacter(ch)) { return false; } state.advance(); state.lastIntValue = ch; return true; }; function isClassSetReservedDoublePunctuatorCharacter(ch) { return ch === 33 || ch >= 35 && ch <= 38 || ch >= 42 && ch <= 44 || ch === 46 || ch >= 58 && ch <= 64 || ch === 94 || ch === 96 || ch === 126; } function isClassSetSyntaxCharacter(ch) { return ch === 40 || ch === 41 || ch === 45 || ch === 47 || ch >= 91 && ch <= 93 || ch >= 123 && ch <= 125; } pp$1.regexp_eatClassSetReservedPunctuator = function(state) { var ch = state.current(); if (isClassSetReservedPunctuator(ch)) { state.lastIntValue = ch; state.advance(); return true; } return false; }; function isClassSetReservedPunctuator(ch) { return ch === 33 || ch === 35 || ch === 37 || ch === 38 || ch === 44 || ch === 45 || ch >= 58 && ch <= 62 || ch === 64 || ch === 96 || ch === 126; } pp$1.regexp_eatClassControlLetter = function(state) { var ch = state.current(); if (isDecimalDigit(ch) || ch === 95) { state.lastIntValue = ch % 32; state.advance(); return true; } return false; }; pp$1.regexp_eatHexEscapeSequence = function(state) { var start = state.pos; if (state.eat( 120 /* x */ )) { if (this.regexp_eatFixedHexDigits(state, 2)) { return true; } if (state.switchU) { state.raise("Invalid escape"); } state.pos = start; } return false; }; pp$1.regexp_eatDecimalDigits = function(state) { var start = state.pos; var ch = 0; state.lastIntValue = 0; while (isDecimalDigit(ch = state.current())) { state.lastIntValue = 10 * state.lastIntValue + (ch - 48); state.advance(); } return state.pos !== start; }; function isDecimalDigit(ch) { return ch >= 48 && ch <= 57; } pp$1.regexp_eatHexDigits = function(state) { var start = state.pos; var ch = 0; state.lastIntValue = 0; while (isHexDigit2(ch = state.current())) { state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); state.advance(); } return state.pos !== start; }; function isHexDigit2(ch) { return ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102; } function hexToInt(ch) { if (ch >= 65 && ch <= 70) { return 10 + (ch - 65); } if (ch >= 97 && ch <= 102) { return 10 + (ch - 97); } return ch - 48; } pp$1.regexp_eatLegacyOctalEscapeSequence = function(state) { if (this.regexp_eatOctalDigit(state)) { var n1 = state.lastIntValue; if (this.regexp_eatOctalDigit(state)) { var n2 = state.lastIntValue; if (n1 <= 3 && this.regexp_eatOctalDigit(state)) { state.lastIntValue = n1 * 64 + n2 * 8 + state.lastIntValue; } else { state.lastIntValue = n1 * 8 + n2; } } else { state.lastIntValue = n1; } return true; } return false; }; pp$1.regexp_eatOctalDigit = function(state) { var ch = state.current(); if (isOctalDigit(ch)) { state.lastIntValue = ch - 48; state.advance(); return true; } state.lastIntValue = 0; return false; }; function isOctalDigit(ch) { return ch >= 48 && ch <= 55; } pp$1.regexp_eatFixedHexDigits = function(state, length2) { var start = state.pos; state.lastIntValue = 0; for (var i2 = 0; i2 < length2; ++i2) { var ch = state.current(); if (!isHexDigit2(ch)) { state.pos = start; return false; } state.lastIntValue = 16 * state.lastIntValue + hexToInt(ch); state.advance(); } return true; }; var Token = function Token2(p) { this.type = p.type; this.value = p.value; this.start = p.start; this.end = p.end; if (p.options.locations) { this.loc = new SourceLocation(p, p.startLoc, p.endLoc); } if (p.options.ranges) { this.range = [p.start, p.end]; } }; var pp = Parser.prototype; pp.next = function(ignoreEscapeSequenceInKeyword) { if (!ignoreEscapeSequenceInKeyword && this.type.keyword && this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword " + this.type.keyword); } if (this.options.onToken) { this.options.onToken(new Token(this)); } this.lastTokEnd = this.end; this.lastTokStart = this.start; this.lastTokEndLoc = this.endLoc; this.lastTokStartLoc = this.startLoc; this.nextToken(); }; pp.getToken = function() { this.next(); return new Token(this); }; if (typeof Symbol !== "undefined") { pp[Symbol.iterator] = function() { var this$1$1 = this; return { next: function() { var token = this$1$1.getToken(); return { done: token.type === types$1.eof, value: token }; } }; }; } pp.nextToken = function() { var curContext = this.curContext(); if (!curContext || !curContext.preserveSpace) { this.skipSpace(); } this.start = this.pos; if (this.options.locations) { this.startLoc = this.curPosition(); } if (this.pos >= this.input.length) { return this.finishToken(types$1.eof); } if (curContext.override) { return curContext.override(this); } else { this.readToken(this.fullCharCodeAtPos()); } }; pp.readToken = function(code2) { if (isIdentifierStart2(code2, this.options.ecmaVersion >= 6) || code2 === 92) { return this.readWord(); } return this.getTokenFromCode(code2); }; pp.fullCharCodeAtPos = function() { var code2 = this.input.charCodeAt(this.pos); if (code2 <= 55295 || code2 >= 56320) { return code2; } var next = this.input.charCodeAt(this.pos + 1); return next <= 56319 || next >= 57344 ? code2 : (code2 << 10) + next - 56613888; }; pp.skipBlockComment = function() { var startLoc = this.options.onComment && this.curPosition(); var start = this.pos, end = this.input.indexOf("*/", this.pos += 2); if (end === -1) { this.raise(this.pos - 2, "Unterminated comment"); } this.pos = end + 2; if (this.options.locations) { for (var nextBreak = void 0, pos = start; (nextBreak = nextLineBreak(this.input, pos, this.pos)) > -1; ) { ++this.curLine; pos = this.lineStart = nextBreak; } } if (this.options.onComment) { this.options.onComment( true, this.input.slice(start + 2, end), start, this.pos, startLoc, this.curPosition() ); } }; pp.skipLineComment = function(startSkip) { var start = this.pos; var startLoc = this.options.onComment && this.curPosition(); var ch = this.input.charCodeAt(this.pos += startSkip); while (this.pos < this.input.length && !isNewLine(ch)) { ch = this.input.charCodeAt(++this.pos); } if (this.options.onComment) { this.options.onComment( false, this.input.slice(start + startSkip, this.pos), start, this.pos, startLoc, this.curPosition() ); } }; pp.skipSpace = function() { loop: while (this.pos < this.input.length) { var ch = this.input.charCodeAt(this.pos); switch (ch) { case 32: case 160: ++this.pos; break; case 13: if (this.input.charCodeAt(this.pos + 1) === 10) { ++this.pos; } case 10: case 8232: case 8233: ++this.pos; if (this.options.locations) { ++this.curLine; this.lineStart = this.pos; } break; case 47: switch (this.input.charCodeAt(this.pos + 1)) { case 42: this.skipBlockComment(); break; case 47: this.skipLineComment(2); break; default: break loop; } break; default: if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { ++this.pos; } else { break loop; } } } }; pp.finishToken = function(type, val) { this.end = this.pos; if (this.options.locations) { this.endLoc = this.curPosition(); } var prevType = this.type; this.type = type; this.value = val; this.updateContext(prevType); }; pp.readToken_dot = function() { var next = this.input.charCodeAt(this.pos + 1); if (next >= 48 && next <= 57) { return this.readNumber(true); } var next2 = this.input.charCodeAt(this.pos + 2); if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { this.pos += 3; return this.finishToken(types$1.ellipsis); } else { ++this.pos; return this.finishToken(types$1.dot); } }; pp.readToken_slash = function() { var next = this.input.charCodeAt(this.pos + 1); if (this.exprAllowed) { ++this.pos; return this.readRegexp(); } if (next === 61) { return this.finishOp(types$1.assign, 2); } return this.finishOp(types$1.slash, 1); }; pp.readToken_mult_modulo_exp = function(code2) { var next = this.input.charCodeAt(this.pos + 1); var size = 1; var tokentype = code2 === 42 ? types$1.star : types$1.modulo; if (this.options.ecmaVersion >= 7 && code2 === 42 && next === 42) { ++size; tokentype = types$1.starstar; next = this.input.charCodeAt(this.pos + 2); } if (next === 61) { return this.finishOp(types$1.assign, size + 1); } return this.finishOp(tokentype, size); }; pp.readToken_pipe_amp = function(code2) { var next = this.input.charCodeAt(this.pos + 1); if (next === code2) { if (this.options.ecmaVersion >= 12) { var next2 = this.input.charCodeAt(this.pos + 2); if (next2 === 61) { return this.finishOp(types$1.assign, 3); } } return this.finishOp(code2 === 124 ? types$1.logicalOR : types$1.logicalAND, 2); } if (next === 61) { return this.finishOp(types$1.assign, 2); } return this.finishOp(code2 === 124 ? types$1.bitwiseOR : types$1.bitwiseAND, 1); }; pp.readToken_caret = function() { var next = this.input.charCodeAt(this.pos + 1); if (next === 61) { return this.finishOp(types$1.assign, 2); } return this.finishOp(types$1.bitwiseXOR, 1); }; pp.readToken_plus_min = function(code2) { var next = this.input.charCodeAt(this.pos + 1); if (next === code2) { if (next === 45 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 62 && (this.lastTokEnd === 0 || lineBreak.test(this.input.slice(this.lastTokEnd, this.pos)))) { this.skipLineComment(3); this.skipSpace(); return this.nextToken(); } return this.finishOp(types$1.incDec, 2); } if (next === 61) { return this.finishOp(types$1.assign, 2); } return this.finishOp(types$1.plusMin, 1); }; pp.readToken_lt_gt = function(code2) { var next = this.input.charCodeAt(this.pos + 1); var size = 1; if (next === code2) { size = code2 === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2; if (this.input.charCodeAt(this.pos + size) === 61) { return this.finishOp(types$1.assign, size + 1); } return this.finishOp(types$1.bitShift, size); } if (next === 33 && code2 === 60 && !this.inModule && this.input.charCodeAt(this.pos + 2) === 45 && this.input.charCodeAt(this.pos + 3) === 45) { this.skipLineComment(4); this.skipSpace(); return this.nextToken(); } if (next === 61) { size = 2; } return this.finishOp(types$1.relational, size); }; pp.readToken_eq_excl = function(code2) { var next = this.input.charCodeAt(this.pos + 1); if (next === 61) { return this.finishOp(types$1.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2); } if (code2 === 61 && next === 62 && this.options.ecmaVersion >= 6) { this.pos += 2; return this.finishToken(types$1.arrow); } return this.finishOp(code2 === 61 ? types$1.eq : types$1.prefix, 1); }; pp.readToken_question = function() { var ecmaVersion2 = this.options.ecmaVersion; if (ecmaVersion2 >= 11) { var next = this.input.charCodeAt(this.pos + 1); if (next === 46) { var next2 = this.input.charCodeAt(this.pos + 2); if (next2 < 48 || next2 > 57) { return this.finishOp(types$1.questionDot, 2); } } if (next === 63) { if (ecmaVersion2 >= 12) { var next2$1 = this.input.charCodeAt(this.pos + 2); if (next2$1 === 61) { return this.finishOp(types$1.assign, 3); } } return this.finishOp(types$1.coalesce, 2); } } return this.finishOp(types$1.question, 1); }; pp.readToken_numberSign = function() { var ecmaVersion2 = this.options.ecmaVersion; var code2 = 35; if (ecmaVersion2 >= 13) { ++this.pos; code2 = this.fullCharCodeAtPos(); if (isIdentifierStart2(code2, true) || code2 === 92) { return this.finishToken(types$1.privateId, this.readWord1()); } } this.raise(this.pos, "Unexpected character '" + codePointToString(code2) + "'"); }; pp.getTokenFromCode = function(code2) { switch (code2) { case 46: return this.readToken_dot(); case 40: ++this.pos; return this.finishToken(types$1.parenL); case 41: ++this.pos; return this.finishToken(types$1.parenR); case 59: ++this.pos; return this.finishToken(types$1.semi); case 44: ++this.pos; return this.finishToken(types$1.comma); case 91: ++this.pos; return this.finishToken(types$1.bracketL); case 93: ++this.pos; return this.finishToken(types$1.bracketR); case 123: ++this.pos; return this.finishToken(types$1.braceL); case 125: ++this.pos; return this.finishToken(types$1.braceR); case 58: ++this.pos; return this.finishToken(types$1.colon); case 96: if (this.options.ecmaVersion < 6) { break; } ++this.pos; return this.finishToken(types$1.backQuote); case 48: var next = this.input.charCodeAt(this.pos + 1); if (next === 120 || next === 88) { return this.readRadixNumber(16); } if (this.options.ecmaVersion >= 6) { if (next === 111 || next === 79) { return this.readRadixNumber(8); } if (next === 98 || next === 66) { return this.readRadixNumber(2); } } case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: return this.readNumber(false); case 34: case 39: return this.readString(code2); case 47: return this.readToken_slash(); case 37: case 42: return this.readToken_mult_modulo_exp(code2); case 124: case 38: return this.readToken_pipe_amp(code2); case 94: return this.readToken_caret(); case 43: case 45: return this.readToken_plus_min(code2); case 60: case 62: return this.readToken_lt_gt(code2); case 61: case 33: return this.readToken_eq_excl(code2); case 63: return this.readToken_question(); case 126: return this.finishOp(types$1.prefix, 1); case 35: return this.readToken_numberSign(); } this.raise(this.pos, "Unexpected character '" + codePointToString(code2) + "'"); }; pp.finishOp = function(type, size) { var str = this.input.slice(this.pos, this.pos + size); this.pos += size; return this.finishToken(type, str); }; pp.readRegexp = function() { var escaped, inClass, start = this.pos; for (; ; ) { if (this.pos >= this.input.length) { this.raise(start, "Unterminated regular expression"); } var ch = this.input.charAt(this.pos); if (lineBreak.test(ch)) { this.raise(start, "Unterminated regular expression"); } if (!escaped) { if (ch === "[") { inClass = true; } else if (ch === "]" && inClass) { inClass = false; } else if (ch === "/" && !inClass) { break; } escaped = ch === "\\"; } else { escaped = false; } ++this.pos; } var pattern = this.input.slice(start, this.pos); ++this.pos; var flagsStart = this.pos; var flags = this.readWord1(); if (this.containsEsc) { this.unexpected(flagsStart); } var state = this.regexpState || (this.regexpState = new RegExpValidationState(this)); state.reset(start, pattern, flags); this.validateRegExpFlags(state); this.validateRegExpPattern(state); var value = null; try { value = new RegExp(pattern, flags); } catch (e2) { } return this.finishToken(types$1.regexp, { pattern, flags, value }); }; pp.readInt = function(radix, len, maybeLegacyOctalNumericLiteral) { var allowSeparators = this.options.ecmaVersion >= 12 && len === void 0; var isLegacyOctalNumericLiteral = maybeLegacyOctalNumericLiteral && this.input.charCodeAt(this.pos) === 48; var start = this.pos, total = 0, lastCode = 0; for (var i2 = 0, e2 = len == null ? Infinity : len; i2 < e2; ++i2, ++this.pos) { var code2 = this.input.charCodeAt(this.pos), val = void 0; if (allowSeparators && code2 === 95) { if (isLegacyOctalNumericLiteral) { this.raiseRecoverable(this.pos, "Numeric separator is not allowed in legacy octal numeric literals"); } if (lastCode === 95) { this.raiseRecoverable(this.pos, "Numeric separator must be exactly one underscore"); } if (i2 === 0) { this.raiseRecoverable(this.pos, "Numeric separator is not allowed at the first of digits"); } lastCode = code2; continue; } if (code2 >= 97) { val = code2 - 97 + 10; } else if (code2 >= 65) { val = code2 - 65 + 10; } else if (code2 >= 48 && code2 <= 57) { val = code2 - 48; } else { val = Infinity; } if (val >= radix) { break; } lastCode = code2; total = total * radix + val; } if (allowSeparators && lastCode === 95) { this.raiseRecoverable(this.pos - 1, "Numeric separator is not allowed at the last of digits"); } if (this.pos === start || len != null && this.pos - start !== len) { return null; } return total; }; function stringToNumber(str, isLegacyOctalNumericLiteral) { if (isLegacyOctalNumericLiteral) { return parseInt(str, 8); } return parseFloat(str.replace(/_/g, "")); } function stringToBigInt(str) { if (typeof BigInt !== "function") { return null; } return BigInt(str.replace(/_/g, "")); } pp.readRadixNumber = function(radix) { var start = this.pos; this.pos += 2; var val = this.readInt(radix); if (val == null) { this.raise(this.start + 2, "Expected number in radix " + radix); } if (this.options.ecmaVersion >= 11 && this.input.charCodeAt(this.pos) === 110) { val = stringToBigInt(this.input.slice(start, this.pos)); ++this.pos; } else if (isIdentifierStart2(this.fullCharCodeAtPos())) { this.raise(this.pos, "Identifier directly after number"); } return this.finishToken(types$1.num, val); }; pp.readNumber = function(startsWithDot) { var start = this.pos; if (!startsWithDot && this.readInt(10, void 0, true) === null) { this.raise(start, "Invalid number"); } var octal = this.pos - start >= 2 && this.input.charCodeAt(start) === 48; if (octal && this.strict) { this.raise(start, "Invalid number"); } var next = this.input.charCodeAt(this.pos); if (!octal && !startsWithDot && this.options.ecmaVersion >= 11 && next === 110) { var val$1 = stringToBigInt(this.input.slice(start, this.pos)); ++this.pos; if (isIdentifierStart2(this.fullCharCodeAtPos())) { this.raise(this.pos, "Identifier directly after number"); } return this.finishToken(types$1.num, val$1); } if (octal && /[89]/.test(this.input.slice(start, this.pos))) { octal = false; } if (next === 46 && !octal) { ++this.pos; this.readInt(10); next = this.input.charCodeAt(this.pos); } if ((next === 69 || next === 101) && !octal) { next = this.input.charCodeAt(++this.pos); if (next === 43 || next === 45) { ++this.pos; } if (this.readInt(10) === null) { this.raise(start, "Invalid number"); } } if (isIdentifierStart2(this.fullCharCodeAtPos())) { this.raise(this.pos, "Identifier directly after number"); } var val = stringToNumber(this.input.slice(start, this.pos), octal); return this.finishToken(types$1.num, val); }; pp.readCodePoint = function() { var ch = this.input.charCodeAt(this.pos), code2; if (ch === 123) { if (this.options.ecmaVersion < 6) { this.unexpected(); } var codePos = ++this.pos; code2 = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos); ++this.pos; if (code2 > 1114111) { this.invalidStringToken(codePos, "Code point out of bounds"); } } else { code2 = this.readHexChar(4); } return code2; }; pp.readString = function(quote) { var out = "", chunkStart = ++this.pos; for (; ; ) { if (this.pos >= this.input.length) { this.raise(this.start, "Unterminated string constant"); } var ch = this.input.charCodeAt(this.pos); if (ch === quote) { break; } if (ch === 92) { out += this.input.slice(chunkStart, this.pos); out += this.readEscapedChar(false); chunkStart = this.pos; } else if (ch === 8232 || ch === 8233) { if (this.options.ecmaVersion < 10) { this.raise(this.start, "Unterminated string constant"); } ++this.pos; if (this.options.locations) { this.curLine++; this.lineStart = this.pos; } } else { if (isNewLine(ch)) { this.raise(this.start, "Unterminated string constant"); } ++this.pos; } } out += this.input.slice(chunkStart, this.pos++); return this.finishToken(types$1.string, out); }; var INVALID_TEMPLATE_ESCAPE_ERROR = {}; pp.tryReadTemplateToken = function() { this.inTemplateElement = true; try { this.readTmplToken(); } catch (err) { if (err === INVALID_TEMPLATE_ESCAPE_ERROR) { this.readInvalidTemplateToken(); } else { throw err; } } this.inTemplateElement = false; }; pp.invalidStringToken = function(position2, message) { if (this.inTemplateElement && this.options.ecmaVersion >= 9) { throw INVALID_TEMPLATE_ESCAPE_ERROR; } else { this.raise(position2, message); } }; pp.readTmplToken = function() { var out = "", chunkStart = this.pos; for (; ; ) { if (this.pos >= this.input.length) { this.raise(this.start, "Unterminated template"); } var ch = this.input.charCodeAt(this.pos); if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) { if (this.pos === this.start && (this.type === types$1.template || this.type === types$1.invalidTemplate)) { if (ch === 36) { this.pos += 2; return this.finishToken(types$1.dollarBraceL); } else { ++this.pos; return this.finishToken(types$1.backQuote); } } out += this.input.slice(chunkStart, this.pos); return this.finishToken(types$1.template, out); } if (ch === 92) { out += this.input.slice(chunkStart, this.pos); out += this.readEscapedChar(true); chunkStart = this.pos; } else if (isNewLine(ch)) { out += this.input.slice(chunkStart, this.pos); ++this.pos; switch (ch) { case 13: if (this.input.charCodeAt(this.pos) === 10) { ++this.pos; } case 10: out += "\n"; break; default: out += String.fromCharCode(ch); break; } if (this.options.locations) { ++this.curLine; this.lineStart = this.pos; } chunkStart = this.pos; } else { ++this.pos; } } }; pp.readInvalidTemplateToken = function() { for (; this.pos < this.input.length; this.pos++) { switch (this.input[this.pos]) { case "\\": ++this.pos; break; case "$": if (this.input[this.pos + 1] !== "{") { break; } case "`": return this.finishToken(types$1.invalidTemplate, this.input.slice(this.start, this.pos)); case "\r": if (this.input[this.pos + 1] === "\n") { ++this.pos; } case "\n": case "\u2028": case "\u2029": ++this.curLine; this.lineStart = this.pos + 1; break; } } this.raise(this.start, "Unterminated template"); }; pp.readEscapedChar = function(inTemplate) { var ch = this.input.charCodeAt(++this.pos); ++this.pos; switch (ch) { case 110: return "\n"; case 114: return "\r"; case 120: return String.fromCharCode(this.readHexChar(2)); case 117: return codePointToString(this.readCodePoint()); case 116: return " "; case 98: return "\b"; case 118: return "\v"; case 102: return "\f"; case 13: if (this.input.charCodeAt(this.pos) === 10) { ++this.pos; } case 10: if (this.options.locations) { this.lineStart = this.pos; ++this.curLine; } return ""; case 56: case 57: if (this.strict) { this.invalidStringToken( this.pos - 1, "Invalid escape sequence" ); } if (inTemplate) { var codePos = this.pos - 1; this.invalidStringToken( codePos, "Invalid escape sequence in template string" ); } default: if (ch >= 48 && ch <= 55) { var octalStr = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/)[0]; var octal = parseInt(octalStr, 8); if (octal > 255) { octalStr = octalStr.slice(0, -1); octal = parseInt(octalStr, 8); } this.pos += octalStr.length - 1; ch = this.input.charCodeAt(this.pos); if ((octalStr !== "0" || ch === 56 || ch === 57) && (this.strict || inTemplate)) { this.invalidStringToken( this.pos - 1 - octalStr.length, inTemplate ? "Octal literal in template string" : "Octal literal in strict mode" ); } return String.fromCharCode(octal); } if (isNewLine(ch)) { if (this.options.locations) { this.lineStart = this.pos; ++this.curLine; } return ""; } return String.fromCharCode(ch); } }; pp.readHexChar = function(len) { var codePos = this.pos; var n2 = this.readInt(16, len); if (n2 === null) { this.invalidStringToken(codePos, "Bad character escape sequence"); } return n2; }; pp.readWord1 = function() { this.containsEsc = false; var word = "", first = true, chunkStart = this.pos; var astral = this.options.ecmaVersion >= 6; while (this.pos < this.input.length) { var ch = this.fullCharCodeAtPos(); if (isIdentifierChar(ch, astral)) { this.pos += ch <= 65535 ? 1 : 2; } else if (ch === 92) { this.containsEsc = true; word += this.input.slice(chunkStart, this.pos); var escStart = this.pos; if (this.input.charCodeAt(++this.pos) !== 117) { this.invalidStringToken(this.pos, "Expecting Unicode escape sequence \\uXXXX"); } ++this.pos; var esc = this.readCodePoint(); if (!(first ? isIdentifierStart2 : isIdentifierChar)(esc, astral)) { this.invalidStringToken(escStart, "Invalid Unicode escape"); } word += codePointToString(esc); chunkStart = this.pos; } else { break; } first = false; } return word + this.input.slice(chunkStart, this.pos); }; pp.readWord = function() { var word = this.readWord1(); var type = types$1.name; if (this.keywords.test(word)) { type = keywords2[word]; } return this.finishToken(type, word); }; var version2 = "8.14.0"; Parser.acorn = { Parser, version: version2, defaultOptions, Position, SourceLocation, getLineInfo, Node, TokenType, tokTypes: types$1, keywordTypes: keywords2, TokContext, tokContexts: types, isIdentifierChar, isIdentifierStart: isIdentifierStart2, Token, isNewLine, lineBreak, lineBreakG, nonASCIIwhitespace }; function parse44(input, options) { return Parser.parse(input, options); } function parseExpressionAt(input, pos, options) { return Parser.parseExpressionAt(input, pos, options); } function tokenizer(input, options) { return Parser.tokenizer(input, options); } exports2.Node = Node; exports2.Parser = Parser; exports2.Position = Position; exports2.SourceLocation = SourceLocation; exports2.TokContext = TokContext; exports2.Token = Token; exports2.TokenType = TokenType; exports2.defaultOptions = defaultOptions; exports2.getLineInfo = getLineInfo; exports2.isIdentifierChar = isIdentifierChar; exports2.isIdentifierStart = isIdentifierStart2; exports2.isNewLine = isNewLine; exports2.keywordTypes = keywords2; exports2.lineBreak = lineBreak; exports2.lineBreakG = lineBreakG; exports2.nonASCIIwhitespace = nonASCIIwhitespace; exports2.parse = parse44; exports2.parseExpressionAt = parseExpressionAt; exports2.tokContexts = types; exports2.tokTypes = types$1; exports2.tokenizer = tokenizer; exports2.version = version2; }); } }); // node_modules/.pnpm/ufo@1.5.4/node_modules/ufo/dist/index.cjs var require_dist = __commonJS({ "node_modules/.pnpm/ufo@1.5.4/node_modules/ufo/dist/index.cjs"(exports) { "use strict"; var n2 = /[^\0-\x7E]/; var t = /[\x2E\u3002\uFF0E\uFF61]/g; var o = { overflow: "Overflow Error", "not-basic": "Illegal Input", "invalid-input": "Invalid Input" }; var e2 = Math.floor; var r = String.fromCharCode; function s(n22) { throw new RangeError(o[n22]); } var c = function(n22, t2) { return n22 + 22 + 75 * (n22 < 26) - ((t2 != 0) << 5); }; var u = function(n22, t2, o2) { let r2 = 0; for (n22 = o2 ? e2(n22 / 700) : n22 >> 1, n22 += e2(n22 / t2); n22 > 455; r2 += 36) { n22 = e2(n22 / 35); } return e2(r2 + 36 * n22 / (n22 + 38)); }; function toASCII(o2) { return function(n22, o3) { const e22 = n22.split("@"); let r2 = ""; e22.length > 1 && (r2 = e22[0] + "@", n22 = e22[1]); const s2 = function(n3, t2) { const o4 = []; let e3 = n3.length; for (; e3--; ) { o4[e3] = t2(n3[e3]); } return o4; }((n22 = n22.replace(t, ".")).split("."), o3).join("."); return r2 + s2; }(o2, function(t2) { return n2.test(t2) ? "xn--" + function(n22) { const t3 = []; const o3 = (n22 = function(n3) { const t4 = []; let o4 = 0; const e22 = n3.length; for (; o4 < e22; ) { const r2 = n3.charCodeAt(o4++); if (r2 >= 55296 && r2 <= 56319 && o4 < e22) { const e3 = n3.charCodeAt(o4++); (64512 & e3) == 56320 ? t4.push(((1023 & r2) << 10) + (1023 & e3) + 65536) : (t4.push(r2), o4--); } else { t4.push(r2); } } return t4; }(n22)).length; let f = 128; let i = 0; let l = 72; for (const o4 of n22) { o4 < 128 && t3.push(r(o4)); } const h2 = t3.length; let p = h2; for (h2 && t3.push("-"); p < o3; ) { let o4 = 2147483647; for (const t4 of n22) { t4 >= f && t4 < o4 && (o4 = t4); } const a = p + 1; o4 - f > e2((2147483647 - i) / a) && s("overflow"), i += (o4 - f) * a, f = o4; for (const o5 of n22) { if (o5 < f && ++i > 2147483647 && s("overflow"), o5 == f) { let n3 = i; for (let o6 = 36; ; o6 += 36) { const s2 = o6 <= l ? 1 : o6 >= l + 26 ? 26 : o6 - l; if (n3 < s2) { break; } const u2 = n3 - s2; const f2 = 36 - s2; t3.push(r(c(s2 + u2 % f2, 0))), n3 = e2(u2 / f2); } t3.push(r(c(n3, 0))), l = u(i, a, p == h2), i = 0, ++p; } } ++i, ++f; } return t3.join(""); }(t2) : t2; }); } var HASH_RE = /#/g; var AMPERSAND_RE = /&/g; var SLASH_RE = /\//g; var EQUAL_RE = /=/g; var IM_RE = /\?/g; var PLUS_RE = /\+/g; var ENC_CARET_RE = /%5e/gi; var ENC_BACKTICK_RE = /%60/gi; var ENC_CURLY_OPEN_RE = /%7b/gi; var ENC_PIPE_RE = /%7c/gi; var ENC_CURLY_CLOSE_RE = /%7d/gi; var ENC_SPACE_RE = /%20/gi; var ENC_SLASH_RE = /%2f/gi; var ENC_ENC_SLASH_RE = /%252f/gi; function encode4(text) { return encodeURI("" + text).replace(ENC_PIPE_RE, "|"); } function encodeHash(text) { return encode4(text).replace(ENC_CURLY_OPEN_RE, "{").replace(ENC_CURLY_CLOSE_RE, "}").replace(ENC_CARET_RE, "^"); } function encodeQueryValue(input) { return encode4(typeof input === "string" ? input : JSON.stringify(input)).replace(PLUS_RE, "%2B").replace(ENC_SPACE_RE, "+").replace(HASH_RE, "%23").replace(AMPERSAND_RE, "%26").replace(ENC_BACKTICK_RE, "`").replace(ENC_CARET_RE, "^").replace(SLASH_RE, "%2F"); } function encodeQueryKey(text) { return encodeQueryValue(text).replace(EQUAL_RE, "%3D"); } function encodePath(text) { return encode4(text).replace(HASH_RE, "%23").replace(IM_RE, "%3F").replace(ENC_ENC_SLASH_RE, "%2F").replace(AMPERSAND_RE, "%26").replace(PLUS_RE, "%2B"); } function encodeParam(text) { return encodePath(text).replace(SLASH_RE, "%2F"); } function decode3(text = "") { try { return decodeURIComponent("" + text); } catch { return "" + text; } } function decodePath(text) { return decode3(text.replace(ENC_SLASH_RE, "%252F")); } function decodeQueryKey(text) { return decode3(text.replace(PLUS_RE, " ")); } function decodeQueryValue(text) { return decode3(text.replace(PLUS_RE, " ")); } function encodeHost(name42 = "") { return toASCII(name42); } function parseQuery(parametersString = "") { const object = {}; if (parametersString[0] === "?") { parametersString = parametersString.slice(1); } for (const parameter of parametersString.split("&")) { const s2 = parameter.match(/([^=]+)=?(.*)/) || []; if (s2.length < 2) { continue; } const key = decodeQueryKey(s2[1]); if (key === "__proto__" || key === "constructor") { continue; } const value = decodeQueryValue(s2[2] || ""); if (object[key] === void 0) { object[key] = value; } else if (Array.isArray(object[key])) { object[key].push(value); } else { object[key] = [object[key], value]; } } return object; } function encodeQueryItem(key, value) { if (typeof value === "number" || typeof value === "boolean") { value = String(value); } if (!value) { return encodeQueryKey(key); } if (Array.isArray(value)) { return value.map((_value) => `${encodeQueryKey(key)}=${encodeQueryValue(_value)}`).join("&"); } return `${encodeQueryKey(key)}=${encodeQueryValue(value)}`; } function stringifyQuery(query) { return Object.keys(query).filter((k) => query[k] !== void 0).map((k) => encodeQueryItem(k, query[k])).filter(Boolean).join("&"); } var PROTOCOL_STRICT_REGEX = /^[\s\w\0+.-]{2,}:([/\\]{1,2})/; var PROTOCOL_REGEX = /^[\s\w\0+.-]{2,}:([/\\]{2})?/; var PROTOCOL_RELATIVE_REGEX = /^([/\\]\s*){2,}[^/\\]/; var PROTOCOL_SCRIPT_RE = /^[\s\0]*(blob|data|javascript|vbscript):$/i; var TRAILING_SLASH_RE = /\/$|\/\?|\/#/; var JOIN_LEADING_SLASH_RE = /^\.?\//; function isRelative(inputString) { return ["./", "../"].some((string_) => inputString.startsWith(string_)); } function hasProtocol(inputString, opts = {}) { if (typeof opts === "boolean") { opts = { acceptRelative: opts }; } if (opts.strict) { return PROTOCOL_STRICT_REGEX.test(inputString); } return PROTOCOL_REGEX.test(inputString) || (opts.acceptRelative ? PROTOCOL_RELATIVE_REGEX.test(inputString) : false); } function isScriptProtocol(protocol) { return !!protocol && PROTOCOL_SCRIPT_RE.test(protocol); } function hasTrailingSlash(input = "", respectQueryAndFragment) { if (!respectQueryAndFragment) { return input.endsWith("/"); } return TRAILING_SLASH_RE.test(input); } function withoutTrailingSlash(input = "", respectQueryAndFragment) { if (!respectQueryAndFragment) { return (hasTrailingSlash(input) ? input.slice(0, -1) : input) || "/"; } if (!hasTrailingSlash(input, true)) { return input || "/"; } let path = input; let fragment = ""; const fragmentIndex = input.indexOf("#"); if (fragmentIndex >= 0) { path = input.slice(0, fragmentIndex); fragment = input.slice(fragmentIndex); } const [s0, ...s2] = path.split("?"); const cleanPath = s0.endsWith("/") ? s0.slice(0, -1) : s0; return (cleanPath || "/") + (s2.length > 0 ? `?${s2.join("?")}` : "") + fragment; } function withTrailingSlash(input = "", respectQueryAndFragment) { if (!respectQueryAndFragment) { return input.endsWith("/") ? input : input + "/"; } if (hasTrailingSlash(input, true)) { return input || "/"; } let path = input; let fragment = ""; const fragmentIndex = input.indexOf("#"); if (fragmentIndex >= 0) { path = input.slice(0, fragmentIndex); fragment = input.slice(fragmentIndex); if (!path) { return fragment; } } const [s0, ...s2] = path.split("?"); return s0 + "/" + (s2.length > 0 ? `?${s2.join("?")}` : "") + fragment; } function hasLeadingSlash(input = "") { return input.startsWith("/"); } function withoutLeadingSlash(input = "") { return (hasLeadingSlash(input) ? input.slice(1) : input) || "/"; } function withLeadingSlash(input = "") { return hasLeadingSlash(input) ? input : "/" + input; } function cleanDoubleSlashes(input = "") { return input.split("://").map((string_) => string_.replace(/\/{2,}/g, "/")).join("://"); } function withBase(input, base) { if (isEmptyURL(base) || hasProtocol(input)) { return input; } const _base = withoutTrailingSlash(base); if (input.startsWith(_base)) { return input; } return joinURL(_base, input); } function withoutBase(input, base) { if (isEmptyURL(base)) { return input; } const _base = withoutTrailingSlash(base); if (!input.startsWith(_base)) { return input; } const trimmed = input.slice(_base.length); return trimmed[0] === "/" ? trimmed : "/" + trimmed; } function withQuery(input, query) { const parsed = parseURL(input); const mergedQuery = { ...parseQuery(parsed.search), ...query }; parsed.search = stringifyQuery(mergedQuery); return stringifyParsedURL(parsed); } function getQuery(input) { return parseQuery(parseURL(input).search); } function isEmptyURL(url) { return !url || url === "/"; } function isNonEmptyURL(url) { return url && url !== "/"; } function joinURL(base, ...input) { let url = base || ""; for (const segment of input.filter((url2) => isNonEmptyURL(url2))) { if (url) { const _segment = segment.replace(JOIN_LEADING_SLASH_RE, ""); url = withTrailingSlash(url) + _segment; } else { url = segment; } } return url; } function joinRelativeURL(..._input) { const JOIN_SEGMENT_SPLIT_RE = /\/(?!\/)/; const input = _input.filter(Boolean); const segments = []; let segmentsDepth = 0; for (const i of input) { if (!i || i === "/") { continue; } for (const [sindex, s2] of i.split(JOIN_SEGMENT_SPLIT_RE).entries()) { if (!s2 || s2 === ".") { continue; } if (s2 === "..") { if (segments.length === 1 && hasProtocol(segments[0])) { continue; } segments.pop(); segmentsDepth--; continue; } if (sindex === 1 && segments[segments.length - 1]?.endsWith(":/")) { segments[segments.length - 1] += "/" + s2; continue; } segments.push(s2); segmentsDepth++; } } let url = segments.join("/"); if (segmentsDepth >= 0) { if (input[0]?.startsWith("/") && !url.startsWith("/")) { url = "/" + url; } else if (input[0]?.startsWith("./") && !url.startsWith("./")) { url = "./" + url; } } else { url = "../".repeat(-1 * segmentsDepth) + url; } if (input[input.length - 1]?.endsWith("/") && !url.endsWith("/")) { url += "/"; } return url; } function withHttp(input) { return withProtocol(input, "http://"); } function withHttps(input) { return withProtocol(input, "https://"); } function withoutProtocol(input) { return withProtocol(input, ""); } function withProtocol(input, protocol) { let match = input.match(PROTOCOL_REGEX); if (!match) { match = input.match(/^\/{2,}/); } if (!match) { return protocol + input; } return protocol + input.slice(match[0].length); } function normalizeURL(input) { const parsed = parseURL(input); parsed.pathname = encodePath(decodePath(parsed.pathname)); parsed.hash = encodeHash(decode3(parsed.hash)); parsed.host = encodeHost(decode3(parsed.host)); parsed.search = stringifyQuery(parseQuery(parsed.search)); return stringifyParsedURL(parsed); } function resolveURL(base = "", ...inputs) { if (typeof base !== "string") { throw new TypeError( `URL input should be string received ${typeof base} (${base})` ); } const filteredInputs = inputs.filter((input) => isNonEmptyURL(input)); if (filteredInputs.length === 0) { return base; } const url = parseURL(base); for (const inputSegment of filteredInputs) { const urlSegment = parseURL(inputSegment); if (urlSegment.pathname) { url.pathname = withTrailingSlash(url.pathname) + withoutLeadingSlash(urlSegment.pathname); } if (urlSegment.hash && urlSegment.hash !== "#") { url.hash = urlSegment.hash; } if (urlSegment.search && urlSegment.search !== "?") { if (url.search && url.search !== "?") { const queryString = stringifyQuery({ ...parseQuery(url.search), ...parseQuery(urlSegment.search) }); url.search = queryString.length > 0 ? "?" + queryString : ""; } else { url.search = urlSegment.search; } } } return stringifyParsedURL(url); } function isSamePath(p1, p2) { return decode3(withoutTrailingSlash(p1)) === decode3(withoutTrailingSlash(p2)); } function isEqual(a, b, options = {}) { if (!options.trailingSlash) { a = withTrailingSlash(a); b = withTrailingSlash(b); } if (!options.leadingSlash) { a = withLeadingSlash(a); b = withLeadingSlash(b); } if (!options.encoding) { a = decode3(a); b = decode3(b); } return a === b; } function withFragment(input, hash2) { if (!hash2 || hash2 === "#") { return input; } const parsed = parseURL(input); parsed.hash = hash2 === "" ? "" : "#" + encodeHash(hash2); return stringifyParsedURL(parsed); } function withoutFragment(input) { return stringifyParsedURL({ ...parseURL(input), hash: "" }); } function withoutHost(input) { const parsed = parseURL(input); return (parsed.pathname || "/") + parsed.search + parsed.hash; } var protocolRelative = Symbol.for("ufo:protocolRelative"); function parseURL(input = "", defaultProto) { const _specialProtoMatch = input.match( /^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i ); if (_specialProtoMatch) { const [, _proto, _pathname = ""] = _specialProtoMatch; return { protocol: _proto.toLowerCase(), pathname: _pathname, href: _proto + _pathname, auth: "", host: "", search: "", hash: "" }; } if (!hasProtocol(input, { acceptRelative: true })) { return defaultProto ? parseURL(defaultProto + input) : parsePath(input); } const [, protocol = "", auth, hostAndPath = ""] = input.replace(/\\/g, "/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/) || []; let [, host = "", path = ""] = hostAndPath.match(/([^#/?]*)(.*)?/) || []; if (protocol === "file:") { path = path.replace(/\/(?=[A-Za-z]:)/, ""); } const { pathname, search, hash: hash2 } = parsePath(path); return { protocol: protocol.toLowerCase(), auth: auth ? auth.slice(0, Math.max(0, auth.length - 1)) : "", host, pathname, search, hash: hash2, [protocolRelative]: !protocol }; } function parsePath(input = "") { const [pathname = "", search = "", hash2 = ""] = (input.match(/([^#?]*)(\?[^#]*)?(#.*)?/) || []).splice(1); return { pathname, search, hash: hash2 }; } function parseAuth(input = "") { const [username, password] = input.split(":"); return { username: decode3(username), password: decode3(password) }; } function parseHost(input = "") { const [hostname, port] = (input.match(/([^/:]*):?(\d+)?/) || []).splice(1); return { hostname: decode3(hostname), port }; } function stringifyParsedURL(parsed) { const pathname = parsed.pathname || ""; const search = parsed.search ? (parsed.search.startsWith("?") ? "" : "?") + parsed.search : ""; const hash2 = parsed.hash || ""; const auth = parsed.auth ? parsed.auth + "@" : ""; const host = parsed.host || ""; const proto = parsed.protocol || parsed[protocolRelative] ? (parsed.protocol || "") + "//" : ""; return proto + auth + host + pathname + search + hash2; } var FILENAME_STRICT_REGEX = /\/([^/]+\.[^/]+)$/; var FILENAME_REGEX = /\/([^/]+)$/; function parseFilename(input = "", { strict }) { const { pathname } = parseURL(input); const matches = strict ? pathname.match(FILENAME_STRICT_REGEX) : pathname.match(FILENAME_REGEX); return matches ? matches[1] : void 0; } var __defProp2 = Object.defineProperty; var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __publicField2 = (obj, key, value) => { __defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value); return value; }; var $URL = class { constructor(input = "") { __publicField2(this, "protocol"); __publicField2(this, "host"); __publicField2(this, "auth"); __publicField2(this, "pathname"); __publicField2(this, "query", {}); __publicField2(this, "hash"); if (typeof input !== "string") { throw new TypeError( `URL input should be string received ${typeof input} (${input})` ); } const parsed = parseURL(input); this.protocol = decode3(parsed.protocol); this.host = decode3(parsed.host); this.auth = decode3(parsed.auth); this.pathname = decodePath(parsed.pathname); this.query = parseQuery(parsed.search); this.hash = decode3(parsed.hash); } get hostname() { return parseHost(this.host).hostname; } get port() { return parseHost(this.host).port || ""; } get username() { return parseAuth(this.auth).username; } get password() { return parseAuth(this.auth).password || ""; } get hasProtocol() { return this.protocol.length; } get isAbsolute() { return this.hasProtocol || this.pathname[0] === "/"; } get search() { const q = stringifyQuery(this.query); return q.length > 0 ? "?" + q : ""; } get searchParams() { const p = new URLSearchParams(); for (const name42 in this.query) { const value = this.query[name42]; if (Array.isArray(value)) { for (const v of value) { p.append(name42, v); } } else { p.append( name42, typeof value === "string" ? value : JSON.stringify(value) ); } } return p; } get origin() { return (this.protocol ? this.protocol + "//" : "") + encodeHost(this.host); } get fullpath() { return encodePath(this.pathname) + this.search + encodeHash(this.hash); } get encodedAuth() { if (!this.auth) { return ""; } const { username, password } = parseAuth(this.auth); return encodeURIComponent(username) + (password ? ":" + encodeURIComponent(password) : ""); } get href() { const auth = this.encodedAuth; const originWithAuth = (this.protocol ? this.protocol + "//" : "") + (auth ? auth + "@" : "") + encodeHost(this.host); return this.hasProtocol && this.isAbsolute ? originWithAuth + this.fullpath : this.fullpath; } append(url) { if (url.hasProtocol) { throw new Error("Cannot append a URL with protocol"); } Object.assign(this.query, url.query); if (url.pathname) { this.pathname = withTrailingSlash(this.pathname) + withoutLeadingSlash(url.pathname); } if (url.hash) { this.hash = url.hash; } } toJSON() { return this.href; } toString() { return this.href; } }; function createURL(input) { return new $URL(input); } exports.$URL = $URL; exports.cleanDoubleSlashes = cleanDoubleSlashes; exports.createURL = createURL; exports.decode = decode3; exports.decodePath = decodePath; exports.decodeQueryKey = decodeQueryKey; exports.decodeQueryValue = decodeQueryValue; exports.encode = encode4; exports.encodeHash = encodeHash; exports.encodeHost = encodeHost; exports.encodeParam = encodeParam; exports.encodePath = encodePath; exports.encodeQueryItem = encodeQueryItem; exports.encodeQueryKey = encodeQueryKey; exports.encodeQueryValue = encodeQueryValue; exports.getQuery = getQuery; exports.hasLeadingSlash = hasLeadingSlash; exports.hasProtocol = hasProtocol; exports.hasTrailingSlash = hasTrailingSlash; exports.isEmptyURL = isEmptyURL; exports.isEqual = isEqual; exports.isNonEmptyURL = isNonEmptyURL; exports.isRelative = isRelative; exports.isSamePath = isSamePath; exports.isScriptProtocol = isScriptProtocol; exports.joinRelativeURL = joinRelativeURL; exports.joinURL = joinURL; exports.normalizeURL = normalizeURL; exports.parseAuth = parseAuth; exports.parseFilename = parseFilename; exports.parseHost = parseHost; exports.parsePath = parsePath; exports.parseQuery = parseQuery; exports.parseURL = parseURL; exports.resolveURL = resolveURL; exports.stringifyParsedURL = stringifyParsedURL; exports.stringifyQuery = stringifyQuery; exports.withBase = withBase; exports.withFragment = withFragment; exports.withHttp = withHttp; exports.withHttps = withHttps; exports.withLeadingSlash = withLeadingSlash; exports.withProtocol = withProtocol; exports.withQuery = withQuery; exports.withTrailingSlash = withTrailingSlash; exports.withoutBase = withoutBase; exports.withoutFragment = withoutFragment; exports.withoutHost = withoutHost; exports.withoutLeadingSlash = withoutLeadingSlash; exports.withoutProtocol = withoutProtocol; exports.withoutTrailingSlash = withoutTrailingSlash; } }); // node_modules/.pnpm/pathe@1.1.2/node_modules/pathe/dist/shared/pathe.1f0a373c.cjs var require_pathe_1f0a373c = __commonJS({ "node_modules/.pnpm/pathe@1.1.2/node_modules/pathe/dist/shared/pathe.1f0a373c.cjs"(exports) { "use strict"; var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//; function normalizeWindowsPath(input = "") { if (!input) { return input; } return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase()); } var _UNC_REGEX = /^[/\\]{2}/; var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/; var _DRIVE_LETTER_RE = /^[A-Za-z]:$/; var _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/; var sep = "/"; var delimiter = ":"; var normalize = function(path2) { if (path2.length === 0) { return "."; } path2 = normalizeWindowsPath(path2); const isUNCPath = path2.match(_UNC_REGEX); const isPathAbsolute = isAbsolute(path2); const trailingSeparator = path2[path2.length - 1] === "/"; path2 = normalizeString(path2, !isPathAbsolute); if (path2.length === 0) { if (isPathAbsolute) { return "/"; } return trailingSeparator ? "./" : "."; } if (trailingSeparator) { path2 += "/"; } if (_DRIVE_LETTER_RE.test(path2)) { path2 += "/"; } if (isUNCPath) { if (!isPathAbsolute) { return `//./${path2}`; } return `//${path2}`; } return isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2; }; var join = function(...arguments_) { if (arguments_.length === 0) { return "."; } let joined; for (const argument of arguments_) { if (argument && argument.length > 0) { if (joined === void 0) { joined = argument; } else { joined += `/${argument}`; } } } if (joined === void 0) { return "."; } return normalize(joined.replace(/\/\/+/g, "/")); }; function cwd() { if (typeof process !== "undefined" && typeof process.cwd === "function") { return process.cwd().replace(/\\/g, "/"); } return "/"; } var resolve = function(...arguments_) { arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument)); let resolvedPath = ""; let resolvedAbsolute = false; for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) { const path2 = index >= 0 ? arguments_[index] : cwd(); if (!path2 || path2.length === 0) { continue; } resolvedPath = `${path2}/${resolvedPath}`; resolvedAbsolute = isAbsolute(path2); } resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute); if (resolvedAbsolute && !isAbsolute(resolvedPath)) { return `/${resolvedPath}`; } return resolvedPath.length > 0 ? resolvedPath : "."; }; function normalizeString(path2, allowAboveRoot) { let res = ""; let lastSegmentLength = 0; let lastSlash = -1; let dots = 0; let char = null; for (let index = 0; index <= path2.length; ++index) { if (index < path2.length) { char = path2[index]; } else if (char === "/") { break; } else { char = "/"; } if (char === "/") { if (lastSlash === index - 1 || dots === 1) ; else if (dots === 2) { if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") { if (res.length > 2) { const lastSlashIndex = res.lastIndexOf("/"); if (lastSlashIndex === -1) { res = ""; lastSegmentLength = 0; } else { res = res.slice(0, lastSlashIndex); lastSegmentLength = res.length - 1 - res.lastIndexOf("/"); } lastSlash = index; dots = 0; continue; } else if (res.length > 0) { res = ""; lastSegmentLength = 0; lastSlash = index; dots = 0; continue; } } if (allowAboveRoot) { res += res.length > 0 ? "/.." : ".."; lastSegmentLength = 2; } } else { if (res.length > 0) { res += `/${path2.slice(lastSlash + 1, index)}`; } else { res = path2.slice(lastSlash + 1, index); } lastSegmentLength = index - lastSlash - 1; } lastSlash = index; dots = 0; } else if (char === "." && dots !== -1) { ++dots; } else { dots = -1; } } return res; } var isAbsolute = function(p) { return _IS_ABSOLUTE_RE.test(p); }; var toNamespacedPath = function(p) { return normalizeWindowsPath(p); }; var _EXTNAME_RE = /.(\.[^./]+)$/; var extname = function(p) { const match = _EXTNAME_RE.exec(normalizeWindowsPath(p)); return match && match[1] || ""; }; var relative = function(from, to) { const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/"); const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/"); if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) { return _to.join("/"); } const _fromCopy = [..._from]; for (const segment of _fromCopy) { if (_to[0] !== segment) { break; } _from.shift(); _to.shift(); } return [..._from.map(() => ".."), ..._to].join("/"); }; var dirname = function(p) { const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1); if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) { segments[0] += "/"; } return segments.join("/") || (isAbsolute(p) ? "/" : "."); }; var format = function(p) { const segments = [p.root, p.dir, p.base ?? p.name + p.ext].filter(Boolean); return normalizeWindowsPath( p.root ? resolve(...segments) : segments.join("/") ); }; var basename = function(p, extension) { const lastSegment = normalizeWindowsPath(p).split("/").pop(); return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment; }; var parse44 = function(p) { const root = normalizeWindowsPath(p).split("/").shift() || "/"; const base = basename(p); const extension = extname(base); return { root, dir: dirname(p), base, ext: extension, name: base.slice(0, base.length - extension.length) }; }; var path = { __proto__: null, basename, delimiter, dirname, extname, format, isAbsolute, join, normalize, normalizeString, parse: parse44, relative, resolve, sep, toNamespacedPath }; exports.basename = basename; exports.delimiter = delimiter; exports.dirname = dirname; exports.extname = extname; exports.format = format; exports.isAbsolute = isAbsolute; exports.join = join; exports.normalize = normalize; exports.normalizeString = normalizeString; exports.normalizeWindowsPath = normalizeWindowsPath; exports.parse = parse44; exports.path = path; exports.relative = relative; exports.resolve = resolve; exports.sep = sep; exports.toNamespacedPath = toNamespacedPath; } }); // node_modules/.pnpm/pathe@1.1.2/node_modules/pathe/dist/index.cjs var require_dist2 = __commonJS({ "node_modules/.pnpm/pathe@1.1.2/node_modules/pathe/dist/index.cjs"(exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var index = require_pathe_1f0a373c(); exports.basename = index.basename; exports.default = index.path; exports.delimiter = index.delimiter; exports.dirname = index.dirname; exports.extname = index.extname; exports.format = index.format; exports.isAbsolute = index.isAbsolute; exports.join = index.join; exports.normalize = index.normalize; exports.normalizeString = index.normalizeString; exports.parse = index.parse; exports.relative = index.relative; exports.resolve = index.resolve; exports.sep = index.sep; exports.toNamespacedPath = index.toNamespacedPath; } }); // node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/shared/confbox.3768c7e9.cjs var require_confbox_3768c7e9 = __commonJS({ "node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/shared/confbox.3768c7e9.cjs"(exports) { "use strict"; var INDENT_REGEX = /^(?:( )+|\t+)/; var INDENT_TYPE_SPACE = "space"; var INDENT_TYPE_TAB = "tab"; function makeIndentsMap(e2, t) { const n2 = /* @__PURE__ */ new Map(); let i = 0, a, c; for (const f of e2.split(/\n/g)) { if (!f) continue; let l, u, y, m, d; const h2 = f.match(INDENT_REGEX); if (h2 === null) i = 0, a = ""; else { if (l = h2[0].length, u = h2[1] ? INDENT_TYPE_SPACE : INDENT_TYPE_TAB, t && u === INDENT_TYPE_SPACE && l === 1) continue; u !== a && (i = 0), a = u, y = 1, m = 0; const p = l - i; if (i = l, p === 0) y = 0, m = 1; else { const g = p > 0 ? p : -p; c = encodeIndentsKey(u, g); } d = n2.get(c), d = d === void 0 ? [1, 0] : [d[0] + y, d[1] + m], n2.set(c, d); } } return n2; } function encodeIndentsKey(e2, t) { return (e2 === INDENT_TYPE_SPACE ? "s" : "t") + String(t); } function decodeIndentsKey(e2) { const n2 = e2[0] === "s" ? INDENT_TYPE_SPACE : INDENT_TYPE_TAB, i = Number(e2.slice(1)); return { type: n2, amount: i }; } function getMostUsedKey(e2) { let t, n2 = 0, i = 0; for (const [a, [c, f]] of e2) (c > n2 || c === n2 && f > i) && (n2 = c, i = f, t = a); return t; } function makeIndentString(e2, t) { return (e2 === INDENT_TYPE_SPACE ? " " : " ").repeat(t); } function detectIndent(e2) { if (typeof e2 != "string") throw new TypeError("Expected a string"); let t = makeIndentsMap(e2, true); t.size === 0 && (t = makeIndentsMap(e2, false)); const n2 = getMostUsedKey(t); let i, a = 0, c = ""; return n2 !== void 0 && ({ type: i, amount: a } = decodeIndentsKey(n2), c = makeIndentString(i, a)), { amount: a, type: i, indent: c }; } var r = Symbol.for("__confbox_fmt__"); var o = /^(\s+)/; var s = /(\s+)$/; function detectFormat(e2, t = {}) { const n2 = t.indent === void 0 && t.preserveIndentation !== false && e2.slice(0, t?.sampleSize || 1024), i = t.preserveWhitespace === false ? void 0 : { start: o.exec(e2)?.[0] || "", end: s.exec(e2)?.[0] || "" }; return { sample: n2, whiteSpace: i }; } function storeFormat(e2, t, n2) { !t || typeof t != "object" || Object.defineProperty(t, r, { enumerable: false, configurable: true, writable: true, value: detectFormat(e2, n2) }); } function getFormat(e2, t) { if (!e2 || typeof e2 != "object" || !(r in e2)) return { indent: t?.indent, whitespace: { start: "", end: "" } }; const n2 = e2[r]; return { indent: t?.indent || detectIndent(n2.sample || "").indent, whitespace: n2.whiteSpace || { start: "", end: "" } }; } exports.getFormat = getFormat, exports.storeFormat = storeFormat; } }); // node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/json5.cjs var require_json5 = __commonJS({ "node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/json5.cjs"(exports) { "use strict"; var _format = require_confbox_3768c7e9(); function getDefaultExportFromCjs2(u) { return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u; } var unicode$1 = {}; unicode$1.Space_Separator = /[\u1680\u2000-\u200A\u202F\u205F\u3000]/, unicode$1.ID_Start = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/, unicode$1.ID_Continue = /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/; var unicode = unicode$1; var util$2 = { isSpaceSeparator(u) { return typeof u == "string" && unicode.Space_Separator.test(u); }, isIdStartChar(u) { return typeof u == "string" && (u >= "a" && u <= "z" || u >= "A" && u <= "Z" || u === "$" || u === "_" || unicode.ID_Start.test(u)); }, isIdContinueChar(u) { return typeof u == "string" && (u >= "a" && u <= "z" || u >= "A" && u <= "Z" || u >= "0" && u <= "9" || u === "$" || u === "_" || u === "‌" || u === "‍" || unicode.ID_Continue.test(u)); }, isDigit(u) { return typeof u == "string" && /[0-9]/.test(u); }, isHexDigit(u) { return typeof u == "string" && /[0-9A-Fa-f]/.test(u); } }; var util$1 = util$2; var source; var parseState; var stack; var pos; var line; var column; var token; var key; var root; var parse44 = function(e2, t) { source = String(e2), parseState = "start", stack = [], pos = 0, line = 1, column = 0, token = void 0, key = void 0, root = void 0; do token = lex(), parseStates[parseState](); while (token.type !== "eof"); return typeof t == "function" ? internalize({ "": root }, "", t) : root; }; function internalize(u, e2, t) { const C = u[e2]; if (C != null && typeof C == "object") if (Array.isArray(C)) for (let s = 0; s < C.length; s++) { const E = String(s), f = internalize(C, E, t); f === void 0 ? delete C[E] : Object.defineProperty(C, E, { value: f, writable: true, enumerable: true, configurable: true }); } else for (const s in C) { const E = internalize(C, s, t); E === void 0 ? delete C[s] : Object.defineProperty(C, s, { value: E, writable: true, enumerable: true, configurable: true }); } return t.call(u, e2, C); } var lexState; var buffer; var doubleQuote; var sign; var c; function lex() { for (lexState = "default", buffer = "", doubleQuote = false, sign = 1; ; ) { c = peek2(); const u = lexStates[lexState](); if (u) return u; } } function peek2() { if (source[pos]) return String.fromCodePoint(source.codePointAt(pos)); } function read() { const u = peek2(); return u === ` ` ? (line++, column = 0) : u ? column += u.length : column++, u && (pos += u.length), u; } var lexStates = { default() { switch (c) { case " ": case "\v": case "\f": case " ": case " ": case "\uFEFF": case ` `: case "\r": case "\u2028": case "\u2029": read(); return; case "/": read(), lexState = "comment"; return; case void 0: return read(), newToken("eof"); } if (util$1.isSpaceSeparator(c)) { read(); return; } return lexStates[parseState](); }, comment() { switch (c) { case "*": read(), lexState = "multiLineComment"; return; case "/": read(), lexState = "singleLineComment"; return; } throw invalidChar(read()); }, multiLineComment() { switch (c) { case "*": read(), lexState = "multiLineCommentAsterisk"; return; case void 0: throw invalidChar(read()); } read(); }, multiLineCommentAsterisk() { switch (c) { case "*": read(); return; case "/": read(), lexState = "default"; return; case void 0: throw invalidChar(read()); } read(), lexState = "multiLineComment"; }, singleLineComment() { switch (c) { case ` `: case "\r": case "\u2028": case "\u2029": read(), lexState = "default"; return; case void 0: return read(), newToken("eof"); } read(); }, value() { switch (c) { case "{": case "[": return newToken("punctuator", read()); case "n": return read(), literal("ull"), newToken("null", null); case "t": return read(), literal("rue"), newToken("boolean", true); case "f": return read(), literal("alse"), newToken("boolean", false); case "-": case "+": read() === "-" && (sign = -1), lexState = "sign"; return; case ".": buffer = read(), lexState = "decimalPointLeading"; return; case "0": buffer = read(), lexState = "zero"; return; case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": buffer = read(), lexState = "decimalInteger"; return; case "I": return read(), literal("nfinity"), newToken("numeric", 1 / 0); case "N": return read(), literal("aN"), newToken("numeric", NaN); case '"': case "'": doubleQuote = read() === '"', buffer = "", lexState = "string"; return; } throw invalidChar(read()); }, identifierNameStartEscape() { if (c !== "u") throw invalidChar(read()); read(); const u = unicodeEscape(); switch (u) { case "$": case "_": break; default: if (!util$1.isIdStartChar(u)) throw invalidIdentifier(); break; } buffer += u, lexState = "identifierName"; }, identifierName() { switch (c) { case "$": case "_": case "‌": case "‍": buffer += read(); return; case "\\": read(), lexState = "identifierNameEscape"; return; } if (util$1.isIdContinueChar(c)) { buffer += read(); return; } return newToken("identifier", buffer); }, identifierNameEscape() { if (c !== "u") throw invalidChar(read()); read(); const u = unicodeEscape(); switch (u) { case "$": case "_": case "‌": case "‍": break; default: if (!util$1.isIdContinueChar(u)) throw invalidIdentifier(); break; } buffer += u, lexState = "identifierName"; }, sign() { switch (c) { case ".": buffer = read(), lexState = "decimalPointLeading"; return; case "0": buffer = read(), lexState = "zero"; return; case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": buffer = read(), lexState = "decimalInteger"; return; case "I": return read(), literal("nfinity"), newToken("numeric", sign * (1 / 0)); case "N": return read(), literal("aN"), newToken("numeric", NaN); } throw invalidChar(read()); }, zero() { switch (c) { case ".": buffer += read(), lexState = "decimalPoint"; return; case "e": case "E": buffer += read(), lexState = "decimalExponent"; return; case "x": case "X": buffer += read(), lexState = "hexadecimal"; return; } return newToken("numeric", sign * 0); }, decimalInteger() { switch (c) { case ".": buffer += read(), lexState = "decimalPoint"; return; case "e": case "E": buffer += read(), lexState = "decimalExponent"; return; } if (util$1.isDigit(c)) { buffer += read(); return; } return newToken("numeric", sign * Number(buffer)); }, decimalPointLeading() { if (util$1.isDigit(c)) { buffer += read(), lexState = "decimalFraction"; return; } throw invalidChar(read()); }, decimalPoint() { switch (c) { case "e": case "E": buffer += read(), lexState = "decimalExponent"; return; } if (util$1.isDigit(c)) { buffer += read(), lexState = "decimalFraction"; return; } return newToken("numeric", sign * Number(buffer)); }, decimalFraction() { switch (c) { case "e": case "E": buffer += read(), lexState = "decimalExponent"; return; } if (util$1.isDigit(c)) { buffer += read(); return; } return newToken("numeric", sign * Number(buffer)); }, decimalExponent() { switch (c) { case "+": case "-": buffer += read(), lexState = "decimalExponentSign"; return; } if (util$1.isDigit(c)) { buffer += read(), lexState = "decimalExponentInteger"; return; } throw invalidChar(read()); }, decimalExponentSign() { if (util$1.isDigit(c)) { buffer += read(), lexState = "decimalExponentInteger"; return; } throw invalidChar(read()); }, decimalExponentInteger() { if (util$1.isDigit(c)) { buffer += read(); return; } return newToken("numeric", sign * Number(buffer)); }, hexadecimal() { if (util$1.isHexDigit(c)) { buffer += read(), lexState = "hexadecimalInteger"; return; } throw invalidChar(read()); }, hexadecimalInteger() { if (util$1.isHexDigit(c)) { buffer += read(); return; } return newToken("numeric", sign * Number(buffer)); }, string() { switch (c) { case "\\": read(), buffer += escape(); return; case '"': if (doubleQuote) return read(), newToken("string", buffer); buffer += read(); return; case "'": if (!doubleQuote) return read(), newToken("string", buffer); buffer += read(); return; case ` `: case "\r": throw invalidChar(read()); case "\u2028": case "\u2029": separatorChar(c); break; case void 0: throw invalidChar(read()); } buffer += read(); }, start() { switch (c) { case "{": case "[": return newToken("punctuator", read()); } lexState = "value"; }, beforePropertyName() { switch (c) { case "$": case "_": buffer = read(), lexState = "identifierName"; return; case "\\": read(), lexState = "identifierNameStartEscape"; return; case "}": return newToken("punctuator", read()); case '"': case "'": doubleQuote = read() === '"', lexState = "string"; return; } if (util$1.isIdStartChar(c)) { buffer += read(), lexState = "identifierName"; return; } throw invalidChar(read()); }, afterPropertyName() { if (c === ":") return newToken("punctuator", read()); throw invalidChar(read()); }, beforePropertyValue() { lexState = "value"; }, afterPropertyValue() { switch (c) { case ",": case "}": return newToken("punctuator", read()); } throw invalidChar(read()); }, beforeArrayValue() { if (c === "]") return newToken("punctuator", read()); lexState = "value"; }, afterArrayValue() { switch (c) { case ",": case "]": return newToken("punctuator", read()); } throw invalidChar(read()); }, end() { throw invalidChar(read()); } }; function newToken(u, e2) { return { type: u, value: e2, line, column }; } function literal(u) { for (const e2 of u) { if (peek2() !== e2) throw invalidChar(read()); read(); } } function escape() { switch (peek2()) { case "b": return read(), "\b"; case "f": return read(), "\f"; case "n": return read(), ` `; case "r": return read(), "\r"; case "t": return read(), " "; case "v": return read(), "\v"; case "0": if (read(), util$1.isDigit(peek2())) throw invalidChar(read()); return "\0"; case "x": return read(), hexEscape(); case "u": return read(), unicodeEscape(); case ` `: case "\u2028": case "\u2029": return read(), ""; case "\r": return read(), peek2() === ` ` && read(), ""; case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": throw invalidChar(read()); case void 0: throw invalidChar(read()); } return read(); } function hexEscape() { let u = "", e2 = peek2(); if (!util$1.isHexDigit(e2) || (u += read(), e2 = peek2(), !util$1.isHexDigit(e2))) throw invalidChar(read()); return u += read(), String.fromCodePoint(parseInt(u, 16)); } function unicodeEscape() { let u = "", e2 = 4; for (; e2-- > 0; ) { const t = peek2(); if (!util$1.isHexDigit(t)) throw invalidChar(read()); u += read(); } return String.fromCodePoint(parseInt(u, 16)); } var parseStates = { start() { if (token.type === "eof") throw invalidEOF(); push(); }, beforePropertyName() { switch (token.type) { case "identifier": case "string": key = token.value, parseState = "afterPropertyName"; return; case "punctuator": pop(); return; case "eof": throw invalidEOF(); } }, afterPropertyName() { if (token.type === "eof") throw invalidEOF(); parseState = "beforePropertyValue"; }, beforePropertyValue() { if (token.type === "eof") throw invalidEOF(); push(); }, beforeArrayValue() { if (token.type === "eof") throw invalidEOF(); if (token.type === "punctuator" && token.value === "]") { pop(); return; } push(); }, afterPropertyValue() { if (token.type === "eof") throw invalidEOF(); switch (token.value) { case ",": parseState = "beforePropertyName"; return; case "}": pop(); } }, afterArrayValue() { if (token.type === "eof") throw invalidEOF(); switch (token.value) { case ",": parseState = "beforeArrayValue"; return; case "]": pop(); } }, end() { } }; function push() { let u; switch (token.type) { case "punctuator": switch (token.value) { case "{": u = {}; break; case "[": u = []; break; } break; case "null": case "boolean": case "numeric": case "string": u = token.value; break; } if (root === void 0) root = u; else { const e2 = stack[stack.length - 1]; Array.isArray(e2) ? e2.push(u) : Object.defineProperty(e2, key, { value: u, writable: true, enumerable: true, configurable: true }); } if (u !== null && typeof u == "object") stack.push(u), Array.isArray(u) ? parseState = "beforeArrayValue" : parseState = "beforePropertyName"; else { const e2 = stack[stack.length - 1]; e2 == null ? parseState = "end" : Array.isArray(e2) ? parseState = "afterArrayValue" : parseState = "afterPropertyValue"; } } function pop() { stack.pop(); const u = stack[stack.length - 1]; u == null ? parseState = "end" : Array.isArray(u) ? parseState = "afterArrayValue" : parseState = "afterPropertyValue"; } function invalidChar(u) { return syntaxError(u === void 0 ? `JSON5: invalid end of input at ${line}:${column}` : `JSON5: invalid character '${formatChar(u)}' at ${line}:${column}`); } function invalidEOF() { return syntaxError(`JSON5: invalid end of input at ${line}:${column}`); } function invalidIdentifier() { return column -= 5, syntaxError(`JSON5: invalid identifier character at ${line}:${column}`); } function separatorChar(u) { console.warn(`JSON5: '${formatChar(u)}' in strings is not valid ECMAScript; consider escaping`); } function formatChar(u) { const e2 = { "'": "\\'", '"': '\\"', "\\": "\\\\", "\b": "\\b", "\f": "\\f", "\n": "\\n", "\r": "\\r", " ": "\\t", "\v": "\\v", "\0": "\\0", "\u2028": "\\u2028", "\u2029": "\\u2029" }; if (e2[u]) return e2[u]; if (u < " ") { const t = u.charCodeAt(0).toString(16); return "\\x" + ("00" + t).substring(t.length); } return u; } function syntaxError(u) { const e2 = new SyntaxError(u); return e2.lineNumber = line, e2.columnNumber = column, e2; } var o = getDefaultExportFromCjs2(parse44); var util = util$2; var stringify = function(e2, t, C) { const s = []; let E = "", f, h2, l = "", g; if (t != null && typeof t == "object" && !Array.isArray(t) && (C = t.space, g = t.quote, t = t.replacer), typeof t == "function") h2 = t; else if (Array.isArray(t)) { f = []; for (const F4 of t) { let r; typeof F4 == "string" ? r = F4 : (typeof F4 == "number" || F4 instanceof String || F4 instanceof Number) && (r = String(F4)), r !== void 0 && f.indexOf(r) < 0 && f.push(r); } } return C instanceof Number ? C = Number(C) : C instanceof String && (C = String(C)), typeof C == "number" ? C > 0 && (C = Math.min(10, Math.floor(C)), l = " ".substr(0, C)) : typeof C == "string" && (l = C.substr(0, 10)), m("", { "": e2 }); function m(F4, r) { let D = r[F4]; switch (D != null && (typeof D.toJSON5 == "function" ? D = D.toJSON5(F4) : typeof D.toJSON == "function" && (D = D.toJSON(F4))), h2 && (D = h2.call(r, F4, D)), D instanceof Number ? D = Number(D) : D instanceof String ? D = String(D) : D instanceof Boolean && (D = D.valueOf()), D) { case null: return "null"; case true: return "true"; case false: return "false"; } if (typeof D == "string") return p(D); if (typeof D == "number") return String(D); if (typeof D == "object") return Array.isArray(D) ? b(D) : y(D); } function p(F4) { const r = { "'": 0.1, '"': 0.2 }, D = { "'": "\\'", '"': '\\"', "\\": "\\\\", "\b": "\\b", "\f": "\\f", "\n": "\\n", "\r": "\\r", " ": "\\t", "\v": "\\v", "\0": "\\0", "\u2028": "\\u2028", "\u2029": "\\u2029" }; let n2 = ""; for (let A = 0; A < F4.length; A++) { const B = F4[A]; switch (B) { case "'": case '"': r[B]++, n2 += B; continue; case "\0": if (util.isDigit(F4[A + 1])) { n2 += "\\x00"; continue; } } if (D[B]) { n2 += D[B]; continue; } if (B < " ") { let d = B.charCodeAt(0).toString(16); n2 += "\\x" + ("00" + d).substring(d.length); continue; } n2 += B; } const i = g || Object.keys(r).reduce((A, B) => r[A] < r[B] ? A : B); return n2 = n2.replace(new RegExp(i, "g"), D[i]), i + n2 + i; } function y(F4) { if (s.indexOf(F4) >= 0) throw TypeError("Converting circular structure to JSON5"); s.push(F4); let r = E; E = E + l; let D = f || Object.keys(F4), n2 = []; for (const A of D) { const B = m(A, F4); if (B !== void 0) { let d = w(A) + ":"; l !== "" && (d += " "), d += B, n2.push(d); } } let i; if (n2.length === 0) i = "{}"; else { let A; if (l === "") A = n2.join(","), i = "{" + A + "}"; else { let B = `, ` + E; A = n2.join(B), i = `{ ` + E + A + `, ` + r + "}"; } } return s.pop(), E = r, i; } function w(F4) { if (F4.length === 0) return p(F4); const r = String.fromCodePoint(F4.codePointAt(0)); if (!util.isIdStartChar(r)) return p(F4); for (let D = r.length; D < F4.length; D++) if (!util.isIdContinueChar(String.fromCodePoint(F4.codePointAt(D)))) return p(F4); return F4; } function b(F4) { if (s.indexOf(F4) >= 0) throw TypeError("Converting circular structure to JSON5"); s.push(F4); let r = E; E = E + l; let D = []; for (let i = 0; i < F4.length; i++) { const A = m(String(i), F4); D.push(A !== void 0 ? A : "null"); } let n2; if (D.length === 0) n2 = "[]"; else if (l === "") n2 = "[" + D.join(",") + "]"; else { let i = `, ` + E, A = D.join(i); n2 = `[ ` + E + A + `, ` + r + "]"; } return s.pop(), E = r, n2; } }; var a = getDefaultExportFromCjs2(stringify); function parseJSON5(u, e2) { const t = o(u, e2?.reviver); return _format.storeFormat(u, t, e2), t; } function stringifyJSON5(u, e2) { const t = _format.getFormat(u, e2), C = a(u, e2?.replacer, t.indent); return t.whitespace.start + C + t.whitespace.end; } exports.parseJSON5 = parseJSON5, exports.stringifyJSON5 = stringifyJSON5; } }); // node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/shared/confbox.6b479c78.cjs var require_confbox_6b479c78 = __commonJS({ "node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/shared/confbox.6b479c78.cjs"(exports) { "use strict"; var _format = require_confbox_3768c7e9(); function createScanner(n2, l = false) { const g = n2.length; let e2 = 0, u = "", p = 0, k = 16, A = 0, o = 0, O = 0, r = 0, T = 0; function L(t, s) { let b = 0, c = 0; for (; b < t || !s; ) { let i = n2.charCodeAt(e2); if (i >= 48 && i <= 57) c = c * 16 + i - 48; else if (i >= 65 && i <= 70) c = c * 16 + i - 65 + 10; else if (i >= 97 && i <= 102) c = c * 16 + i - 97 + 10; else break; e2++, b++; } return b < t && (c = -1), c; } function v(t) { e2 = t, u = "", p = 0, k = 16, T = 0; } function _() { let t = e2; if (n2.charCodeAt(e2) === 48) e2++; else for (e2++; e2 < n2.length && isDigit2(n2.charCodeAt(e2)); ) e2++; if (e2 < n2.length && n2.charCodeAt(e2) === 46) if (e2++, e2 < n2.length && isDigit2(n2.charCodeAt(e2))) for (e2++; e2 < n2.length && isDigit2(n2.charCodeAt(e2)); ) e2++; else return T = 3, n2.substring(t, e2); let s = e2; if (e2 < n2.length && (n2.charCodeAt(e2) === 69 || n2.charCodeAt(e2) === 101)) if (e2++, (e2 < n2.length && n2.charCodeAt(e2) === 43 || n2.charCodeAt(e2) === 45) && e2++, e2 < n2.length && isDigit2(n2.charCodeAt(e2))) { for (e2++; e2 < n2.length && isDigit2(n2.charCodeAt(e2)); ) e2++; s = e2; } else T = 3; return n2.substring(t, s); } function U3() { let t = "", s = e2; for (; ; ) { if (e2 >= g) { t += n2.substring(s, e2), T = 2; break; } const b = n2.charCodeAt(e2); if (b === 34) { t += n2.substring(s, e2), e2++; break; } if (b === 92) { if (t += n2.substring(s, e2), e2++, e2 >= g) { T = 2; break; } switch (n2.charCodeAt(e2++)) { case 34: t += '"'; break; case 92: t += "\\"; break; case 47: t += "/"; break; case 98: t += "\b"; break; case 102: t += "\f"; break; case 110: t += ` `; break; case 114: t += "\r"; break; case 116: t += " "; break; case 117: const i = L(4, true); i >= 0 ? t += String.fromCharCode(i) : T = 4; break; default: T = 5; } s = e2; continue; } if (b >= 0 && b <= 31) if (isLineBreak(b)) { t += n2.substring(s, e2), T = 2; break; } else T = 6; e2++; } return t; } function w() { if (u = "", T = 0, p = e2, o = A, r = O, e2 >= g) return p = g, k = 17; let t = n2.charCodeAt(e2); if (isWhiteSpace2(t)) { do e2++, u += String.fromCharCode(t), t = n2.charCodeAt(e2); while (isWhiteSpace2(t)); return k = 15; } if (isLineBreak(t)) return e2++, u += String.fromCharCode(t), t === 13 && n2.charCodeAt(e2) === 10 && (e2++, u += ` `), A++, O = e2, k = 14; switch (t) { case 123: return e2++, k = 1; case 125: return e2++, k = 2; case 91: return e2++, k = 3; case 93: return e2++, k = 4; case 58: return e2++, k = 6; case 44: return e2++, k = 5; case 34: return e2++, u = U3(), k = 10; case 47: const s = e2 - 1; if (n2.charCodeAt(e2 + 1) === 47) { for (e2 += 2; e2 < g && !isLineBreak(n2.charCodeAt(e2)); ) e2++; return u = n2.substring(s, e2), k = 12; } if (n2.charCodeAt(e2 + 1) === 42) { e2 += 2; const b = g - 1; let c = false; for (; e2 < b; ) { const i = n2.charCodeAt(e2); if (i === 42 && n2.charCodeAt(e2 + 1) === 47) { e2 += 2, c = true; break; } e2++, isLineBreak(i) && (i === 13 && n2.charCodeAt(e2) === 10 && e2++, A++, O = e2); } return c || (e2++, T = 1), u = n2.substring(s, e2), k = 13; } return u += String.fromCharCode(t), e2++, k = 16; case 45: if (u += String.fromCharCode(t), e2++, e2 === g || !isDigit2(n2.charCodeAt(e2))) return k = 16; case 48: case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: return u += _(), k = 11; default: for (; e2 < g && N6(t); ) e2++, t = n2.charCodeAt(e2); if (p !== e2) { switch (u = n2.substring(p, e2), u) { case "true": return k = 8; case "false": return k = 9; case "null": return k = 7; } return k = 16; } return u += String.fromCharCode(t), e2++, k = 16; } } function N6(t) { if (isWhiteSpace2(t) || isLineBreak(t)) return false; switch (t) { case 125: case 93: case 123: case 91: case 34: case 58: case 44: case 47: return false; } return true; } function I() { let t; do t = w(); while (t >= 12 && t <= 15); return t; } return { setPosition: v, getPosition: () => e2, scan: l ? I : w, getToken: () => k, getTokenValue: () => u, getTokenOffset: () => p, getTokenLength: () => e2 - p, getTokenStartLine: () => o, getTokenStartCharacter: () => p - r, getTokenError: () => T }; } function isWhiteSpace2(n2) { return n2 === 32 || n2 === 9; } function isLineBreak(n2) { return n2 === 10 || n2 === 13; } function isDigit2(n2) { return n2 >= 48 && n2 <= 57; } var CharacterCodes; (function(n2) { n2[n2.lineFeed = 10] = "lineFeed", n2[n2.carriageReturn = 13] = "carriageReturn", n2[n2.space = 32] = "space", n2[n2._0 = 48] = "_0", n2[n2._1 = 49] = "_1", n2[n2._2 = 50] = "_2", n2[n2._3 = 51] = "_3", n2[n2._4 = 52] = "_4", n2[n2._5 = 53] = "_5", n2[n2._6 = 54] = "_6", n2[n2._7 = 55] = "_7", n2[n2._8 = 56] = "_8", n2[n2._9 = 57] = "_9", n2[n2.a = 97] = "a", n2[n2.b = 98] = "b", n2[n2.c = 99] = "c", n2[n2.d = 100] = "d", n2[n2.e = 101] = "e", n2[n2.f = 102] = "f", n2[n2.g = 103] = "g", n2[n2.h = 104] = "h", n2[n2.i = 105] = "i", n2[n2.j = 106] = "j", n2[n2.k = 107] = "k", n2[n2.l = 108] = "l", n2[n2.m = 109] = "m", n2[n2.n = 110] = "n", n2[n2.o = 111] = "o", n2[n2.p = 112] = "p", n2[n2.q = 113] = "q", n2[n2.r = 114] = "r", n2[n2.s = 115] = "s", n2[n2.t = 116] = "t", n2[n2.u = 117] = "u", n2[n2.v = 118] = "v", n2[n2.w = 119] = "w", n2[n2.x = 120] = "x", n2[n2.y = 121] = "y", n2[n2.z = 122] = "z", n2[n2.A = 65] = "A", n2[n2.B = 66] = "B", n2[n2.C = 67] = "C", n2[n2.D = 68] = "D", n2[n2.E = 69] = "E", n2[n2.F = 70] = "F", n2[n2.G = 71] = "G", n2[n2.H = 72] = "H", n2[n2.I = 73] = "I", n2[n2.J = 74] = "J", n2[n2.K = 75] = "K", n2[n2.L = 76] = "L", n2[n2.M = 77] = "M", n2[n2.N = 78] = "N", n2[n2.O = 79] = "O", n2[n2.P = 80] = "P", n2[n2.Q = 81] = "Q", n2[n2.R = 82] = "R", n2[n2.S = 83] = "S", n2[n2.T = 84] = "T", n2[n2.U = 85] = "U", n2[n2.V = 86] = "V", n2[n2.W = 87] = "W", n2[n2.X = 88] = "X", n2[n2.Y = 89] = "Y", n2[n2.Z = 90] = "Z", n2[n2.asterisk = 42] = "asterisk", n2[n2.backslash = 92] = "backslash", n2[n2.closeBrace = 125] = "closeBrace", n2[n2.closeBracket = 93] = "closeBracket", n2[n2.colon = 58] = "colon", n2[n2.comma = 44] = "comma", n2[n2.dot = 46] = "dot", n2[n2.doubleQuote = 34] = "doubleQuote", n2[n2.minus = 45] = "minus", n2[n2.openBrace = 123] = "openBrace", n2[n2.openBracket = 91] = "openBracket", n2[n2.plus = 43] = "plus", n2[n2.slash = 47] = "slash", n2[n2.formFeed = 12] = "formFeed", n2[n2.tab = 9] = "tab"; })(CharacterCodes || (CharacterCodes = {})), new Array(20).fill(0).map((n2, l) => " ".repeat(l)); var maxCachedValues = 200; new Array(maxCachedValues).fill(0).map((n2, l) => ` ` + " ".repeat(l)), new Array(maxCachedValues).fill(0).map((n2, l) => "\r" + " ".repeat(l)), new Array(maxCachedValues).fill(0).map((n2, l) => `\r ` + " ".repeat(l)), new Array(maxCachedValues).fill(0).map((n2, l) => ` ` + " ".repeat(l)), new Array(maxCachedValues).fill(0).map((n2, l) => "\r" + " ".repeat(l)), new Array(maxCachedValues).fill(0).map((n2, l) => `\r ` + " ".repeat(l)); var ParseOptions; (function(n2) { n2.DEFAULT = { allowTrailingComma: false }; })(ParseOptions || (ParseOptions = {})); function parse$1(n2, l = [], g = ParseOptions.DEFAULT) { let e2 = null, u = []; const p = []; function k(o) { Array.isArray(u) ? u.push(o) : e2 !== null && (u[e2] = o); } return visit(n2, { onObjectBegin: () => { const o = {}; k(o), p.push(u), u = o, e2 = null; }, onObjectProperty: (o) => { e2 = o; }, onObjectEnd: () => { u = p.pop(); }, onArrayBegin: () => { const o = []; k(o), p.push(u), u = o, e2 = null; }, onArrayEnd: () => { u = p.pop(); }, onLiteralValue: k, onError: (o, O, r) => { l.push({ error: o, offset: O, length: r }); } }, g), u[0]; } function visit(n2, l, g = ParseOptions.DEFAULT) { const e2 = createScanner(n2, false), u = []; let p = 0; function k(f) { return f ? () => p === 0 && f(e2.getTokenOffset(), e2.getTokenLength(), e2.getTokenStartLine(), e2.getTokenStartCharacter()) : () => true; } function A(f) { return f ? (m) => p === 0 && f(m, e2.getTokenOffset(), e2.getTokenLength(), e2.getTokenStartLine(), e2.getTokenStartCharacter()) : () => true; } function o(f) { return f ? (m) => p === 0 && f(m, e2.getTokenOffset(), e2.getTokenLength(), e2.getTokenStartLine(), e2.getTokenStartCharacter(), () => u.slice()) : () => true; } function O(f) { return f ? () => { p > 0 ? p++ : f(e2.getTokenOffset(), e2.getTokenLength(), e2.getTokenStartLine(), e2.getTokenStartCharacter(), () => u.slice()) === false && (p = 1); } : () => true; } function r(f) { return f ? () => { p > 0 && p--, p === 0 && f(e2.getTokenOffset(), e2.getTokenLength(), e2.getTokenStartLine(), e2.getTokenStartCharacter()); } : () => true; } const T = O(l.onObjectBegin), L = o(l.onObjectProperty), v = r(l.onObjectEnd), _ = O(l.onArrayBegin), U3 = r(l.onArrayEnd), w = o(l.onLiteralValue), N6 = A(l.onSeparator), I = k(l.onComment), t = A(l.onError), s = g && g.disallowComments, b = g && g.allowTrailingComma; function c() { for (; ; ) { const f = e2.scan(); switch (e2.getTokenError()) { case 4: i(14); break; case 5: i(15); break; case 3: i(13); break; case 1: s || i(11); break; case 2: i(12); break; case 6: i(16); break; } switch (f) { case 12: case 13: s ? i(10) : I(); break; case 16: i(1); break; case 15: case 14: break; default: return f; } } } function i(f, m = [], j = []) { if (t(f), m.length + j.length > 0) { let B = e2.getToken(); for (; B !== 17; ) { if (m.indexOf(B) !== -1) { c(); break; } else if (j.indexOf(B) !== -1) break; B = c(); } } } function F4(f) { const m = e2.getTokenValue(); return f ? w(m) : (L(m), u.push(m)), c(), true; } function E() { switch (e2.getToken()) { case 11: const f = e2.getTokenValue(); let m = Number(f); isNaN(m) && (i(2), m = 0), w(m); break; case 7: w(null); break; case 8: w(true); break; case 9: w(false); break; default: return false; } return c(), true; } function J() { return e2.getToken() !== 10 ? (i(3, [], [2, 5]), false) : (F4(false), e2.getToken() === 6 ? (N6(":"), c(), V() || i(4, [], [2, 5])) : i(5, [], [2, 5]), u.pop(), true); } function a() { T(), c(); let f = false; for (; e2.getToken() !== 2 && e2.getToken() !== 17; ) { if (e2.getToken() === 5) { if (f || i(4, [], []), N6(","), c(), e2.getToken() === 2 && b) break; } else f && i(6, [], []); J() || i(4, [], [2, 5]), f = true; } return v(), e2.getToken() !== 2 ? i(7, [2], []) : c(), true; } function y() { _(), c(); let f = true, m = false; for (; e2.getToken() !== 4 && e2.getToken() !== 17; ) { if (e2.getToken() === 5) { if (m || i(4, [], []), N6(","), c(), e2.getToken() === 4 && b) break; } else m && i(6, [], []); f ? (u.push(0), f = false) : u[u.length - 1]++, V() || i(4, [], [4, 5]), m = true; } return U3(), f || u.pop(), e2.getToken() !== 4 ? i(8, [4], []) : c(), true; } function V() { switch (e2.getToken()) { case 3: return y(); case 1: return a(); case 10: return F4(true); default: return E(); } } return c(), e2.getToken() === 17 ? g.allowEmptyContent ? true : (i(4, [], []), false) : V() ? (e2.getToken() !== 17 && i(9, [], []), true) : (i(4, [], []), false); } var ScanError; (function(n2) { n2[n2.None = 0] = "None", n2[n2.UnexpectedEndOfComment = 1] = "UnexpectedEndOfComment", n2[n2.UnexpectedEndOfString = 2] = "UnexpectedEndOfString", n2[n2.UnexpectedEndOfNumber = 3] = "UnexpectedEndOfNumber", n2[n2.InvalidUnicode = 4] = "InvalidUnicode", n2[n2.InvalidEscapeCharacter = 5] = "InvalidEscapeCharacter", n2[n2.InvalidCharacter = 6] = "InvalidCharacter"; })(ScanError || (ScanError = {})); var SyntaxKind; (function(n2) { n2[n2.OpenBraceToken = 1] = "OpenBraceToken", n2[n2.CloseBraceToken = 2] = "CloseBraceToken", n2[n2.OpenBracketToken = 3] = "OpenBracketToken", n2[n2.CloseBracketToken = 4] = "CloseBracketToken", n2[n2.CommaToken = 5] = "CommaToken", n2[n2.ColonToken = 6] = "ColonToken", n2[n2.NullKeyword = 7] = "NullKeyword", n2[n2.TrueKeyword = 8] = "TrueKeyword", n2[n2.FalseKeyword = 9] = "FalseKeyword", n2[n2.StringLiteral = 10] = "StringLiteral", n2[n2.NumericLiteral = 11] = "NumericLiteral", n2[n2.LineCommentTrivia = 12] = "LineCommentTrivia", n2[n2.BlockCommentTrivia = 13] = "BlockCommentTrivia", n2[n2.LineBreakTrivia = 14] = "LineBreakTrivia", n2[n2.Trivia = 15] = "Trivia", n2[n2.Unknown = 16] = "Unknown", n2[n2.EOF = 17] = "EOF"; })(SyntaxKind || (SyntaxKind = {})); var parse44 = parse$1; var ParseErrorCode; (function(n2) { n2[n2.InvalidSymbol = 1] = "InvalidSymbol", n2[n2.InvalidNumberFormat = 2] = "InvalidNumberFormat", n2[n2.PropertyNameExpected = 3] = "PropertyNameExpected", n2[n2.ValueExpected = 4] = "ValueExpected", n2[n2.ColonExpected = 5] = "ColonExpected", n2[n2.CommaExpected = 6] = "CommaExpected", n2[n2.CloseBraceExpected = 7] = "CloseBraceExpected", n2[n2.CloseBracketExpected = 8] = "CloseBracketExpected", n2[n2.EndOfFileExpected = 9] = "EndOfFileExpected", n2[n2.InvalidCommentToken = 10] = "InvalidCommentToken", n2[n2.UnexpectedEndOfComment = 11] = "UnexpectedEndOfComment", n2[n2.UnexpectedEndOfString = 12] = "UnexpectedEndOfString", n2[n2.UnexpectedEndOfNumber = 13] = "UnexpectedEndOfNumber", n2[n2.InvalidUnicode = 14] = "InvalidUnicode", n2[n2.InvalidEscapeCharacter = 15] = "InvalidEscapeCharacter", n2[n2.InvalidCharacter = 16] = "InvalidCharacter"; })(ParseErrorCode || (ParseErrorCode = {})); function parseJSON(n2, l) { const g = JSON.parse(n2, l?.reviver); return _format.storeFormat(n2, g, l), g; } function stringifyJSON(n2, l) { const g = _format.getFormat(n2, l), e2 = JSON.stringify(n2, l?.replacer, g.indent); return g.whitespace.start + e2 + g.whitespace.end; } function parseJSONC(n2, l) { const g = parse44(n2, l?.errors, l); return _format.storeFormat(n2, g, l), g; } function stringifyJSONC(n2, l) { return stringifyJSON(n2, l); } exports.parseJSON = parseJSON, exports.parseJSONC = parseJSONC, exports.stringifyJSON = stringifyJSON, exports.stringifyJSONC = stringifyJSONC; } }); // node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/yaml.cjs var require_yaml = __commonJS({ "node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/yaml.cjs"(exports) { "use strict"; var _format = require_confbox_3768c7e9(); function isNothing(e2) { return typeof e2 > "u" || e2 === null; } function isObject3(e2) { return typeof e2 == "object" && e2 !== null; } function toArray2(e2) { return Array.isArray(e2) ? e2 : isNothing(e2) ? [] : [e2]; } function extend(e2, n2) { var r, o, l, f; if (n2) for (f = Object.keys(n2), r = 0, o = f.length; r < o; r += 1) l = f[r], e2[l] = n2[l]; return e2; } function repeat(e2, n2) { var r = "", o; for (o = 0; o < n2; o += 1) r += e2; return r; } function isNegativeZero(e2) { return e2 === 0 && Number.NEGATIVE_INFINITY === 1 / e2; } var isNothing_1 = isNothing; var isObject_1 = isObject3; var toArray_1 = toArray2; var repeat_1 = repeat; var isNegativeZero_1 = isNegativeZero; var extend_1 = extend; var common = { isNothing: isNothing_1, isObject: isObject_1, toArray: toArray_1, repeat: repeat_1, isNegativeZero: isNegativeZero_1, extend: extend_1 }; function formatError(e2, n2) { var r = "", o = e2.reason || "(unknown reason)"; return e2.mark ? (e2.mark.name && (r += 'in "' + e2.mark.name + '" '), r += "(" + (e2.mark.line + 1) + ":" + (e2.mark.column + 1) + ")", !n2 && e2.mark.snippet && (r += ` ` + e2.mark.snippet), o + " " + r) : o; } function YAMLException$1(e2, n2) { Error.call(this), this.name = "YAMLException", this.reason = e2, this.mark = n2, this.message = formatError(this, false), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || ""; } YAMLException$1.prototype = Object.create(Error.prototype), YAMLException$1.prototype.constructor = YAMLException$1, YAMLException$1.prototype.toString = function(n2) { return this.name + ": " + formatError(this, n2); }; var exception = YAMLException$1; function getLine(e2, n2, r, o, l) { var f = "", u = "", c = Math.floor(l / 2) - 1; return o - n2 > c && (f = " ... ", n2 = o - c + f.length), r - o > c && (u = " ...", r = o + c - u.length), { str: f + e2.slice(n2, r).replace(/\t/g, "→") + u, pos: o - n2 + f.length }; } function padStart(e2, n2) { return common.repeat(" ", n2 - e2.length) + e2; } function makeSnippet(e2, n2) { if (n2 = Object.create(n2 || null), !e2.buffer) return null; n2.maxLength || (n2.maxLength = 79), typeof n2.indent != "number" && (n2.indent = 1), typeof n2.linesBefore != "number" && (n2.linesBefore = 3), typeof n2.linesAfter != "number" && (n2.linesAfter = 2); for (var r = /\r?\n|\r|\0/g, o = [0], l = [], f, u = -1; f = r.exec(e2.buffer); ) l.push(f.index), o.push(f.index + f[0].length), e2.position <= f.index && u < 0 && (u = o.length - 2); u < 0 && (u = o.length - 1); var c = "", a, p, h2 = Math.min(e2.line + n2.linesAfter, l.length).toString().length, t = n2.maxLength - (n2.indent + h2 + 3); for (a = 1; a <= n2.linesBefore && !(u - a < 0); a++) p = getLine(e2.buffer, o[u - a], l[u - a], e2.position - (o[u] - o[u - a]), t), c = common.repeat(" ", n2.indent) + padStart((e2.line - a + 1).toString(), h2) + " | " + p.str + ` ` + c; for (p = getLine(e2.buffer, o[u], l[u], e2.position, t), c += common.repeat(" ", n2.indent) + padStart((e2.line + 1).toString(), h2) + " | " + p.str + ` `, c += common.repeat("-", n2.indent + h2 + 3 + p.pos) + `^ `, a = 1; a <= n2.linesAfter && !(u + a >= l.length); a++) p = getLine(e2.buffer, o[u + a], l[u + a], e2.position - (o[u] - o[u + a]), t), c += common.repeat(" ", n2.indent) + padStart((e2.line + a + 1).toString(), h2) + " | " + p.str + ` `; return c.replace(/\n$/, ""); } var snippet = makeSnippet; var TYPE_CONSTRUCTOR_OPTIONS = ["kind", "multi", "resolve", "construct", "instanceOf", "predicate", "represent", "representName", "defaultStyle", "styleAliases"]; var YAML_NODE_KINDS = ["scalar", "sequence", "mapping"]; function compileStyleAliases(e2) { var n2 = {}; return e2 !== null && Object.keys(e2).forEach(function(r) { e2[r].forEach(function(o) { n2[String(o)] = r; }); }), n2; } function Type$1(e2, n2) { if (n2 = n2 || {}, Object.keys(n2).forEach(function(r) { if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(r) === -1) throw new exception('Unknown option "' + r + '" is met in definition of "' + e2 + '" YAML type.'); }), this.options = n2, this.tag = e2, this.kind = n2.kind || null, this.resolve = n2.resolve || function() { return true; }, this.construct = n2.construct || function(r) { return r; }, this.instanceOf = n2.instanceOf || null, this.predicate = n2.predicate || null, this.represent = n2.represent || null, this.representName = n2.representName || null, this.defaultStyle = n2.defaultStyle || null, this.multi = n2.multi || false, this.styleAliases = compileStyleAliases(n2.styleAliases || null), YAML_NODE_KINDS.indexOf(this.kind) === -1) throw new exception('Unknown kind "' + this.kind + '" is specified for "' + e2 + '" YAML type.'); } var type = Type$1; function compileList(e2, n2) { var r = []; return e2[n2].forEach(function(o) { var l = r.length; r.forEach(function(f, u) { f.tag === o.tag && f.kind === o.kind && f.multi === o.multi && (l = u); }), r[l] = o; }), r; } function compileMap() { var e2 = { scalar: {}, sequence: {}, mapping: {}, fallback: {}, multi: { scalar: [], sequence: [], mapping: [], fallback: [] } }, n2, r; function o(l) { l.multi ? (e2.multi[l.kind].push(l), e2.multi.fallback.push(l)) : e2[l.kind][l.tag] = e2.fallback[l.tag] = l; } for (n2 = 0, r = arguments.length; n2 < r; n2 += 1) arguments[n2].forEach(o); return e2; } function Schema$1(e2) { return this.extend(e2); } Schema$1.prototype.extend = function(n2) { var r = [], o = []; if (n2 instanceof type) o.push(n2); else if (Array.isArray(n2)) o = o.concat(n2); else if (n2 && (Array.isArray(n2.implicit) || Array.isArray(n2.explicit))) n2.implicit && (r = r.concat(n2.implicit)), n2.explicit && (o = o.concat(n2.explicit)); else throw new exception("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })"); r.forEach(function(f) { if (!(f instanceof type)) throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object."); if (f.loadKind && f.loadKind !== "scalar") throw new exception("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported."); if (f.multi) throw new exception("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit."); }), o.forEach(function(f) { if (!(f instanceof type)) throw new exception("Specified list of YAML types (or a single Type object) contains a non-Type object."); }); var l = Object.create(Schema$1.prototype); return l.implicit = (this.implicit || []).concat(r), l.explicit = (this.explicit || []).concat(o), l.compiledImplicit = compileList(l, "implicit"), l.compiledExplicit = compileList(l, "explicit"), l.compiledTypeMap = compileMap(l.compiledImplicit, l.compiledExplicit), l; }; var schema = Schema$1; var str = new type("tag:yaml.org,2002:str", { kind: "scalar", construct: function(e2) { return e2 !== null ? e2 : ""; } }); var seq = new type("tag:yaml.org,2002:seq", { kind: "sequence", construct: function(e2) { return e2 !== null ? e2 : []; } }); var map = new type("tag:yaml.org,2002:map", { kind: "mapping", construct: function(e2) { return e2 !== null ? e2 : {}; } }); var failsafe = new schema({ explicit: [str, seq, map] }); function resolveYamlNull(e2) { if (e2 === null) return true; var n2 = e2.length; return n2 === 1 && e2 === "~" || n2 === 4 && (e2 === "null" || e2 === "Null" || e2 === "NULL"); } function constructYamlNull() { return null; } function isNull(e2) { return e2 === null; } var _null = new type("tag:yaml.org,2002:null", { kind: "scalar", resolve: resolveYamlNull, construct: constructYamlNull, predicate: isNull, represent: { canonical: function() { return "~"; }, lowercase: function() { return "null"; }, uppercase: function() { return "NULL"; }, camelcase: function() { return "Null"; }, empty: function() { return ""; } }, defaultStyle: "lowercase" }); function resolveYamlBoolean(e2) { if (e2 === null) return false; var n2 = e2.length; return n2 === 4 && (e2 === "true" || e2 === "True" || e2 === "TRUE") || n2 === 5 && (e2 === "false" || e2 === "False" || e2 === "FALSE"); } function constructYamlBoolean(e2) { return e2 === "true" || e2 === "True" || e2 === "TRUE"; } function isBoolean(e2) { return Object.prototype.toString.call(e2) === "[object Boolean]"; } var bool = new type("tag:yaml.org,2002:bool", { kind: "scalar", resolve: resolveYamlBoolean, construct: constructYamlBoolean, predicate: isBoolean, represent: { lowercase: function(e2) { return e2 ? "true" : "false"; }, uppercase: function(e2) { return e2 ? "TRUE" : "FALSE"; }, camelcase: function(e2) { return e2 ? "True" : "False"; } }, defaultStyle: "lowercase" }); function isHexCode(e2) { return 48 <= e2 && e2 <= 57 || 65 <= e2 && e2 <= 70 || 97 <= e2 && e2 <= 102; } function isOctCode(e2) { return 48 <= e2 && e2 <= 55; } function isDecCode(e2) { return 48 <= e2 && e2 <= 57; } function resolveYamlInteger(e2) { if (e2 === null) return false; var n2 = e2.length, r = 0, o = false, l; if (!n2) return false; if (l = e2[r], (l === "-" || l === "+") && (l = e2[++r]), l === "0") { if (r + 1 === n2) return true; if (l = e2[++r], l === "b") { for (r++; r < n2; r++) if (l = e2[r], l !== "_") { if (l !== "0" && l !== "1") return false; o = true; } return o && l !== "_"; } if (l === "x") { for (r++; r < n2; r++) if (l = e2[r], l !== "_") { if (!isHexCode(e2.charCodeAt(r))) return false; o = true; } return o && l !== "_"; } if (l === "o") { for (r++; r < n2; r++) if (l = e2[r], l !== "_") { if (!isOctCode(e2.charCodeAt(r))) return false; o = true; } return o && l !== "_"; } } if (l === "_") return false; for (; r < n2; r++) if (l = e2[r], l !== "_") { if (!isDecCode(e2.charCodeAt(r))) return false; o = true; } return !(!o || l === "_"); } function constructYamlInteger(e2) { var n2 = e2, r = 1, o; if (n2.indexOf("_") !== -1 && (n2 = n2.replace(/_/g, "")), o = n2[0], (o === "-" || o === "+") && (o === "-" && (r = -1), n2 = n2.slice(1), o = n2[0]), n2 === "0") return 0; if (o === "0") { if (n2[1] === "b") return r * parseInt(n2.slice(2), 2); if (n2[1] === "x") return r * parseInt(n2.slice(2), 16); if (n2[1] === "o") return r * parseInt(n2.slice(2), 8); } return r * parseInt(n2, 10); } function isInteger(e2) { return Object.prototype.toString.call(e2) === "[object Number]" && e2 % 1 === 0 && !common.isNegativeZero(e2); } var int = new type("tag:yaml.org,2002:int", { kind: "scalar", resolve: resolveYamlInteger, construct: constructYamlInteger, predicate: isInteger, represent: { binary: function(e2) { return e2 >= 0 ? "0b" + e2.toString(2) : "-0b" + e2.toString(2).slice(1); }, octal: function(e2) { return e2 >= 0 ? "0o" + e2.toString(8) : "-0o" + e2.toString(8).slice(1); }, decimal: function(e2) { return e2.toString(10); }, hexadecimal: function(e2) { return e2 >= 0 ? "0x" + e2.toString(16).toUpperCase() : "-0x" + e2.toString(16).toUpperCase().slice(1); } }, defaultStyle: "decimal", styleAliases: { binary: [2, "bin"], octal: [8, "oct"], decimal: [10, "dec"], hexadecimal: [16, "hex"] } }); var YAML_FLOAT_PATTERN = new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); function resolveYamlFloat(e2) { return !(e2 === null || !YAML_FLOAT_PATTERN.test(e2) || e2[e2.length - 1] === "_"); } function constructYamlFloat(e2) { var n2, r; return n2 = e2.replace(/_/g, "").toLowerCase(), r = n2[0] === "-" ? -1 : 1, "+-".indexOf(n2[0]) >= 0 && (n2 = n2.slice(1)), n2 === ".inf" ? r === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : n2 === ".nan" ? NaN : r * parseFloat(n2, 10); } var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/; function representYamlFloat(e2, n2) { var r; if (isNaN(e2)) switch (n2) { case "lowercase": return ".nan"; case "uppercase": return ".NAN"; case "camelcase": return ".NaN"; } else if (Number.POSITIVE_INFINITY === e2) switch (n2) { case "lowercase": return ".inf"; case "uppercase": return ".INF"; case "camelcase": return ".Inf"; } else if (Number.NEGATIVE_INFINITY === e2) switch (n2) { case "lowercase": return "-.inf"; case "uppercase": return "-.INF"; case "camelcase": return "-.Inf"; } else if (common.isNegativeZero(e2)) return "-0.0"; return r = e2.toString(10), SCIENTIFIC_WITHOUT_DOT.test(r) ? r.replace("e", ".e") : r; } function isFloat(e2) { return Object.prototype.toString.call(e2) === "[object Number]" && (e2 % 1 !== 0 || common.isNegativeZero(e2)); } var float = new type("tag:yaml.org,2002:float", { kind: "scalar", resolve: resolveYamlFloat, construct: constructYamlFloat, predicate: isFloat, represent: representYamlFloat, defaultStyle: "lowercase" }); var json = failsafe.extend({ implicit: [_null, bool, int, float] }); var core = json; var YAML_DATE_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"); var YAML_TIMESTAMP_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"); function resolveYamlTimestamp(e2) { return e2 === null ? false : YAML_DATE_REGEXP.exec(e2) !== null || YAML_TIMESTAMP_REGEXP.exec(e2) !== null; } function constructYamlTimestamp(e2) { var n2, r, o, l, f, u, c, a = 0, p = null, h2, t, d; if (n2 = YAML_DATE_REGEXP.exec(e2), n2 === null && (n2 = YAML_TIMESTAMP_REGEXP.exec(e2)), n2 === null) throw new Error("Date resolve error"); if (r = +n2[1], o = +n2[2] - 1, l = +n2[3], !n2[4]) return new Date(Date.UTC(r, o, l)); if (f = +n2[4], u = +n2[5], c = +n2[6], n2[7]) { for (a = n2[7].slice(0, 3); a.length < 3; ) a += "0"; a = +a; } return n2[9] && (h2 = +n2[10], t = +(n2[11] || 0), p = (h2 * 60 + t) * 6e4, n2[9] === "-" && (p = -p)), d = new Date(Date.UTC(r, o, l, f, u, c, a)), p && d.setTime(d.getTime() - p), d; } function representYamlTimestamp(e2) { return e2.toISOString(); } var timestamp = new type("tag:yaml.org,2002:timestamp", { kind: "scalar", resolve: resolveYamlTimestamp, construct: constructYamlTimestamp, instanceOf: Date, represent: representYamlTimestamp }); function resolveYamlMerge(e2) { return e2 === "<<" || e2 === null; } var merge = new type("tag:yaml.org,2002:merge", { kind: "scalar", resolve: resolveYamlMerge }); var BASE64_MAP = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`; function resolveYamlBinary(e2) { if (e2 === null) return false; var n2, r, o = 0, l = e2.length, f = BASE64_MAP; for (r = 0; r < l; r++) if (n2 = f.indexOf(e2.charAt(r)), !(n2 > 64)) { if (n2 < 0) return false; o += 6; } return o % 8 === 0; } function constructYamlBinary(e2) { var n2, r, o = e2.replace(/[\r\n=]/g, ""), l = o.length, f = BASE64_MAP, u = 0, c = []; for (n2 = 0; n2 < l; n2++) n2 % 4 === 0 && n2 && (c.push(u >> 16 & 255), c.push(u >> 8 & 255), c.push(u & 255)), u = u << 6 | f.indexOf(o.charAt(n2)); return r = l % 4 * 6, r === 0 ? (c.push(u >> 16 & 255), c.push(u >> 8 & 255), c.push(u & 255)) : r === 18 ? (c.push(u >> 10 & 255), c.push(u >> 2 & 255)) : r === 12 && c.push(u >> 4 & 255), new Uint8Array(c); } function representYamlBinary(e2) { var n2 = "", r = 0, o, l, f = e2.length, u = BASE64_MAP; for (o = 0; o < f; o++) o % 3 === 0 && o && (n2 += u[r >> 18 & 63], n2 += u[r >> 12 & 63], n2 += u[r >> 6 & 63], n2 += u[r & 63]), r = (r << 8) + e2[o]; return l = f % 3, l === 0 ? (n2 += u[r >> 18 & 63], n2 += u[r >> 12 & 63], n2 += u[r >> 6 & 63], n2 += u[r & 63]) : l === 2 ? (n2 += u[r >> 10 & 63], n2 += u[r >> 4 & 63], n2 += u[r << 2 & 63], n2 += u[64]) : l === 1 && (n2 += u[r >> 2 & 63], n2 += u[r << 4 & 63], n2 += u[64], n2 += u[64]), n2; } function isBinary(e2) { return Object.prototype.toString.call(e2) === "[object Uint8Array]"; } var binary = new type("tag:yaml.org,2002:binary", { kind: "scalar", resolve: resolveYamlBinary, construct: constructYamlBinary, predicate: isBinary, represent: representYamlBinary }); var _hasOwnProperty$3 = Object.prototype.hasOwnProperty; var _toString$2 = Object.prototype.toString; function resolveYamlOmap(e2) { if (e2 === null) return true; var n2 = [], r, o, l, f, u, c = e2; for (r = 0, o = c.length; r < o; r += 1) { if (l = c[r], u = false, _toString$2.call(l) !== "[object Object]") return false; for (f in l) if (_hasOwnProperty$3.call(l, f)) if (!u) u = true; else return false; if (!u) return false; if (n2.indexOf(f) === -1) n2.push(f); else return false; } return true; } function constructYamlOmap(e2) { return e2 !== null ? e2 : []; } var omap = new type("tag:yaml.org,2002:omap", { kind: "sequence", resolve: resolveYamlOmap, construct: constructYamlOmap }); var _toString$1 = Object.prototype.toString; function resolveYamlPairs(e2) { if (e2 === null) return true; var n2, r, o, l, f, u = e2; for (f = new Array(u.length), n2 = 0, r = u.length; n2 < r; n2 += 1) { if (o = u[n2], _toString$1.call(o) !== "[object Object]" || (l = Object.keys(o), l.length !== 1)) return false; f[n2] = [l[0], o[l[0]]]; } return true; } function constructYamlPairs(e2) { if (e2 === null) return []; var n2, r, o, l, f, u = e2; for (f = new Array(u.length), n2 = 0, r = u.length; n2 < r; n2 += 1) o = u[n2], l = Object.keys(o), f[n2] = [l[0], o[l[0]]]; return f; } var pairs = new type("tag:yaml.org,2002:pairs", { kind: "sequence", resolve: resolveYamlPairs, construct: constructYamlPairs }); var _hasOwnProperty$2 = Object.prototype.hasOwnProperty; function resolveYamlSet(e2) { if (e2 === null) return true; var n2, r = e2; for (n2 in r) if (_hasOwnProperty$2.call(r, n2) && r[n2] !== null) return false; return true; } function constructYamlSet(e2) { return e2 !== null ? e2 : {}; } var set = new type("tag:yaml.org,2002:set", { kind: "mapping", resolve: resolveYamlSet, construct: constructYamlSet }); var _default = core.extend({ implicit: [timestamp, merge], explicit: [binary, omap, pairs, set] }); var _hasOwnProperty$1 = Object.prototype.hasOwnProperty; var CONTEXT_FLOW_IN = 1; var CONTEXT_FLOW_OUT = 2; var CONTEXT_BLOCK_IN = 3; var CONTEXT_BLOCK_OUT = 4; var CHOMPING_CLIP = 1; var CHOMPING_STRIP = 2; var CHOMPING_KEEP = 3; var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/; var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/; var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/; var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i; var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i; function _class(e2) { return Object.prototype.toString.call(e2); } function is_EOL(e2) { return e2 === 10 || e2 === 13; } function is_WHITE_SPACE(e2) { return e2 === 9 || e2 === 32; } function is_WS_OR_EOL(e2) { return e2 === 9 || e2 === 32 || e2 === 10 || e2 === 13; } function is_FLOW_INDICATOR(e2) { return e2 === 44 || e2 === 91 || e2 === 93 || e2 === 123 || e2 === 125; } function fromHexCode(e2) { var n2; return 48 <= e2 && e2 <= 57 ? e2 - 48 : (n2 = e2 | 32, 97 <= n2 && n2 <= 102 ? n2 - 97 + 10 : -1); } function escapedHexLen(e2) { return e2 === 120 ? 2 : e2 === 117 ? 4 : e2 === 85 ? 8 : 0; } function fromDecimalCode(e2) { return 48 <= e2 && e2 <= 57 ? e2 - 48 : -1; } function simpleEscapeSequence(e2) { return e2 === 48 ? "\0" : e2 === 97 ? "\x07" : e2 === 98 ? "\b" : e2 === 116 || e2 === 9 ? " " : e2 === 110 ? ` ` : e2 === 118 ? "\v" : e2 === 102 ? "\f" : e2 === 114 ? "\r" : e2 === 101 ? "\x1B" : e2 === 32 ? " " : e2 === 34 ? '"' : e2 === 47 ? "/" : e2 === 92 ? "\\" : e2 === 78 ? "…" : e2 === 95 ? " " : e2 === 76 ? "\u2028" : e2 === 80 ? "\u2029" : ""; } function charFromCodepoint(e2) { return e2 <= 65535 ? String.fromCharCode(e2) : String.fromCharCode((e2 - 65536 >> 10) + 55296, (e2 - 65536 & 1023) + 56320); } for (simpleEscapeCheck = new Array(256), simpleEscapeMap = new Array(256), i = 0; i < 256; i++) simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0, simpleEscapeMap[i] = simpleEscapeSequence(i); var simpleEscapeCheck; var simpleEscapeMap; var i; function State$1(e2, n2) { this.input = e2, this.filename = n2.filename || null, this.schema = n2.schema || _default, this.onWarning = n2.onWarning || null, this.legacy = n2.legacy || false, this.json = n2.json || false, this.listener = n2.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e2.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = []; } function generateError(e2, n2) { var r = { name: e2.filename, buffer: e2.input.slice(0, -1), position: e2.position, line: e2.line, column: e2.position - e2.lineStart }; return r.snippet = snippet(r), new exception(n2, r); } function throwError(e2, n2) { throw generateError(e2, n2); } function throwWarning(e2, n2) { e2.onWarning && e2.onWarning.call(null, generateError(e2, n2)); } var directiveHandlers = { YAML: function(n2, r, o) { var l, f, u; n2.version !== null && throwError(n2, "duplication of %YAML directive"), o.length !== 1 && throwError(n2, "YAML directive accepts exactly one argument"), l = /^([0-9]+)\.([0-9]+)$/.exec(o[0]), l === null && throwError(n2, "ill-formed argument of the YAML directive"), f = parseInt(l[1], 10), u = parseInt(l[2], 10), f !== 1 && throwError(n2, "unacceptable YAML version of the document"), n2.version = o[0], n2.checkLineBreaks = u < 2, u !== 1 && u !== 2 && throwWarning(n2, "unsupported YAML version of the document"); }, TAG: function(n2, r, o) { var l, f; o.length !== 2 && throwError(n2, "TAG directive accepts exactly two arguments"), l = o[0], f = o[1], PATTERN_TAG_HANDLE.test(l) || throwError(n2, "ill-formed tag handle (first argument) of the TAG directive"), _hasOwnProperty$1.call(n2.tagMap, l) && throwError(n2, 'there is a previously declared suffix for "' + l + '" tag handle'), PATTERN_TAG_URI.test(f) || throwError(n2, "ill-formed tag prefix (second argument) of the TAG directive"); try { f = decodeURIComponent(f); } catch { throwError(n2, "tag prefix is malformed: " + f); } n2.tagMap[l] = f; } }; function captureSegment(e2, n2, r, o) { var l, f, u, c; if (n2 < r) { if (c = e2.input.slice(n2, r), o) for (l = 0, f = c.length; l < f; l += 1) u = c.charCodeAt(l), u === 9 || 32 <= u && u <= 1114111 || throwError(e2, "expected valid JSON character"); else PATTERN_NON_PRINTABLE.test(c) && throwError(e2, "the stream contains non-printable characters"); e2.result += c; } } function mergeMappings(e2, n2, r, o) { var l, f, u, c; for (common.isObject(r) || throwError(e2, "cannot merge mappings; the provided source object is unacceptable"), l = Object.keys(r), u = 0, c = l.length; u < c; u += 1) f = l[u], _hasOwnProperty$1.call(n2, f) || (n2[f] = r[f], o[f] = true); } function storeMappingPair(e2, n2, r, o, l, f, u, c, a) { var p, h2; if (Array.isArray(l)) for (l = Array.prototype.slice.call(l), p = 0, h2 = l.length; p < h2; p += 1) Array.isArray(l[p]) && throwError(e2, "nested arrays are not supported inside keys"), typeof l == "object" && _class(l[p]) === "[object Object]" && (l[p] = "[object Object]"); if (typeof l == "object" && _class(l) === "[object Object]" && (l = "[object Object]"), l = String(l), n2 === null && (n2 = {}), o === "tag:yaml.org,2002:merge") if (Array.isArray(f)) for (p = 0, h2 = f.length; p < h2; p += 1) mergeMappings(e2, n2, f[p], r); else mergeMappings(e2, n2, f, r); else !e2.json && !_hasOwnProperty$1.call(r, l) && _hasOwnProperty$1.call(n2, l) && (e2.line = u || e2.line, e2.lineStart = c || e2.lineStart, e2.position = a || e2.position, throwError(e2, "duplicated mapping key")), l === "__proto__" ? Object.defineProperty(n2, l, { configurable: true, enumerable: true, writable: true, value: f }) : n2[l] = f, delete r[l]; return n2; } function readLineBreak(e2) { var n2; n2 = e2.input.charCodeAt(e2.position), n2 === 10 ? e2.position++ : n2 === 13 ? (e2.position++, e2.input.charCodeAt(e2.position) === 10 && e2.position++) : throwError(e2, "a line break is expected"), e2.line += 1, e2.lineStart = e2.position, e2.firstTabInLine = -1; } function skipSeparationSpace(e2, n2, r) { for (var o = 0, l = e2.input.charCodeAt(e2.position); l !== 0; ) { for (; is_WHITE_SPACE(l); ) l === 9 && e2.firstTabInLine === -1 && (e2.firstTabInLine = e2.position), l = e2.input.charCodeAt(++e2.position); if (n2 && l === 35) do l = e2.input.charCodeAt(++e2.position); while (l !== 10 && l !== 13 && l !== 0); if (is_EOL(l)) for (readLineBreak(e2), l = e2.input.charCodeAt(e2.position), o++, e2.lineIndent = 0; l === 32; ) e2.lineIndent++, l = e2.input.charCodeAt(++e2.position); else break; } return r !== -1 && o !== 0 && e2.lineIndent < r && throwWarning(e2, "deficient indentation"), o; } function testDocumentSeparator(e2) { var n2 = e2.position, r; return r = e2.input.charCodeAt(n2), !!((r === 45 || r === 46) && r === e2.input.charCodeAt(n2 + 1) && r === e2.input.charCodeAt(n2 + 2) && (n2 += 3, r = e2.input.charCodeAt(n2), r === 0 || is_WS_OR_EOL(r))); } function writeFoldedLines(e2, n2) { n2 === 1 ? e2.result += " " : n2 > 1 && (e2.result += common.repeat(` `, n2 - 1)); } function readPlainScalar(e2, n2, r) { var o, l, f, u, c, a, p, h2, t = e2.kind, d = e2.result, s; if (s = e2.input.charCodeAt(e2.position), is_WS_OR_EOL(s) || is_FLOW_INDICATOR(s) || s === 35 || s === 38 || s === 42 || s === 33 || s === 124 || s === 62 || s === 39 || s === 34 || s === 37 || s === 64 || s === 96 || (s === 63 || s === 45) && (l = e2.input.charCodeAt(e2.position + 1), is_WS_OR_EOL(l) || r && is_FLOW_INDICATOR(l))) return false; for (e2.kind = "scalar", e2.result = "", f = u = e2.position, c = false; s !== 0; ) { if (s === 58) { if (l = e2.input.charCodeAt(e2.position + 1), is_WS_OR_EOL(l) || r && is_FLOW_INDICATOR(l)) break; } else if (s === 35) { if (o = e2.input.charCodeAt(e2.position - 1), is_WS_OR_EOL(o)) break; } else { if (e2.position === e2.lineStart && testDocumentSeparator(e2) || r && is_FLOW_INDICATOR(s)) break; if (is_EOL(s)) if (a = e2.line, p = e2.lineStart, h2 = e2.lineIndent, skipSeparationSpace(e2, false, -1), e2.lineIndent >= n2) { c = true, s = e2.input.charCodeAt(e2.position); continue; } else { e2.position = u, e2.line = a, e2.lineStart = p, e2.lineIndent = h2; break; } } c && (captureSegment(e2, f, u, false), writeFoldedLines(e2, e2.line - a), f = u = e2.position, c = false), is_WHITE_SPACE(s) || (u = e2.position + 1), s = e2.input.charCodeAt(++e2.position); } return captureSegment(e2, f, u, false), e2.result ? true : (e2.kind = t, e2.result = d, false); } function readSingleQuotedScalar(e2, n2) { var r, o, l; if (r = e2.input.charCodeAt(e2.position), r !== 39) return false; for (e2.kind = "scalar", e2.result = "", e2.position++, o = l = e2.position; (r = e2.input.charCodeAt(e2.position)) !== 0; ) if (r === 39) if (captureSegment(e2, o, e2.position, true), r = e2.input.charCodeAt(++e2.position), r === 39) o = e2.position, e2.position++, l = e2.position; else return true; else is_EOL(r) ? (captureSegment(e2, o, l, true), writeFoldedLines(e2, skipSeparationSpace(e2, false, n2)), o = l = e2.position) : e2.position === e2.lineStart && testDocumentSeparator(e2) ? throwError(e2, "unexpected end of the document within a single quoted scalar") : (e2.position++, l = e2.position); throwError(e2, "unexpected end of the stream within a single quoted scalar"); } function readDoubleQuotedScalar(e2, n2) { var r, o, l, f, u, c; if (c = e2.input.charCodeAt(e2.position), c !== 34) return false; for (e2.kind = "scalar", e2.result = "", e2.position++, r = o = e2.position; (c = e2.input.charCodeAt(e2.position)) !== 0; ) { if (c === 34) return captureSegment(e2, r, e2.position, true), e2.position++, true; if (c === 92) { if (captureSegment(e2, r, e2.position, true), c = e2.input.charCodeAt(++e2.position), is_EOL(c)) skipSeparationSpace(e2, false, n2); else if (c < 256 && simpleEscapeCheck[c]) e2.result += simpleEscapeMap[c], e2.position++; else if ((u = escapedHexLen(c)) > 0) { for (l = u, f = 0; l > 0; l--) c = e2.input.charCodeAt(++e2.position), (u = fromHexCode(c)) >= 0 ? f = (f << 4) + u : throwError(e2, "expected hexadecimal character"); e2.result += charFromCodepoint(f), e2.position++; } else throwError(e2, "unknown escape sequence"); r = o = e2.position; } else is_EOL(c) ? (captureSegment(e2, r, o, true), writeFoldedLines(e2, skipSeparationSpace(e2, false, n2)), r = o = e2.position) : e2.position === e2.lineStart && testDocumentSeparator(e2) ? throwError(e2, "unexpected end of the document within a double quoted scalar") : (e2.position++, o = e2.position); } throwError(e2, "unexpected end of the stream within a double quoted scalar"); } function readFlowCollection(e2, n2) { var r = true, o, l, f, u = e2.tag, c, a = e2.anchor, p, h2, t, d, s, x2 = /* @__PURE__ */ Object.create(null), g, A, v, m; if (m = e2.input.charCodeAt(e2.position), m === 91) h2 = 93, s = false, c = []; else if (m === 123) h2 = 125, s = true, c = {}; else return false; for (e2.anchor !== null && (e2.anchorMap[e2.anchor] = c), m = e2.input.charCodeAt(++e2.position); m !== 0; ) { if (skipSeparationSpace(e2, true, n2), m = e2.input.charCodeAt(e2.position), m === h2) return e2.position++, e2.tag = u, e2.anchor = a, e2.kind = s ? "mapping" : "sequence", e2.result = c, true; r ? m === 44 && throwError(e2, "expected the node content, but found ','") : throwError(e2, "missed comma between flow collection entries"), A = g = v = null, t = d = false, m === 63 && (p = e2.input.charCodeAt(e2.position + 1), is_WS_OR_EOL(p) && (t = d = true, e2.position++, skipSeparationSpace(e2, true, n2))), o = e2.line, l = e2.lineStart, f = e2.position, composeNode(e2, n2, CONTEXT_FLOW_IN, false, true), A = e2.tag, g = e2.result, skipSeparationSpace(e2, true, n2), m = e2.input.charCodeAt(e2.position), (d || e2.line === o) && m === 58 && (t = true, m = e2.input.charCodeAt(++e2.position), skipSeparationSpace(e2, true, n2), composeNode(e2, n2, CONTEXT_FLOW_IN, false, true), v = e2.result), s ? storeMappingPair(e2, c, x2, A, g, v, o, l, f) : t ? c.push(storeMappingPair(e2, null, x2, A, g, v, o, l, f)) : c.push(g), skipSeparationSpace(e2, true, n2), m = e2.input.charCodeAt(e2.position), m === 44 ? (r = true, m = e2.input.charCodeAt(++e2.position)) : r = false; } throwError(e2, "unexpected end of the stream within a flow collection"); } function readBlockScalar(e2, n2) { var r, o, l = CHOMPING_CLIP, f = false, u = false, c = n2, a = 0, p = false, h2, t; if (t = e2.input.charCodeAt(e2.position), t === 124) o = false; else if (t === 62) o = true; else return false; for (e2.kind = "scalar", e2.result = ""; t !== 0; ) if (t = e2.input.charCodeAt(++e2.position), t === 43 || t === 45) CHOMPING_CLIP === l ? l = t === 43 ? CHOMPING_KEEP : CHOMPING_STRIP : throwError(e2, "repeat of a chomping mode identifier"); else if ((h2 = fromDecimalCode(t)) >= 0) h2 === 0 ? throwError(e2, "bad explicit indentation width of a block scalar; it cannot be less than one") : u ? throwError(e2, "repeat of an indentation width identifier") : (c = n2 + h2 - 1, u = true); else break; if (is_WHITE_SPACE(t)) { do t = e2.input.charCodeAt(++e2.position); while (is_WHITE_SPACE(t)); if (t === 35) do t = e2.input.charCodeAt(++e2.position); while (!is_EOL(t) && t !== 0); } for (; t !== 0; ) { for (readLineBreak(e2), e2.lineIndent = 0, t = e2.input.charCodeAt(e2.position); (!u || e2.lineIndent < c) && t === 32; ) e2.lineIndent++, t = e2.input.charCodeAt(++e2.position); if (!u && e2.lineIndent > c && (c = e2.lineIndent), is_EOL(t)) { a++; continue; } if (e2.lineIndent < c) { l === CHOMPING_KEEP ? e2.result += common.repeat(` `, f ? 1 + a : a) : l === CHOMPING_CLIP && f && (e2.result += ` `); break; } for (o ? is_WHITE_SPACE(t) ? (p = true, e2.result += common.repeat(` `, f ? 1 + a : a)) : p ? (p = false, e2.result += common.repeat(` `, a + 1)) : a === 0 ? f && (e2.result += " ") : e2.result += common.repeat(` `, a) : e2.result += common.repeat(` `, f ? 1 + a : a), f = true, u = true, a = 0, r = e2.position; !is_EOL(t) && t !== 0; ) t = e2.input.charCodeAt(++e2.position); captureSegment(e2, r, e2.position, false); } return true; } function readBlockSequence(e2, n2) { var r, o = e2.tag, l = e2.anchor, f = [], u, c = false, a; if (e2.firstTabInLine !== -1) return false; for (e2.anchor !== null && (e2.anchorMap[e2.anchor] = f), a = e2.input.charCodeAt(e2.position); a !== 0 && (e2.firstTabInLine !== -1 && (e2.position = e2.firstTabInLine, throwError(e2, "tab characters must not be used in indentation")), !(a !== 45 || (u = e2.input.charCodeAt(e2.position + 1), !is_WS_OR_EOL(u)))); ) { if (c = true, e2.position++, skipSeparationSpace(e2, true, -1) && e2.lineIndent <= n2) { f.push(null), a = e2.input.charCodeAt(e2.position); continue; } if (r = e2.line, composeNode(e2, n2, CONTEXT_BLOCK_IN, false, true), f.push(e2.result), skipSeparationSpace(e2, true, -1), a = e2.input.charCodeAt(e2.position), (e2.line === r || e2.lineIndent > n2) && a !== 0) throwError(e2, "bad indentation of a sequence entry"); else if (e2.lineIndent < n2) break; } return c ? (e2.tag = o, e2.anchor = l, e2.kind = "sequence", e2.result = f, true) : false; } function readBlockMapping(e2, n2, r) { var o, l, f, u, c, a, p = e2.tag, h2 = e2.anchor, t = {}, d = /* @__PURE__ */ Object.create(null), s = null, x2 = null, g = null, A = false, v = false, m; if (e2.firstTabInLine !== -1) return false; for (e2.anchor !== null && (e2.anchorMap[e2.anchor] = t), m = e2.input.charCodeAt(e2.position); m !== 0; ) { if (!A && e2.firstTabInLine !== -1 && (e2.position = e2.firstTabInLine, throwError(e2, "tab characters must not be used in indentation")), o = e2.input.charCodeAt(e2.position + 1), f = e2.line, (m === 63 || m === 58) && is_WS_OR_EOL(o)) m === 63 ? (A && (storeMappingPair(e2, t, d, s, x2, null, u, c, a), s = x2 = g = null), v = true, A = true, l = true) : A ? (A = false, l = true) : throwError(e2, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e2.position += 1, m = o; else { if (u = e2.line, c = e2.lineStart, a = e2.position, !composeNode(e2, r, CONTEXT_FLOW_OUT, false, true)) break; if (e2.line === f) { for (m = e2.input.charCodeAt(e2.position); is_WHITE_SPACE(m); ) m = e2.input.charCodeAt(++e2.position); if (m === 58) m = e2.input.charCodeAt(++e2.position), is_WS_OR_EOL(m) || throwError(e2, "a whitespace character is expected after the key-value separator within a block mapping"), A && (storeMappingPair(e2, t, d, s, x2, null, u, c, a), s = x2 = g = null), v = true, A = false, l = false, s = e2.tag, x2 = e2.result; else if (v) throwError(e2, "can not read an implicit mapping pair; a colon is missed"); else return e2.tag = p, e2.anchor = h2, true; } else if (v) throwError(e2, "can not read a block mapping entry; a multiline key may not be an implicit key"); else return e2.tag = p, e2.anchor = h2, true; } if ((e2.line === f || e2.lineIndent > n2) && (A && (u = e2.line, c = e2.lineStart, a = e2.position), composeNode(e2, n2, CONTEXT_BLOCK_OUT, true, l) && (A ? x2 = e2.result : g = e2.result), A || (storeMappingPair(e2, t, d, s, x2, g, u, c, a), s = x2 = g = null), skipSeparationSpace(e2, true, -1), m = e2.input.charCodeAt(e2.position)), (e2.line === f || e2.lineIndent > n2) && m !== 0) throwError(e2, "bad indentation of a mapping entry"); else if (e2.lineIndent < n2) break; } return A && storeMappingPair(e2, t, d, s, x2, null, u, c, a), v && (e2.tag = p, e2.anchor = h2, e2.kind = "mapping", e2.result = t), v; } function readTagProperty(e2) { var n2, r = false, o = false, l, f, u; if (u = e2.input.charCodeAt(e2.position), u !== 33) return false; if (e2.tag !== null && throwError(e2, "duplication of a tag property"), u = e2.input.charCodeAt(++e2.position), u === 60 ? (r = true, u = e2.input.charCodeAt(++e2.position)) : u === 33 ? (o = true, l = "!!", u = e2.input.charCodeAt(++e2.position)) : l = "!", n2 = e2.position, r) { do u = e2.input.charCodeAt(++e2.position); while (u !== 0 && u !== 62); e2.position < e2.length ? (f = e2.input.slice(n2, e2.position), u = e2.input.charCodeAt(++e2.position)) : throwError(e2, "unexpected end of the stream within a verbatim tag"); } else { for (; u !== 0 && !is_WS_OR_EOL(u); ) u === 33 && (o ? throwError(e2, "tag suffix cannot contain exclamation marks") : (l = e2.input.slice(n2 - 1, e2.position + 1), PATTERN_TAG_HANDLE.test(l) || throwError(e2, "named tag handle cannot contain such characters"), o = true, n2 = e2.position + 1)), u = e2.input.charCodeAt(++e2.position); f = e2.input.slice(n2, e2.position), PATTERN_FLOW_INDICATORS.test(f) && throwError(e2, "tag suffix cannot contain flow indicator characters"); } f && !PATTERN_TAG_URI.test(f) && throwError(e2, "tag name cannot contain such characters: " + f); try { f = decodeURIComponent(f); } catch { throwError(e2, "tag name is malformed: " + f); } return r ? e2.tag = f : _hasOwnProperty$1.call(e2.tagMap, l) ? e2.tag = e2.tagMap[l] + f : l === "!" ? e2.tag = "!" + f : l === "!!" ? e2.tag = "tag:yaml.org,2002:" + f : throwError(e2, 'undeclared tag handle "' + l + '"'), true; } function readAnchorProperty(e2) { var n2, r; if (r = e2.input.charCodeAt(e2.position), r !== 38) return false; for (e2.anchor !== null && throwError(e2, "duplication of an anchor property"), r = e2.input.charCodeAt(++e2.position), n2 = e2.position; r !== 0 && !is_WS_OR_EOL(r) && !is_FLOW_INDICATOR(r); ) r = e2.input.charCodeAt(++e2.position); return e2.position === n2 && throwError(e2, "name of an anchor node must contain at least one character"), e2.anchor = e2.input.slice(n2, e2.position), true; } function readAlias(e2) { var n2, r, o; if (o = e2.input.charCodeAt(e2.position), o !== 42) return false; for (o = e2.input.charCodeAt(++e2.position), n2 = e2.position; o !== 0 && !is_WS_OR_EOL(o) && !is_FLOW_INDICATOR(o); ) o = e2.input.charCodeAt(++e2.position); return e2.position === n2 && throwError(e2, "name of an alias node must contain at least one character"), r = e2.input.slice(n2, e2.position), _hasOwnProperty$1.call(e2.anchorMap, r) || throwError(e2, 'unidentified alias "' + r + '"'), e2.result = e2.anchorMap[r], skipSeparationSpace(e2, true, -1), true; } function composeNode(e2, n2, r, o, l) { var f, u, c, a = 1, p = false, h2 = false, t, d, s, x2, g, A; if (e2.listener !== null && e2.listener("open", e2), e2.tag = null, e2.anchor = null, e2.kind = null, e2.result = null, f = u = c = CONTEXT_BLOCK_OUT === r || CONTEXT_BLOCK_IN === r, o && skipSeparationSpace(e2, true, -1) && (p = true, e2.lineIndent > n2 ? a = 1 : e2.lineIndent === n2 ? a = 0 : e2.lineIndent < n2 && (a = -1)), a === 1) for (; readTagProperty(e2) || readAnchorProperty(e2); ) skipSeparationSpace(e2, true, -1) ? (p = true, c = f, e2.lineIndent > n2 ? a = 1 : e2.lineIndent === n2 ? a = 0 : e2.lineIndent < n2 && (a = -1)) : c = false; if (c && (c = p || l), (a === 1 || CONTEXT_BLOCK_OUT === r) && (CONTEXT_FLOW_IN === r || CONTEXT_FLOW_OUT === r ? g = n2 : g = n2 + 1, A = e2.position - e2.lineStart, a === 1 ? c && (readBlockSequence(e2, A) || readBlockMapping(e2, A, g)) || readFlowCollection(e2, g) ? h2 = true : (u && readBlockScalar(e2, g) || readSingleQuotedScalar(e2, g) || readDoubleQuotedScalar(e2, g) ? h2 = true : readAlias(e2) ? (h2 = true, (e2.tag !== null || e2.anchor !== null) && throwError(e2, "alias node should not have any properties")) : readPlainScalar(e2, g, CONTEXT_FLOW_IN === r) && (h2 = true, e2.tag === null && (e2.tag = "?")), e2.anchor !== null && (e2.anchorMap[e2.anchor] = e2.result)) : a === 0 && (h2 = c && readBlockSequence(e2, A))), e2.tag === null) e2.anchor !== null && (e2.anchorMap[e2.anchor] = e2.result); else if (e2.tag === "?") { for (e2.result !== null && e2.kind !== "scalar" && throwError(e2, 'unacceptable node kind for ! tag; it should be "scalar", not "' + e2.kind + '"'), t = 0, d = e2.implicitTypes.length; t < d; t += 1) if (x2 = e2.implicitTypes[t], x2.resolve(e2.result)) { e2.result = x2.construct(e2.result), e2.tag = x2.tag, e2.anchor !== null && (e2.anchorMap[e2.anchor] = e2.result); break; } } else if (e2.tag !== "!") { if (_hasOwnProperty$1.call(e2.typeMap[e2.kind || "fallback"], e2.tag)) x2 = e2.typeMap[e2.kind || "fallback"][e2.tag]; else for (x2 = null, s = e2.typeMap.multi[e2.kind || "fallback"], t = 0, d = s.length; t < d; t += 1) if (e2.tag.slice(0, s[t].tag.length) === s[t].tag) { x2 = s[t]; break; } x2 || throwError(e2, "unknown tag !<" + e2.tag + ">"), e2.result !== null && x2.kind !== e2.kind && throwError(e2, "unacceptable node kind for !<" + e2.tag + '> tag; it should be "' + x2.kind + '", not "' + e2.kind + '"'), x2.resolve(e2.result, e2.tag) ? (e2.result = x2.construct(e2.result, e2.tag), e2.anchor !== null && (e2.anchorMap[e2.anchor] = e2.result)) : throwError(e2, "cannot resolve a node with !<" + e2.tag + "> explicit tag"); } return e2.listener !== null && e2.listener("close", e2), e2.tag !== null || e2.anchor !== null || h2; } function readDocument(e2) { var n2 = e2.position, r, o, l, f = false, u; for (e2.version = null, e2.checkLineBreaks = e2.legacy, e2.tagMap = /* @__PURE__ */ Object.create(null), e2.anchorMap = /* @__PURE__ */ Object.create(null); (u = e2.input.charCodeAt(e2.position)) !== 0 && (skipSeparationSpace(e2, true, -1), u = e2.input.charCodeAt(e2.position), !(e2.lineIndent > 0 || u !== 37)); ) { for (f = true, u = e2.input.charCodeAt(++e2.position), r = e2.position; u !== 0 && !is_WS_OR_EOL(u); ) u = e2.input.charCodeAt(++e2.position); for (o = e2.input.slice(r, e2.position), l = [], o.length < 1 && throwError(e2, "directive name must not be less than one character in length"); u !== 0; ) { for (; is_WHITE_SPACE(u); ) u = e2.input.charCodeAt(++e2.position); if (u === 35) { do u = e2.input.charCodeAt(++e2.position); while (u !== 0 && !is_EOL(u)); break; } if (is_EOL(u)) break; for (r = e2.position; u !== 0 && !is_WS_OR_EOL(u); ) u = e2.input.charCodeAt(++e2.position); l.push(e2.input.slice(r, e2.position)); } u !== 0 && readLineBreak(e2), _hasOwnProperty$1.call(directiveHandlers, o) ? directiveHandlers[o](e2, o, l) : throwWarning(e2, 'unknown document directive "' + o + '"'); } if (skipSeparationSpace(e2, true, -1), e2.lineIndent === 0 && e2.input.charCodeAt(e2.position) === 45 && e2.input.charCodeAt(e2.position + 1) === 45 && e2.input.charCodeAt(e2.position + 2) === 45 ? (e2.position += 3, skipSeparationSpace(e2, true, -1)) : f && throwError(e2, "directives end mark is expected"), composeNode(e2, e2.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true), skipSeparationSpace(e2, true, -1), e2.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(e2.input.slice(n2, e2.position)) && throwWarning(e2, "non-ASCII line breaks are interpreted as content"), e2.documents.push(e2.result), e2.position === e2.lineStart && testDocumentSeparator(e2)) { e2.input.charCodeAt(e2.position) === 46 && (e2.position += 3, skipSeparationSpace(e2, true, -1)); return; } if (e2.position < e2.length - 1) throwError(e2, "end of the stream or a document separator is expected"); else return; } function loadDocuments(e2, n2) { e2 = String(e2), n2 = n2 || {}, e2.length !== 0 && (e2.charCodeAt(e2.length - 1) !== 10 && e2.charCodeAt(e2.length - 1) !== 13 && (e2 += ` `), e2.charCodeAt(0) === 65279 && (e2 = e2.slice(1))); var r = new State$1(e2, n2), o = e2.indexOf("\0"); for (o !== -1 && (r.position = o, throwError(r, "null byte is not allowed in input")), r.input += "\0"; r.input.charCodeAt(r.position) === 32; ) r.lineIndent += 1, r.position += 1; for (; r.position < r.length - 1; ) readDocument(r); return r.documents; } function loadAll$1(e2, n2, r) { n2 !== null && typeof n2 == "object" && typeof r > "u" && (r = n2, n2 = null); var o = loadDocuments(e2, r); if (typeof n2 != "function") return o; for (var l = 0, f = o.length; l < f; l += 1) n2(o[l]); } function load$1(e2, n2) { var r = loadDocuments(e2, n2); if (r.length !== 0) { if (r.length === 1) return r[0]; throw new exception("expected a single document in the stream, but found more"); } } var loadAll_1 = loadAll$1; var load_1 = load$1; var loader = { loadAll: loadAll_1, load: load_1 }; var _toString = Object.prototype.toString; var _hasOwnProperty = Object.prototype.hasOwnProperty; var CHAR_BOM = 65279; var CHAR_TAB = 9; var CHAR_LINE_FEED = 10; var CHAR_CARRIAGE_RETURN = 13; var CHAR_SPACE = 32; var CHAR_EXCLAMATION = 33; var CHAR_DOUBLE_QUOTE = 34; var CHAR_SHARP = 35; var CHAR_PERCENT = 37; var CHAR_AMPERSAND = 38; var CHAR_SINGLE_QUOTE = 39; var CHAR_ASTERISK = 42; var CHAR_COMMA = 44; var CHAR_MINUS = 45; var CHAR_COLON = 58; var CHAR_EQUALS = 61; var CHAR_GREATER_THAN = 62; var CHAR_QUESTION = 63; var CHAR_COMMERCIAL_AT = 64; var CHAR_LEFT_SQUARE_BRACKET = 91; var CHAR_RIGHT_SQUARE_BRACKET = 93; var CHAR_GRAVE_ACCENT = 96; var CHAR_LEFT_CURLY_BRACKET = 123; var CHAR_VERTICAL_LINE = 124; var CHAR_RIGHT_CURLY_BRACKET = 125; var ESCAPE_SEQUENCES = {}; ESCAPE_SEQUENCES[0] = "\\0", ESCAPE_SEQUENCES[7] = "\\a", ESCAPE_SEQUENCES[8] = "\\b", ESCAPE_SEQUENCES[9] = "\\t", ESCAPE_SEQUENCES[10] = "\\n", ESCAPE_SEQUENCES[11] = "\\v", ESCAPE_SEQUENCES[12] = "\\f", ESCAPE_SEQUENCES[13] = "\\r", ESCAPE_SEQUENCES[27] = "\\e", ESCAPE_SEQUENCES[34] = '\\"', ESCAPE_SEQUENCES[92] = "\\\\", ESCAPE_SEQUENCES[133] = "\\N", ESCAPE_SEQUENCES[160] = "\\_", ESCAPE_SEQUENCES[8232] = "\\L", ESCAPE_SEQUENCES[8233] = "\\P"; var DEPRECATED_BOOLEANS_SYNTAX = ["y", "Y", "yes", "Yes", "YES", "on", "On", "ON", "n", "N", "no", "No", "NO", "off", "Off", "OFF"]; var DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/; function compileStyleMap(e2, n2) { var r, o, l, f, u, c, a; if (n2 === null) return {}; for (r = {}, o = Object.keys(n2), l = 0, f = o.length; l < f; l += 1) u = o[l], c = String(n2[u]), u.slice(0, 2) === "!!" && (u = "tag:yaml.org,2002:" + u.slice(2)), a = e2.compiledTypeMap.fallback[u], a && _hasOwnProperty.call(a.styleAliases, c) && (c = a.styleAliases[c]), r[u] = c; return r; } function encodeHex(e2) { var n2, r, o; if (n2 = e2.toString(16).toUpperCase(), e2 <= 255) r = "x", o = 2; else if (e2 <= 65535) r = "u", o = 4; else if (e2 <= 4294967295) r = "U", o = 8; else throw new exception("code point within a string may not be greater than 0xFFFFFFFF"); return "\\" + r + common.repeat("0", o - n2.length) + n2; } var QUOTING_TYPE_SINGLE = 1; var QUOTING_TYPE_DOUBLE = 2; function State(e2) { this.schema = e2.schema || _default, this.indent = Math.max(1, e2.indent || 2), this.noArrayIndent = e2.noArrayIndent || false, this.skipInvalid = e2.skipInvalid || false, this.flowLevel = common.isNothing(e2.flowLevel) ? -1 : e2.flowLevel, this.styleMap = compileStyleMap(this.schema, e2.styles || null), this.sortKeys = e2.sortKeys || false, this.lineWidth = e2.lineWidth || 80, this.noRefs = e2.noRefs || false, this.noCompatMode = e2.noCompatMode || false, this.condenseFlow = e2.condenseFlow || false, this.quotingType = e2.quotingType === '"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE, this.forceQuotes = e2.forceQuotes || false, this.replacer = typeof e2.replacer == "function" ? e2.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null; } function indentString(e2, n2) { for (var r = common.repeat(" ", n2), o = 0, l = -1, f = "", u, c = e2.length; o < c; ) l = e2.indexOf(` `, o), l === -1 ? (u = e2.slice(o), o = c) : (u = e2.slice(o, l + 1), o = l + 1), u.length && u !== ` ` && (f += r), f += u; return f; } function generateNextLine(e2, n2) { return ` ` + common.repeat(" ", e2.indent * n2); } function testImplicitResolving(e2, n2) { var r, o, l; for (r = 0, o = e2.implicitTypes.length; r < o; r += 1) if (l = e2.implicitTypes[r], l.resolve(n2)) return true; return false; } function isWhitespace(e2) { return e2 === CHAR_SPACE || e2 === CHAR_TAB; } function isPrintable(e2) { return 32 <= e2 && e2 <= 126 || 161 <= e2 && e2 <= 55295 && e2 !== 8232 && e2 !== 8233 || 57344 <= e2 && e2 <= 65533 && e2 !== CHAR_BOM || 65536 <= e2 && e2 <= 1114111; } function isNsCharOrWhitespace(e2) { return isPrintable(e2) && e2 !== CHAR_BOM && e2 !== CHAR_CARRIAGE_RETURN && e2 !== CHAR_LINE_FEED; } function isPlainSafe(e2, n2, r) { var o = isNsCharOrWhitespace(e2), l = o && !isWhitespace(e2); return (r ? o : o && e2 !== CHAR_COMMA && e2 !== CHAR_LEFT_SQUARE_BRACKET && e2 !== CHAR_RIGHT_SQUARE_BRACKET && e2 !== CHAR_LEFT_CURLY_BRACKET && e2 !== CHAR_RIGHT_CURLY_BRACKET) && e2 !== CHAR_SHARP && !(n2 === CHAR_COLON && !l) || isNsCharOrWhitespace(n2) && !isWhitespace(n2) && e2 === CHAR_SHARP || n2 === CHAR_COLON && l; } function isPlainSafeFirst(e2) { return isPrintable(e2) && e2 !== CHAR_BOM && !isWhitespace(e2) && e2 !== CHAR_MINUS && e2 !== CHAR_QUESTION && e2 !== CHAR_COLON && e2 !== CHAR_COMMA && e2 !== CHAR_LEFT_SQUARE_BRACKET && e2 !== CHAR_RIGHT_SQUARE_BRACKET && e2 !== CHAR_LEFT_CURLY_BRACKET && e2 !== CHAR_RIGHT_CURLY_BRACKET && e2 !== CHAR_SHARP && e2 !== CHAR_AMPERSAND && e2 !== CHAR_ASTERISK && e2 !== CHAR_EXCLAMATION && e2 !== CHAR_VERTICAL_LINE && e2 !== CHAR_EQUALS && e2 !== CHAR_GREATER_THAN && e2 !== CHAR_SINGLE_QUOTE && e2 !== CHAR_DOUBLE_QUOTE && e2 !== CHAR_PERCENT && e2 !== CHAR_COMMERCIAL_AT && e2 !== CHAR_GRAVE_ACCENT; } function isPlainSafeLast(e2) { return !isWhitespace(e2) && e2 !== CHAR_COLON; } function codePointAt(e2, n2) { var r = e2.charCodeAt(n2), o; return r >= 55296 && r <= 56319 && n2 + 1 < e2.length && (o = e2.charCodeAt(n2 + 1), o >= 56320 && o <= 57343) ? (r - 55296) * 1024 + o - 56320 + 65536 : r; } function needIndentIndicator(e2) { var n2 = /^\n* /; return n2.test(e2); } var STYLE_PLAIN = 1; var STYLE_SINGLE = 2; var STYLE_LITERAL = 3; var STYLE_FOLDED = 4; var STYLE_DOUBLE = 5; function chooseScalarStyle(e2, n2, r, o, l, f, u, c) { var a, p = 0, h2 = null, t = false, d = false, s = o !== -1, x2 = -1, g = isPlainSafeFirst(codePointAt(e2, 0)) && isPlainSafeLast(codePointAt(e2, e2.length - 1)); if (n2 || u) for (a = 0; a < e2.length; p >= 65536 ? a += 2 : a++) { if (p = codePointAt(e2, a), !isPrintable(p)) return STYLE_DOUBLE; g = g && isPlainSafe(p, h2, c), h2 = p; } else { for (a = 0; a < e2.length; p >= 65536 ? a += 2 : a++) { if (p = codePointAt(e2, a), p === CHAR_LINE_FEED) t = true, s && (d = d || a - x2 - 1 > o && e2[x2 + 1] !== " ", x2 = a); else if (!isPrintable(p)) return STYLE_DOUBLE; g = g && isPlainSafe(p, h2, c), h2 = p; } d = d || s && a - x2 - 1 > o && e2[x2 + 1] !== " "; } return !t && !d ? g && !u && !l(e2) ? STYLE_PLAIN : f === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE : r > 9 && needIndentIndicator(e2) ? STYLE_DOUBLE : u ? f === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE : d ? STYLE_FOLDED : STYLE_LITERAL; } function writeScalar(e2, n2, r, o, l) { e2.dump = function() { if (n2.length === 0) return e2.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''"; if (!e2.noCompatMode && (DEPRECATED_BOOLEANS_SYNTAX.indexOf(n2) !== -1 || DEPRECATED_BASE60_SYNTAX.test(n2))) return e2.quotingType === QUOTING_TYPE_DOUBLE ? '"' + n2 + '"' : "'" + n2 + "'"; var f = e2.indent * Math.max(1, r), u = e2.lineWidth === -1 ? -1 : Math.max(Math.min(e2.lineWidth, 40), e2.lineWidth - f), c = o || e2.flowLevel > -1 && r >= e2.flowLevel; function a(p) { return testImplicitResolving(e2, p); } switch (chooseScalarStyle(n2, c, e2.indent, u, a, e2.quotingType, e2.forceQuotes && !o, l)) { case STYLE_PLAIN: return n2; case STYLE_SINGLE: return "'" + n2.replace(/'/g, "''") + "'"; case STYLE_LITERAL: return "|" + blockHeader(n2, e2.indent) + dropEndingNewline(indentString(n2, f)); case STYLE_FOLDED: return ">" + blockHeader(n2, e2.indent) + dropEndingNewline(indentString(foldString(n2, u), f)); case STYLE_DOUBLE: return '"' + escapeString(n2) + '"'; default: throw new exception("impossible error: invalid scalar style"); } }(); } function blockHeader(e2, n2) { var r = needIndentIndicator(e2) ? String(n2) : "", o = e2[e2.length - 1] === ` `, l = o && (e2[e2.length - 2] === ` ` || e2 === ` `), f = l ? "+" : o ? "" : "-"; return r + f + ` `; } function dropEndingNewline(e2) { return e2[e2.length - 1] === ` ` ? e2.slice(0, -1) : e2; } function foldString(e2, n2) { for (var r = /(\n+)([^\n]*)/g, o = function() { var p = e2.indexOf(` `); return p = p !== -1 ? p : e2.length, r.lastIndex = p, foldLine(e2.slice(0, p), n2); }(), l = e2[0] === ` ` || e2[0] === " ", f, u; u = r.exec(e2); ) { var c = u[1], a = u[2]; f = a[0] === " ", o += c + (!l && !f && a !== "" ? ` ` : "") + foldLine(a, n2), l = f; } return o; } function foldLine(e2, n2) { if (e2 === "" || e2[0] === " ") return e2; for (var r = / [^ ]/g, o, l = 0, f, u = 0, c = 0, a = ""; o = r.exec(e2); ) c = o.index, c - l > n2 && (f = u > l ? u : c, a += ` ` + e2.slice(l, f), l = f + 1), u = c; return a += ` `, e2.length - l > n2 && u > l ? a += e2.slice(l, u) + ` ` + e2.slice(u + 1) : a += e2.slice(l), a.slice(1); } function escapeString(e2) { for (var n2 = "", r = 0, o, l = 0; l < e2.length; r >= 65536 ? l += 2 : l++) r = codePointAt(e2, l), o = ESCAPE_SEQUENCES[r], !o && isPrintable(r) ? (n2 += e2[l], r >= 65536 && (n2 += e2[l + 1])) : n2 += o || encodeHex(r); return n2; } function writeFlowSequence(e2, n2, r) { var o = "", l = e2.tag, f, u, c; for (f = 0, u = r.length; f < u; f += 1) c = r[f], e2.replacer && (c = e2.replacer.call(r, String(f), c)), (writeNode(e2, n2, c, false, false) || typeof c > "u" && writeNode(e2, n2, null, false, false)) && (o !== "" && (o += "," + (e2.condenseFlow ? "" : " ")), o += e2.dump); e2.tag = l, e2.dump = "[" + o + "]"; } function writeBlockSequence(e2, n2, r, o) { var l = "", f = e2.tag, u, c, a; for (u = 0, c = r.length; u < c; u += 1) a = r[u], e2.replacer && (a = e2.replacer.call(r, String(u), a)), (writeNode(e2, n2 + 1, a, true, true, false, true) || typeof a > "u" && writeNode(e2, n2 + 1, null, true, true, false, true)) && ((!o || l !== "") && (l += generateNextLine(e2, n2)), e2.dump && CHAR_LINE_FEED === e2.dump.charCodeAt(0) ? l += "-" : l += "- ", l += e2.dump); e2.tag = f, e2.dump = l || "[]"; } function writeFlowMapping(e2, n2, r) { var o = "", l = e2.tag, f = Object.keys(r), u, c, a, p, h2; for (u = 0, c = f.length; u < c; u += 1) h2 = "", o !== "" && (h2 += ", "), e2.condenseFlow && (h2 += '"'), a = f[u], p = r[a], e2.replacer && (p = e2.replacer.call(r, a, p)), writeNode(e2, n2, a, false, false) && (e2.dump.length > 1024 && (h2 += "? "), h2 += e2.dump + (e2.condenseFlow ? '"' : "") + ":" + (e2.condenseFlow ? "" : " "), writeNode(e2, n2, p, false, false) && (h2 += e2.dump, o += h2)); e2.tag = l, e2.dump = "{" + o + "}"; } function writeBlockMapping(e2, n2, r, o) { var l = "", f = e2.tag, u = Object.keys(r), c, a, p, h2, t, d; if (e2.sortKeys === true) u.sort(); else if (typeof e2.sortKeys == "function") u.sort(e2.sortKeys); else if (e2.sortKeys) throw new exception("sortKeys must be a boolean or a function"); for (c = 0, a = u.length; c < a; c += 1) d = "", (!o || l !== "") && (d += generateNextLine(e2, n2)), p = u[c], h2 = r[p], e2.replacer && (h2 = e2.replacer.call(r, p, h2)), writeNode(e2, n2 + 1, p, true, true, true) && (t = e2.tag !== null && e2.tag !== "?" || e2.dump && e2.dump.length > 1024, t && (e2.dump && CHAR_LINE_FEED === e2.dump.charCodeAt(0) ? d += "?" : d += "? "), d += e2.dump, t && (d += generateNextLine(e2, n2)), writeNode(e2, n2 + 1, h2, true, t) && (e2.dump && CHAR_LINE_FEED === e2.dump.charCodeAt(0) ? d += ":" : d += ": ", d += e2.dump, l += d)); e2.tag = f, e2.dump = l || "{}"; } function detectType(e2, n2, r) { var o, l, f, u, c, a; for (l = r ? e2.explicitTypes : e2.implicitTypes, f = 0, u = l.length; f < u; f += 1) if (c = l[f], (c.instanceOf || c.predicate) && (!c.instanceOf || typeof n2 == "object" && n2 instanceof c.instanceOf) && (!c.predicate || c.predicate(n2))) { if (r ? c.multi && c.representName ? e2.tag = c.representName(n2) : e2.tag = c.tag : e2.tag = "?", c.represent) { if (a = e2.styleMap[c.tag] || c.defaultStyle, _toString.call(c.represent) === "[object Function]") o = c.represent(n2, a); else if (_hasOwnProperty.call(c.represent, a)) o = c.represent[a](n2, a); else throw new exception("!<" + c.tag + '> tag resolver accepts not "' + a + '" style'); e2.dump = o; } return true; } return false; } function writeNode(e2, n2, r, o, l, f, u) { e2.tag = null, e2.dump = r, detectType(e2, r, false) || detectType(e2, r, true); var c = _toString.call(e2.dump), a = o, p; o && (o = e2.flowLevel < 0 || e2.flowLevel > n2); var h2 = c === "[object Object]" || c === "[object Array]", t, d; if (h2 && (t = e2.duplicates.indexOf(r), d = t !== -1), (e2.tag !== null && e2.tag !== "?" || d || e2.indent !== 2 && n2 > 0) && (l = false), d && e2.usedDuplicates[t]) e2.dump = "*ref_" + t; else { if (h2 && d && !e2.usedDuplicates[t] && (e2.usedDuplicates[t] = true), c === "[object Object]") o && Object.keys(e2.dump).length !== 0 ? (writeBlockMapping(e2, n2, e2.dump, l), d && (e2.dump = "&ref_" + t + e2.dump)) : (writeFlowMapping(e2, n2, e2.dump), d && (e2.dump = "&ref_" + t + " " + e2.dump)); else if (c === "[object Array]") o && e2.dump.length !== 0 ? (e2.noArrayIndent && !u && n2 > 0 ? writeBlockSequence(e2, n2 - 1, e2.dump, l) : writeBlockSequence(e2, n2, e2.dump, l), d && (e2.dump = "&ref_" + t + e2.dump)) : (writeFlowSequence(e2, n2, e2.dump), d && (e2.dump = "&ref_" + t + " " + e2.dump)); else if (c === "[object String]") e2.tag !== "?" && writeScalar(e2, e2.dump, n2, f, a); else { if (c === "[object Undefined]") return false; if (e2.skipInvalid) return false; throw new exception("unacceptable kind of an object to dump " + c); } e2.tag !== null && e2.tag !== "?" && (p = encodeURI(e2.tag[0] === "!" ? e2.tag.slice(1) : e2.tag).replace(/!/g, "%21"), e2.tag[0] === "!" ? p = "!" + p : p.slice(0, 18) === "tag:yaml.org,2002:" ? p = "!!" + p.slice(18) : p = "!<" + p + ">", e2.dump = p + " " + e2.dump); } return true; } function getDuplicateReferences(e2, n2) { var r = [], o = [], l, f; for (inspectNode(e2, r, o), l = 0, f = o.length; l < f; l += 1) n2.duplicates.push(r[o[l]]); n2.usedDuplicates = new Array(f); } function inspectNode(e2, n2, r) { var o, l, f; if (e2 !== null && typeof e2 == "object") if (l = n2.indexOf(e2), l !== -1) r.indexOf(l) === -1 && r.push(l); else if (n2.push(e2), Array.isArray(e2)) for (l = 0, f = e2.length; l < f; l += 1) inspectNode(e2[l], n2, r); else for (o = Object.keys(e2), l = 0, f = o.length; l < f; l += 1) inspectNode(e2[o[l]], n2, r); } function dump$1(e2, n2) { n2 = n2 || {}; var r = new State(n2); r.noRefs || getDuplicateReferences(e2, r); var o = e2; return r.replacer && (o = r.replacer.call({ "": o }, "", o)), writeNode(r, 0, o, true, true) ? r.dump + ` ` : ""; } var dump_1 = dump$1; var dumper = { dump: dump_1 }; var load = loader.load; var dump = dumper.dump; function parseYAML(e2, n2) { const r = load(e2, n2); return _format.storeFormat(e2, r, n2), r; } function stringifyYAML(e2, n2) { const r = _format.getFormat(e2, { preserveIndentation: false }), o = typeof r.indent == "string" ? r.indent.length : r.indent, l = dump(e2, { indent: o, ...n2 }); return r.whitespace.start + l.trim() + r.whitespace.end; } exports.parseYAML = parseYAML, exports.stringifyYAML = stringifyYAML; } }); // node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/toml.cjs var require_toml = __commonJS({ "node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/toml.cjs"(exports) { "use strict"; var _ = Object.defineProperty; var A = (e2, n2, t) => n2 in e2 ? _(e2, n2, { enumerable: true, configurable: true, writable: true, value: t }) : e2[n2] = t; var b = (e2, n2, t) => (A(e2, typeof n2 != "symbol" ? n2 + "" : n2, t), t); var E = (e2, n2, t) => { if (!n2.has(e2)) throw TypeError("Cannot " + t); }; var c = (e2, n2, t) => (E(e2, n2, "read from private field"), t ? t.call(e2) : n2.get(e2)); var O = (e2, n2, t) => { if (n2.has(e2)) throw TypeError("Cannot add the same private member more than once"); n2 instanceof WeakSet ? n2.add(e2) : n2.set(e2, t); }; var d = (e2, n2, t, i) => (E(e2, n2, "write to private field"), i ? i.call(e2, t) : n2.set(e2, t), t); var h2; var w; var s; var _format = require_confbox_3768c7e9(); function getLineColFromPtr(e2, n2) { let t = e2.slice(0, n2).split(/\r\n|\n|\r/g); return [t.length, t.pop().length + 1]; } function makeCodeBlock(e2, n2, t) { let i = e2.split(/\r\n|\n|\r/g), l = "", r = (Math.log10(n2 + 1) | 0) + 1; for (let f = n2 - 1; f <= n2 + 1; f++) { let o = i[f - 1]; o && (l += f.toString().padEnd(r, " "), l += ": ", l += o, l += ` `, f === n2 && (l += " ".repeat(r + t + 2), l += `^ `)); } return l; } var TomlError = class extends Error { constructor(t, i) { const [l, r] = getLineColFromPtr(i.toml, i.ptr), f = makeCodeBlock(i.toml, l, r); super(`Invalid TOML document: ${t} ${f}`, i); b(this, "line"); b(this, "column"); b(this, "codeblock"); this.line = l, this.column = r, this.codeblock = f; } }; function indexOfNewline(e2, n2 = 0, t = e2.length) { let i = e2.indexOf(` `, n2); return e2[i - 1] === "\r" && i--, i <= t ? i : -1; } function skipComment(e2, n2) { for (let t = n2; t < e2.length; t++) { let i = e2[t]; if (i === ` `) return t; if (i === "\r" && e2[t + 1] === ` `) return t + 1; if (i < " " && i !== " " || i === "") throw new TomlError("control characters are not allowed in comments", { toml: e2, ptr: n2 }); } return e2.length; } function skipVoid(e2, n2, t, i) { let l; for (; (l = e2[n2]) === " " || l === " " || !t && (l === ` ` || l === "\r" && e2[n2 + 1] === ` `); ) n2++; return i || l !== "#" ? n2 : skipVoid(e2, skipComment(e2, n2), t); } function skipUntil(e2, n2, t, i, l = false) { if (!i) return n2 = indexOfNewline(e2, n2), n2 < 0 ? e2.length : n2; for (let r = n2; r < e2.length; r++) { let f = e2[r]; if (f === "#") r = indexOfNewline(e2, r); else { if (f === t) return r + 1; if (f === i) return r; if (l && (f === ` ` || f === "\r" && e2[r + 1] === ` `)) return r; } } throw new TomlError("cannot find end of structure", { toml: e2, ptr: n2 }); } function getStringEnd(e2, n2) { let t = e2[n2], i = t === e2[n2 + 1] && e2[n2 + 1] === e2[n2 + 2] ? e2.slice(n2, n2 + 3) : t; n2 += i.length - 1; do n2 = e2.indexOf(i, ++n2); while (n2 > -1 && t !== "'" && e2[n2 - 1] === "\\" && e2[n2 - 2] !== "\\"); return n2 > -1 && (n2 += i.length, i.length > 1 && (e2[n2] === t && n2++, e2[n2] === t && n2++)), n2; } var DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}:\d{2}(?:\.\d+)?)?(Z|[-+]\d{2}:\d{2})?$/i; var g = class g2 extends Date { constructor(t) { let i = true, l = true, r = "Z"; if (typeof t == "string") { let f = t.match(DATE_TIME_RE); f ? (f[1] || (i = false, t = `0000-01-01T${t}`), l = !!f[2], f[2] && +f[2] > 23 ? t = "" : (r = f[3] || null, t = t.toUpperCase(), !r && l && (t += "Z"))) : t = ""; } super(t); O(this, h2, false); O(this, w, false); O(this, s, null); isNaN(this.getTime()) || (d(this, h2, i), d(this, w, l), d(this, s, r)); } isDateTime() { return c(this, h2) && c(this, w); } isLocal() { return !c(this, h2) || !c(this, w) || !c(this, s); } isDate() { return c(this, h2) && !c(this, w); } isTime() { return c(this, w) && !c(this, h2); } isValid() { return c(this, h2) || c(this, w); } toISOString() { let t = super.toISOString(); if (this.isDate()) return t.slice(0, 10); if (this.isTime()) return t.slice(11, 23); if (c(this, s) === null) return t.slice(0, -1); if (c(this, s) === "Z") return t; let i = +c(this, s).slice(1, 3) * 60 + +c(this, s).slice(4, 6); return i = c(this, s)[0] === "-" ? i : -i, new Date(this.getTime() - i * 6e4).toISOString().slice(0, -1) + c(this, s); } static wrapAsOffsetDateTime(t, i = "Z") { let l = new g2(t); return d(l, s, i), l; } static wrapAsLocalDateTime(t) { let i = new g2(t); return d(i, s, null), i; } static wrapAsLocalDate(t) { let i = new g2(t); return d(i, w, false), d(i, s, null), i; } static wrapAsLocalTime(t) { let i = new g2(t); return d(i, h2, false), d(i, s, null), i; } }; h2 = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new WeakMap(); var TomlDate = g; var INT_REGEX = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/; var FLOAT_REGEX = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/; var LEADING_ZERO = /^[+-]?0[0-9_]/; var ESCAPE_REGEX = /^[0-9a-f]{4,8}$/i; var ESC_MAP = { b: "\b", t: " ", n: ` `, f: "\f", r: "\r", '"': '"', "\\": "\\" }; function parseString(e2, n2 = 0, t = e2.length) { let i = e2[n2] === "'", l = e2[n2++] === e2[n2] && e2[n2] === e2[n2 + 1]; l && (t -= 2, e2[n2 += 2] === "\r" && n2++, e2[n2] === ` ` && n2++); let r = 0, f, o = "", a = n2; for (; n2 < t - 1; ) { let u = e2[n2++]; if (u === ` ` || u === "\r" && e2[n2] === ` `) { if (!l) throw new TomlError("newlines are not allowed in strings", { toml: e2, ptr: n2 - 1 }); } else if (u < " " && u !== " " || u === "") throw new TomlError("control characters are not allowed in strings", { toml: e2, ptr: n2 - 1 }); if (f) { if (f = false, u === "u" || u === "U") { let m = e2.slice(n2, n2 += u === "u" ? 4 : 8); if (!ESCAPE_REGEX.test(m)) throw new TomlError("invalid unicode escape", { toml: e2, ptr: r }); try { o += String.fromCodePoint(parseInt(m, 16)); } catch { throw new TomlError("invalid unicode escape", { toml: e2, ptr: r }); } } else if (l && (u === ` ` || u === " " || u === " " || u === "\r")) { if (n2 = skipVoid(e2, n2 - 1, true), e2[n2] !== ` ` && e2[n2] !== "\r") throw new TomlError("invalid escape: only line-ending whitespace may be escaped", { toml: e2, ptr: r }); n2 = skipVoid(e2, n2); } else if (u in ESC_MAP) o += ESC_MAP[u]; else throw new TomlError("unrecognized escape sequence", { toml: e2, ptr: r }); a = n2; } else !i && u === "\\" && (r = n2 - 1, f = true, o += e2.slice(a, r)); } return o + e2.slice(a, t - 1); } function parseValue(e2, n2, t) { if (e2 === "true") return true; if (e2 === "false") return false; if (e2 === "-inf") return -1 / 0; if (e2 === "inf" || e2 === "+inf") return 1 / 0; if (e2 === "nan" || e2 === "+nan" || e2 === "-nan") return NaN; if (e2 === "-0") return 0; let i; if ((i = INT_REGEX.test(e2)) || FLOAT_REGEX.test(e2)) { if (LEADING_ZERO.test(e2)) throw new TomlError("leading zeroes are not allowed", { toml: n2, ptr: t }); let r = +e2.replace(/_/g, ""); if (isNaN(r)) throw new TomlError("invalid number", { toml: n2, ptr: t }); if (i && !Number.isSafeInteger(r)) throw new TomlError("integer value cannot be represented losslessly", { toml: n2, ptr: t }); return r; } let l = new TomlDate(e2); if (!l.isValid()) throw new TomlError("invalid value", { toml: n2, ptr: t }); return l; } function sliceAndTrimEndOf(e2, n2, t, i) { let l = e2.slice(n2, t), r = l.indexOf("#"); r > -1 && (skipComment(e2, r), l = l.slice(0, r)); let f = l.trimEnd(); if (!i) { let o = l.indexOf(` `, f.length); if (o > -1) throw new TomlError("newlines are not allowed in inline tables", { toml: e2, ptr: n2 + o }); } return [f, r]; } function extractValue(e2, n2, t) { let i = e2[n2]; if (i === "[" || i === "{") { let [f, o] = i === "[" ? parseArray(e2, n2) : parseInlineTable(e2, n2), a = skipUntil(e2, o, ",", t); if (t === "}") { let u = indexOfNewline(e2, o, a); if (u > -1) throw new TomlError("newlines are not allowed in inline tables", { toml: e2, ptr: u }); } return [f, a]; } let l; if (i === '"' || i === "'") { l = getStringEnd(e2, n2); let f = parseString(e2, n2, l); if (t) { if (l = skipVoid(e2, l, t !== "]"), e2[l] && e2[l] !== "," && e2[l] !== t && e2[l] !== ` ` && e2[l] !== "\r") throw new TomlError("unexpected character encountered", { toml: e2, ptr: l }); l += +(e2[l] === ","); } return [f, l]; } l = skipUntil(e2, n2, ",", t); let r = sliceAndTrimEndOf(e2, n2, l - +(e2[l - 1] === ","), t === "]"); if (!r[0]) throw new TomlError("incomplete key-value declaration: no value specified", { toml: e2, ptr: n2 }); return t && r[1] > -1 && (l = skipVoid(e2, n2 + r[1]), l += +(e2[l] === ",")), [parseValue(r[0], e2, n2), l]; } var KEY_PART_RE = /^[a-zA-Z0-9-_]+[ \t]*$/; function parseKey(e2, n2, t = "=") { let i = n2 - 1, l = [], r = e2.indexOf(t, n2); if (r < 0) throw new TomlError("incomplete key-value: cannot find end of key", { toml: e2, ptr: n2 }); do { let f = e2[n2 = ++i]; if (f !== " " && f !== " ") if (f === '"' || f === "'") { if (f === e2[n2 + 1] && f === e2[n2 + 2]) throw new TomlError("multiline strings are not allowed in keys", { toml: e2, ptr: n2 }); let o = getStringEnd(e2, n2); if (o < 0) throw new TomlError("unfinished string encountered", { toml: e2, ptr: n2 }); i = e2.indexOf(".", o); let a = e2.slice(o, i < 0 || i > r ? r : i), u = indexOfNewline(a); if (u > -1) throw new TomlError("newlines are not allowed in keys", { toml: e2, ptr: n2 + i + u }); if (a.trimStart()) throw new TomlError("found extra tokens after the string part", { toml: e2, ptr: o }); if (r < o && (r = e2.indexOf(t, o), r < 0)) throw new TomlError("incomplete key-value: cannot find end of key", { toml: e2, ptr: n2 }); l.push(parseString(e2, n2, o)); } else { i = e2.indexOf(".", n2); let o = e2.slice(n2, i < 0 || i > r ? r : i); if (!KEY_PART_RE.test(o)) throw new TomlError("only letter, numbers, dashes and underscores are allowed in keys", { toml: e2, ptr: n2 }); l.push(o.trimEnd()); } } while (i + 1 && i < r); return [l, skipVoid(e2, r + 1, true, true)]; } function parseInlineTable(e2, n2) { let t = {}, i = /* @__PURE__ */ new Set(), l, r = 0; for (n2++; (l = e2[n2++]) !== "}" && l; ) { if (l === ` `) throw new TomlError("newlines are not allowed in inline tables", { toml: e2, ptr: n2 - 1 }); if (l === "#") throw new TomlError("inline tables cannot contain comments", { toml: e2, ptr: n2 - 1 }); if (l === ",") throw new TomlError("expected key-value, found comma", { toml: e2, ptr: n2 - 1 }); if (l !== " " && l !== " ") { let f, o = t, a = false, [u, m] = parseKey(e2, n2 - 1); for (let y = 0; y < u.length; y++) { if (y && (o = a ? o[f] : o[f] = {}), f = u[y], (a = Object.hasOwn(o, f)) && (typeof o[f] != "object" || i.has(o[f]))) throw new TomlError("trying to redefine an already defined value", { toml: e2, ptr: n2 }); !a && f === "__proto__" && Object.defineProperty(o, f, { enumerable: true, configurable: true, writable: true }); } if (a) throw new TomlError("trying to redefine an already defined value", { toml: e2, ptr: n2 }); let [T, x2] = extractValue(e2, m, "}"); i.add(T), o[f] = T, n2 = x2, r = e2[n2 - 1] === "," ? n2 - 1 : 0; } } if (r) throw new TomlError("trailing commas are not allowed in inline tables", { toml: e2, ptr: r }); if (!l) throw new TomlError("unfinished table encountered", { toml: e2, ptr: n2 }); return [t, n2]; } function parseArray(e2, n2) { let t = [], i; for (n2++; (i = e2[n2++]) !== "]" && i; ) { if (i === ",") throw new TomlError("expected value, found comma", { toml: e2, ptr: n2 - 1 }); if (i === "#") n2 = skipComment(e2, n2); else if (i !== " " && i !== " " && i !== ` ` && i !== "\r") { let l = extractValue(e2, n2 - 1, "]"); t.push(l[0]), n2 = l[1]; } } if (!i) throw new TomlError("unfinished array encountered", { toml: e2, ptr: n2 }); return [t, n2]; } function peekTable(e2, n2, t, i) { let l = n2, r = t, f, o = false, a; for (let u = 0; u < e2.length; u++) { if (u) { if (l = o ? l[f] : l[f] = {}, r = (a = r[f]).c, i === 0 && (a.t === 1 || a.t === 2)) return null; if (a.t === 2) { let m = l.length - 1; l = l[m], r = r[m].c; } } if (f = e2[u], (o = Object.hasOwn(l, f)) && r[f]?.t === 0 && r[f]?.d) return null; o || (f === "__proto__" && (Object.defineProperty(l, f, { enumerable: true, configurable: true, writable: true }), Object.defineProperty(r, f, { enumerable: true, configurable: true, writable: true })), r[f] = { t: u < e2.length - 1 && i === 2 ? 3 : i, d: false, i: 0, c: {} }); } if (a = r[f], a.t !== i && !(i === 1 && a.t === 3) || (i === 2 && (a.d || (a.d = true, l[f] = []), l[f].push(l = {}), a.c[a.i++] = a = { t: 1, d: false, i: 0, c: {} }), a.d)) return null; if (a.d = true, i === 1) l = o ? l[f] : l[f] = {}; else if (i === 0 && o) return null; return [f, l, a.c]; } function parse44(e2) { let n2 = {}, t = {}, i = n2, l = t; for (let r = skipVoid(e2, 0); r < e2.length; ) { if (e2[r] === "[") { let f = e2[++r] === "[", o = parseKey(e2, r += +f, "]"); if (f) { if (e2[o[1] - 1] !== "]") throw new TomlError("expected end of table declaration", { toml: e2, ptr: o[1] - 1 }); o[1]++; } let a = peekTable(o[0], n2, t, f ? 2 : 1); if (!a) throw new TomlError("trying to redefine an already defined table or value", { toml: e2, ptr: r }); l = a[2], i = a[1], r = o[1]; } else { let f = parseKey(e2, r), o = peekTable(f[0], i, l, 0); if (!o) throw new TomlError("trying to redefine an already defined table or value", { toml: e2, ptr: r }); let a = extractValue(e2, f[1]); o[1][o[0]] = a[0], r = a[1]; } if (r = skipVoid(e2, r, true), e2[r] && e2[r] !== ` ` && e2[r] !== "\r") throw new TomlError("each key-value declaration must be followed by an end-of-line", { toml: e2, ptr: r }); r = skipVoid(e2, r); } return n2; } var BARE_KEY = /^[a-z0-9-_]+$/i; function extendedTypeOf(e2) { let n2 = typeof e2; if (n2 === "object") { if (Array.isArray(e2)) return "array"; if (e2 instanceof Date) return "date"; } return n2; } function isArrayOfTables(e2) { for (let n2 = 0; n2 < e2.length; n2++) if (extendedTypeOf(e2[n2]) !== "object") return false; return e2.length != 0; } function formatString(e2) { return JSON.stringify(e2).replace(/\x7f/g, "\\u007f"); } function stringifyValue(e2, n2 = extendedTypeOf(e2)) { if (n2 === "number") return isNaN(e2) ? "nan" : e2 === 1 / 0 ? "inf" : e2 === -1 / 0 ? "-inf" : e2.toString(); if (n2 === "bigint" || n2 === "boolean") return e2.toString(); if (n2 === "string") return formatString(e2); if (n2 === "date") { if (isNaN(e2.getTime())) throw new TypeError("cannot serialize invalid date"); return e2.toISOString(); } if (n2 === "object") return stringifyInlineTable(e2); if (n2 === "array") return stringifyArray(e2); } function stringifyInlineTable(e2) { let n2 = Object.keys(e2); if (n2.length === 0) return "{}"; let t = "{ "; for (let i = 0; i < n2.length; i++) { let l = n2[i]; i && (t += ", "), t += BARE_KEY.test(l) ? l : formatString(l), t += " = ", t += stringifyValue(e2[l]); } return t + " }"; } function stringifyArray(e2) { if (e2.length === 0) return "[]"; let n2 = "[ "; for (let t = 0; t < e2.length; t++) { if (t && (n2 += ", "), e2[t] === null || e2[t] === void 0) throw new TypeError("arrays cannot contain null or undefined values"); n2 += stringifyValue(e2[t]); } return n2 + " ]"; } function stringifyArrayTable(e2, n2) { let t = ""; for (let i = 0; i < e2.length; i++) t += `[[${n2}]] `, t += stringifyTable(e2[i], n2), t += ` `; return t; } function stringifyTable(e2, n2 = "") { let t = "", i = "", l = Object.keys(e2); for (let r = 0; r < l.length; r++) { let f = l[r]; if (e2[f] !== null && e2[f] !== void 0) { let o = extendedTypeOf(e2[f]); if (o === "symbol" || o === "function") throw new TypeError(`cannot serialize values of type '${o}'`); let a = BARE_KEY.test(f) ? f : formatString(f); if (o === "array" && isArrayOfTables(e2[f])) i += stringifyArrayTable(e2[f], n2 ? `${n2}.${a}` : a); else if (o === "object") { let u = n2 ? `${n2}.${a}` : a; i += `[${u}] `, i += stringifyTable(e2[f], u), i += ` `; } else t += a, t += " = ", t += stringifyValue(e2[f], o), t += ` `; } } return `${t} ${i}`.trim(); } function stringify(e2) { if (extendedTypeOf(e2) !== "object") throw new TypeError("stringify can only be called with an object"); return stringifyTable(e2); } function parseTOML(e2) { const n2 = parse44(e2); return _format.storeFormat(e2, n2, { preserveIndentation: false }), n2; } function stringifyTOML(e2) { const n2 = _format.getFormat(e2, { preserveIndentation: false }), t = stringify(e2); return n2.whitespace.start + t + n2.whitespace.end; } exports.parseTOML = parseTOML, exports.stringifyTOML = stringifyTOML; } }); // node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/index.cjs var require_dist3 = __commonJS({ "node_modules/.pnpm/confbox@0.1.8/node_modules/confbox/dist/index.cjs"(exports) { "use strict"; var json5 = require_json5(); var jsonc = require_confbox_6b479c78(); var yaml = require_yaml(); var toml = require_toml(); require_confbox_3768c7e9(), exports.parseJSON5 = json5.parseJSON5, exports.stringifyJSON5 = json5.stringifyJSON5, exports.parseJSON = jsonc.parseJSON, exports.parseJSONC = jsonc.parseJSONC, exports.stringifyJSON = jsonc.stringifyJSON, exports.stringifyJSONC = jsonc.stringifyJSONC, exports.parseYAML = yaml.parseYAML, exports.stringifyYAML = yaml.stringifyYAML, exports.parseTOML = toml.parseTOML, exports.stringifyTOML = toml.stringifyTOML; } }); // node_modules/.pnpm/pkg-types@1.2.1/node_modules/pkg-types/dist/index.cjs var require_dist4 = __commonJS({ "node_modules/.pnpm/pkg-types@1.2.1/node_modules/pkg-types/dist/index.cjs"(exports) { "use strict"; var node_fs = require_node_fs(); var pathe = require_dist2(); var mlly = require_dist5(); var confbox = require_dist3(); var defaultFindOptions = { startingFrom: ".", rootPattern: /^node_modules$/, reverse: false, test: (filePath) => { try { if (node_fs.statSync(filePath).isFile()) { return true; } } catch { } } }; async function findFile(filename, _options = {}) { const filenames = Array.isArray(filename) ? filename : [filename]; const options = { ...defaultFindOptions, ..._options }; const basePath = pathe.resolve(options.startingFrom); const leadingSlash = basePath[0] === "/"; const segments = basePath.split("/").filter(Boolean); if (leadingSlash) { segments[0] = "/" + segments[0]; } let root = segments.findIndex((r) => r.match(options.rootPattern)); if (root === -1) { root = 0; } if (options.reverse) { for (let index = root + 1; index <= segments.length; index++) { for (const filename2 of filenames) { const filePath = pathe.join(...segments.slice(0, index), filename2); if (await options.test(filePath)) { return filePath; } } } } else { for (let index = segments.length; index > root; index--) { for (const filename2 of filenames) { const filePath = pathe.join(...segments.slice(0, index), filename2); if (await options.test(filePath)) { return filePath; } } } } throw new Error( `Cannot find matching ${filename} in ${options.startingFrom} or parent directories` ); } function findNearestFile(filename, _options = {}) { return findFile(filename, _options); } function findFarthestFile(filename, _options = {}) { return findFile(filename, { ..._options, reverse: true }); } function definePackageJSON(package_) { return package_; } function defineTSConfig(tsconfig) { return tsconfig; } var FileCache = /* @__PURE__ */ new Map(); async function readPackageJSON(id, options = {}) { const resolvedPath = await resolvePackageJSON(id, options); const cache = options.cache && typeof options.cache !== "boolean" ? options.cache : FileCache; if (options.cache && cache.has(resolvedPath)) { return cache.get(resolvedPath); } const blob = await node_fs.promises.readFile(resolvedPath, "utf8"); let parsed; try { parsed = confbox.parseJSON(blob); } catch { parsed = confbox.parseJSONC(blob); } cache.set(resolvedPath, parsed); return parsed; } async function writePackageJSON(path, package_) { await node_fs.promises.writeFile(path, confbox.stringifyJSON(package_)); } async function readTSConfig(id, options = {}) { const resolvedPath = await resolveTSConfig(id, options); const cache = options.cache && typeof options.cache !== "boolean" ? options.cache : FileCache; if (options.cache && cache.has(resolvedPath)) { return cache.get(resolvedPath); } const text = await node_fs.promises.readFile(resolvedPath, "utf8"); const parsed = confbox.parseJSONC(text); cache.set(resolvedPath, parsed); return parsed; } async function writeTSConfig(path, tsconfig) { await node_fs.promises.writeFile(path, confbox.stringifyJSONC(tsconfig)); } async function resolvePackageJSON(id = process.cwd(), options = {}) { const resolvedPath = pathe.isAbsolute(id) ? id : await mlly.resolvePath(id, options); return findNearestFile("package.json", { startingFrom: resolvedPath, ...options }); } async function resolveTSConfig(id = process.cwd(), options = {}) { const resolvedPath = pathe.isAbsolute(id) ? id : await mlly.resolvePath(id, options); return findNearestFile("tsconfig.json", { startingFrom: resolvedPath, ...options }); } var lockFiles = [ "yarn.lock", "package-lock.json", "pnpm-lock.yaml", "npm-shrinkwrap.json", "bun.lockb" ]; async function resolveLockfile(id = process.cwd(), options = {}) { const resolvedPath = pathe.isAbsolute(id) ? id : await mlly.resolvePath(id, options); const _options = { startingFrom: resolvedPath, ...options }; try { return await findNearestFile(lockFiles, _options); } catch { } throw new Error("No lockfile found from " + id); } async function findWorkspaceDir(id = process.cwd(), options = {}) { const resolvedPath = pathe.isAbsolute(id) ? id : await mlly.resolvePath(id, options); const _options = { startingFrom: resolvedPath, ...options }; try { const r = await findNearestFile(".git/config", _options); return pathe.resolve(r, "../.."); } catch { } try { const r = await resolveLockfile(resolvedPath, { ..._options, reverse: true }); return pathe.dirname(r); } catch { } try { const r = await findFile(resolvedPath, _options); return pathe.dirname(r); } catch { } throw new Error("Cannot detect workspace root from " + id); } exports.definePackageJSON = definePackageJSON; exports.defineTSConfig = defineTSConfig; exports.findFarthestFile = findFarthestFile; exports.findFile = findFile; exports.findNearestFile = findNearestFile; exports.findWorkspaceDir = findWorkspaceDir; exports.readPackageJSON = readPackageJSON; exports.readTSConfig = readTSConfig; exports.resolveLockfile = resolveLockfile; exports.resolvePackageJSON = resolvePackageJSON; exports.resolveTSConfig = resolveTSConfig; exports.writePackageJSON = writePackageJSON; exports.writeTSConfig = writeTSConfig; } }); // node_modules/.pnpm/mlly@1.7.3/node_modules/mlly/dist/index.cjs var require_dist5 = __commonJS({ "node_modules/.pnpm/mlly@1.7.3/node_modules/mlly/dist/index.cjs"(exports) { "use strict"; var acorn = require_acorn(); var node_module = require_node_module(); var fs = require_node_fs(); var ufo = require_dist(); var pathe = require_dist2(); var pkgTypes = require_dist4(); var node_url = require_node_url(); var assert = require_node_assert(); var process$1 = require_node_process(); var path = require_node_path(); var v8 = require_node_v8(); var node_util = require_node_util(); function _interopDefaultCompat(e2) { return e2 && typeof e2 === "object" && "default" in e2 ? e2.default : e2; } var fs__default = _interopDefaultCompat(fs); var assert__default = _interopDefaultCompat(assert); var process__default = _interopDefaultCompat(process$1); var path__default = _interopDefaultCompat(path); var v8__default = _interopDefaultCompat(v8); var BUILTIN_MODULES = new Set(node_module.builtinModules); function normalizeSlash(path2) { return path2.replace(/\\/g, "/"); } function isObject3(value) { return value !== null && typeof value === "object"; } function matchAll(regex, string, addition) { const matches = []; for (const match of string.matchAll(regex)) { matches.push({ ...addition, ...match.groups, code: match[0], start: match.index, end: (match.index || 0) + match[0].length }); } return matches; } function clearImports(imports) { return (imports || "").replace(/(\/\/[^\n]*\n|\/\*.*\*\/)/g, "").replace(/\s+/g, " "); } function getImportNames(cleanedImports) { const topLevelImports = cleanedImports.replace(/{([^}]*)}/, ""); const namespacedImport = topLevelImports.match(/\* as \s*(\S*)/)?.[1]; const defaultImport = topLevelImports.split(",").find((index) => !/[*{}]/.test(index))?.trim() || void 0; return { namespacedImport, defaultImport }; } var own$1 = {}.hasOwnProperty; var classRegExp = /^([A-Z][a-z\d]*)+$/; var kTypes = /* @__PURE__ */ new Set([ "string", "function", "number", "object", // Accept 'Function' and 'Object' as alternative to the lower cased version. "Function", "Object", "boolean", "bigint", "symbol" ]); var codes = {}; function formatList(array, type = "and") { return array.length < 3 ? array.join(` ${type} `) : `${array.slice(0, -1).join(", ")}, ${type} ${array[array.length - 1]}`; } var messages = /* @__PURE__ */ new Map(); var nodeInternalPrefix = "__node_internal_"; var userStackTraceLimit; codes.ERR_INVALID_ARG_TYPE = createError( "ERR_INVALID_ARG_TYPE", /** * @param {string} name * @param {Array | string} expected * @param {unknown} actual */ (name42, expected, actual) => { assert__default(typeof name42 === "string", "'name' must be a string"); if (!Array.isArray(expected)) { expected = [expected]; } let message = "The "; if (name42.endsWith(" argument")) { message += `${name42} `; } else { const type = name42.includes(".") ? "property" : "argument"; message += `"${name42}" ${type} `; } message += "must be "; const types = []; const instances = []; const other = []; for (const value of expected) { assert__default( typeof value === "string", "All expected entries have to be of type string" ); if (kTypes.has(value)) { types.push(value.toLowerCase()); } else if (classRegExp.exec(value) === null) { assert__default( value !== "object", 'The value "object" should be written as "Object"' ); other.push(value); } else { instances.push(value); } } if (instances.length > 0) { const pos = types.indexOf("object"); if (pos !== -1) { types.slice(pos, 1); instances.push("Object"); } } if (types.length > 0) { message += `${types.length > 1 ? "one of type" : "of type"} ${formatList( types, "or" )}`; if (instances.length > 0 || other.length > 0) message += " or "; } if (instances.length > 0) { message += `an instance of ${formatList(instances, "or")}`; if (other.length > 0) message += " or "; } if (other.length > 0) { if (other.length > 1) { message += `one of ${formatList(other, "or")}`; } else { if (other[0].toLowerCase() !== other[0]) message += "an "; message += `${other[0]}`; } } message += `. Received ${determineSpecificType(actual)}`; return message; }, TypeError ); codes.ERR_INVALID_MODULE_SPECIFIER = createError( "ERR_INVALID_MODULE_SPECIFIER", /** * @param {string} request * @param {string} reason * @param {string} [base] */ (request, reason, base = void 0) => { return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`; }, TypeError ); codes.ERR_INVALID_PACKAGE_CONFIG = createError( "ERR_INVALID_PACKAGE_CONFIG", /** * @param {string} path * @param {string} [base] * @param {string} [message] */ (path2, base, message) => { return `Invalid package config ${path2}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`; }, Error ); codes.ERR_INVALID_PACKAGE_TARGET = createError( "ERR_INVALID_PACKAGE_TARGET", /** * @param {string} packagePath * @param {string} key * @param {unknown} target * @param {boolean} [isImport=false] * @param {string} [base] */ (packagePath, key, target, isImport = false, base = void 0) => { const relatedError = typeof target === "string" && !isImport && target.length > 0 && !target.startsWith("./"); if (key === ".") { assert__default(isImport === false); return `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? '; targets must start with "./"' : ""}`; } return `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify( target )} defined for '${key}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? '; targets must start with "./"' : ""}`; }, Error ); codes.ERR_MODULE_NOT_FOUND = createError( "ERR_MODULE_NOT_FOUND", /** * @param {string} path * @param {string} base * @param {boolean} [exactUrl] */ (path2, base, exactUrl = false) => { return `Cannot find ${exactUrl ? "module" : "package"} '${path2}' imported from ${base}`; }, Error ); codes.ERR_NETWORK_IMPORT_DISALLOWED = createError( "ERR_NETWORK_IMPORT_DISALLOWED", "import of '%s' by %s is not supported: %s", Error ); codes.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError( "ERR_PACKAGE_IMPORT_NOT_DEFINED", /** * @param {string} specifier * @param {string} packagePath * @param {string} base */ (specifier, packagePath, base) => { return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath}package.json` : ""} imported from ${base}`; }, TypeError ); codes.ERR_PACKAGE_PATH_NOT_EXPORTED = createError( "ERR_PACKAGE_PATH_NOT_EXPORTED", /** * @param {string} packagePath * @param {string} subpath * @param {string} [base] */ (packagePath, subpath, base = void 0) => { if (subpath === ".") return `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`; return `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`; }, Error ); codes.ERR_UNSUPPORTED_DIR_IMPORT = createError( "ERR_UNSUPPORTED_DIR_IMPORT", "Directory import '%s' is not supported resolving ES modules imported from %s", Error ); codes.ERR_UNSUPPORTED_RESOLVE_REQUEST = createError( "ERR_UNSUPPORTED_RESOLVE_REQUEST", 'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.', TypeError ); codes.ERR_UNKNOWN_FILE_EXTENSION = createError( "ERR_UNKNOWN_FILE_EXTENSION", /** * @param {string} extension * @param {string} path */ (extension, path2) => { return `Unknown file extension "${extension}" for ${path2}`; }, TypeError ); codes.ERR_INVALID_ARG_VALUE = createError( "ERR_INVALID_ARG_VALUE", /** * @param {string} name * @param {unknown} value * @param {string} [reason='is invalid'] */ (name42, value, reason = "is invalid") => { let inspected = node_util.inspect(value); if (inspected.length > 128) { inspected = `${inspected.slice(0, 128)}...`; } const type = name42.includes(".") ? "property" : "argument"; return `The ${type} '${name42}' ${reason}. Received ${inspected}`; }, TypeError // Note: extra classes have been shaken out. // , RangeError ); function createError(sym, value, constructor) { messages.set(sym, value); return makeNodeErrorWithCode(constructor, sym); } function makeNodeErrorWithCode(Base, key) { return NodeError; function NodeError(...parameters) { const limit = Error.stackTraceLimit; if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0; const error = new Base(); if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = limit; const message = getMessage(key, parameters, error); Object.defineProperties(error, { // Note: no need to implement `kIsNodeError` symbol, would be hard, // probably. message: { value: message, enumerable: false, writable: true, configurable: true }, toString: { /** @this {Error} */ value() { return `${this.name} [${key}]: ${this.message}`; }, enumerable: false, writable: true, configurable: true } }); captureLargerStackTrace(error); error.code = key; return error; } } function isErrorStackTraceLimitWritable() { try { if (v8__default.startupSnapshot.isBuildingSnapshot()) { return false; } } catch { } const desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit"); if (desc === void 0) { return Object.isExtensible(Error); } return own$1.call(desc, "writable") && desc.writable !== void 0 ? desc.writable : desc.set !== void 0; } function hideStackFrames(wrappedFunction) { const hidden = nodeInternalPrefix + wrappedFunction.name; Object.defineProperty(wrappedFunction, "name", { value: hidden }); return wrappedFunction; } var captureLargerStackTrace = hideStackFrames( /** * @param {Error} error * @returns {Error} */ // @ts-expect-error: fine function(error) { const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable(); if (stackTraceLimitIsWritable) { userStackTraceLimit = Error.stackTraceLimit; Error.stackTraceLimit = Number.POSITIVE_INFINITY; } Error.captureStackTrace(error); if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit; return error; } ); function getMessage(key, parameters, self2) { const message = messages.get(key); assert__default(message !== void 0, "expected `message` to be found"); if (typeof message === "function") { assert__default( message.length <= parameters.length, // Default options do not count. `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).` ); return Reflect.apply(message, self2, parameters); } const regex = /%[dfijoOs]/g; let expectedLength = 0; while (regex.exec(message) !== null) expectedLength++; assert__default( expectedLength === parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).` ); if (parameters.length === 0) return message; parameters.unshift(message); return Reflect.apply(node_util.format, null, parameters); } function determineSpecificType(value) { if (value === null || value === void 0) { return String(value); } if (typeof value === "function" && value.name) { return `function ${value.name}`; } if (typeof value === "object") { if (value.constructor && value.constructor.name) { return `an instance of ${value.constructor.name}`; } return `${node_util.inspect(value, { depth: -1 })}`; } let inspected = node_util.inspect(value, { colors: false }); if (inspected.length > 28) { inspected = `${inspected.slice(0, 25)}...`; } return `type ${typeof value} (${inspected})`; } var hasOwnProperty$1 = {}.hasOwnProperty; var { ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG$1 } = codes; var cache = /* @__PURE__ */ new Map(); function read(jsonPath, { base, specifier }) { const existing = cache.get(jsonPath); if (existing) { return existing; } let string; try { string = fs__default.readFileSync(path__default.toNamespacedPath(jsonPath), "utf8"); } catch (error) { const exception = ( /** @type {ErrnoException} */ error ); if (exception.code !== "ENOENT") { throw exception; } } const result = { exists: false, pjsonPath: jsonPath, main: void 0, name: void 0, type: "none", // Ignore unknown types for forwards compatibility exports: void 0, imports: void 0 }; if (string !== void 0) { let parsed; try { parsed = JSON.parse(string); } catch (error_) { const cause = ( /** @type {ErrnoException} */ error_ ); const error = new ERR_INVALID_PACKAGE_CONFIG$1( jsonPath, (base ? `"${specifier}" from ` : "") + node_url.fileURLToPath(base || specifier), cause.message ); error.cause = cause; throw error; } result.exists = true; if (hasOwnProperty$1.call(parsed, "name") && typeof parsed.name === "string") { result.name = parsed.name; } if (hasOwnProperty$1.call(parsed, "main") && typeof parsed.main === "string") { result.main = parsed.main; } if (hasOwnProperty$1.call(parsed, "exports")) { result.exports = parsed.exports; } if (hasOwnProperty$1.call(parsed, "imports")) { result.imports = parsed.imports; } if (hasOwnProperty$1.call(parsed, "type") && (parsed.type === "commonjs" || parsed.type === "module")) { result.type = parsed.type; } } cache.set(jsonPath, result); return result; } function getPackageScopeConfig(resolved) { let packageJSONUrl = new URL("package.json", resolved); while (true) { const packageJSONPath2 = packageJSONUrl.pathname; if (packageJSONPath2.endsWith("node_modules/package.json")) { break; } const packageConfig = read(node_url.fileURLToPath(packageJSONUrl), { specifier: resolved }); if (packageConfig.exists) { return packageConfig; } const lastPackageJSONUrl = packageJSONUrl; packageJSONUrl = new URL("../package.json", packageJSONUrl); if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) { break; } } const packageJSONPath = node_url.fileURLToPath(packageJSONUrl); return { pjsonPath: packageJSONPath, exists: false, type: "none" }; } function getPackageType(url) { return getPackageScopeConfig(url).type; } var { ERR_UNKNOWN_FILE_EXTENSION } = codes; var hasOwnProperty5 = {}.hasOwnProperty; var extensionFormatMap = { // @ts-expect-error: hush. __proto__: null, ".cjs": "commonjs", ".js": "module", ".json": "json", ".mjs": "module" }; function mimeToFormat(mime) { if (mime && /\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(mime)) return "module"; if (mime === "application/json") return "json"; return null; } var protocolHandlers = { // @ts-expect-error: hush. __proto__: null, "data:": getDataProtocolModuleFormat, "file:": getFileProtocolModuleFormat, "http:": getHttpProtocolModuleFormat, "https:": getHttpProtocolModuleFormat, "node:"() { return "builtin"; } }; function getDataProtocolModuleFormat(parsed) { const { 1: mime } = /^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec( parsed.pathname ) || [null, null, null]; return mimeToFormat(mime); } function extname(url) { const pathname = url.pathname; let index = pathname.length; while (index--) { const code2 = pathname.codePointAt(index); if (code2 === 47) { return ""; } if (code2 === 46) { return pathname.codePointAt(index - 1) === 47 ? "" : pathname.slice(index); } } return ""; } function getFileProtocolModuleFormat(url, _context, ignoreErrors) { const value = extname(url); if (value === ".js") { const packageType = getPackageType(url); if (packageType !== "none") { return packageType; } return "commonjs"; } if (value === "") { const packageType = getPackageType(url); if (packageType === "none" || packageType === "commonjs") { return "commonjs"; } return "module"; } const format = extensionFormatMap[value]; if (format) return format; if (ignoreErrors) { return void 0; } const filepath = node_url.fileURLToPath(url); throw new ERR_UNKNOWN_FILE_EXTENSION(value, filepath); } function getHttpProtocolModuleFormat() { } function defaultGetFormatWithoutErrors(url, context) { const protocol = url.protocol; if (!hasOwnProperty5.call(protocolHandlers, protocol)) { return null; } return protocolHandlers[protocol](url, context, true) || null; } var RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace]; var { ERR_NETWORK_IMPORT_DISALLOWED, ERR_INVALID_MODULE_SPECIFIER, ERR_INVALID_PACKAGE_CONFIG, ERR_INVALID_PACKAGE_TARGET, ERR_MODULE_NOT_FOUND, ERR_PACKAGE_IMPORT_NOT_DEFINED, ERR_PACKAGE_PATH_NOT_EXPORTED, ERR_UNSUPPORTED_DIR_IMPORT, ERR_UNSUPPORTED_RESOLVE_REQUEST } = codes; var own = {}.hasOwnProperty; var invalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i; var deprecatedInvalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i; var invalidPackageNameRegEx = /^\.|%|\\/; var patternRegEx = /\*/g; var encodedSeparatorRegEx = /%2f|%5c/i; var emittedPackageWarnings = /* @__PURE__ */ new Set(); var doubleSlashRegEx = /[/\\]{2}/; function emitInvalidSegmentDeprecation(target, request, match, packageJsonUrl, internal, base, isTarget) { if (process__default.noDeprecation) { return; } const pjsonPath = node_url.fileURLToPath(packageJsonUrl); const double = doubleSlashRegEx.exec(isTarget ? target : request) !== null; process__default.emitWarning( `Use of deprecated ${double ? "double slash" : "leading or trailing slash matching"} resolving "${target}" for module request "${request}" ${request === match ? "" : `matched to "${match}" `}in the "${internal ? "imports" : "exports"}" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${node_url.fileURLToPath(base)}` : ""}.`, "DeprecationWarning", "DEP0166" ); } function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) { if (process__default.noDeprecation) { return; } const format = defaultGetFormatWithoutErrors(url, { parentURL: base.href }); if (format !== "module") return; const urlPath = node_url.fileURLToPath(url.href); const packagePath = node_url.fileURLToPath(new node_url.URL(".", packageJsonUrl)); const basePath = node_url.fileURLToPath(base); if (!main) { process__default.emitWarning( `No "main" or "exports" field defined in the package.json for ${packagePath} resolving the main entry point "${urlPath.slice( packagePath.length )}", imported from ${basePath}. Default "index" lookups for the main are deprecated for ES modules.`, "DeprecationWarning", "DEP0151" ); } else if (path__default.resolve(packagePath, main) !== urlPath) { process__default.emitWarning( `Package ${packagePath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice( packagePath.length )}", imported from ${basePath}. Automatic extension resolution of the "main" field is deprecated for ES modules.`, "DeprecationWarning", "DEP0151" ); } } function tryStatSync(path2) { try { return fs.statSync(path2); } catch { } } function fileExists(url) { const stats = fs.statSync(url, { throwIfNoEntry: false }); const isFile = stats ? stats.isFile() : void 0; return isFile === null || isFile === void 0 ? false : isFile; } function legacyMainResolve(packageJsonUrl, packageConfig, base) { let guess; if (packageConfig.main !== void 0) { guess = new node_url.URL(packageConfig.main, packageJsonUrl); if (fileExists(guess)) return guess; const tries2 = [ `./${packageConfig.main}.js`, `./${packageConfig.main}.json`, `./${packageConfig.main}.node`, `./${packageConfig.main}/index.js`, `./${packageConfig.main}/index.json`, `./${packageConfig.main}/index.node` ]; let i2 = -1; while (++i2 < tries2.length) { guess = new node_url.URL(tries2[i2], packageJsonUrl); if (fileExists(guess)) break; guess = void 0; } if (guess) { emitLegacyIndexDeprecation( guess, packageJsonUrl, base, packageConfig.main ); return guess; } } const tries = ["./index.js", "./index.json", "./index.node"]; let i = -1; while (++i < tries.length) { guess = new node_url.URL(tries[i], packageJsonUrl); if (fileExists(guess)) break; guess = void 0; } if (guess) { emitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main); return guess; } throw new ERR_MODULE_NOT_FOUND( node_url.fileURLToPath(new node_url.URL(".", packageJsonUrl)), node_url.fileURLToPath(base) ); } function finalizeResolution(resolved, base, preserveSymlinks) { if (encodedSeparatorRegEx.exec(resolved.pathname) !== null) { throw new ERR_INVALID_MODULE_SPECIFIER( resolved.pathname, 'must not include encoded "/" or "\\" characters', node_url.fileURLToPath(base) ); } let filePath; try { filePath = node_url.fileURLToPath(resolved); } catch (error) { const cause = ( /** @type {ErrnoException} */ error ); Object.defineProperty(cause, "input", { value: String(resolved) }); Object.defineProperty(cause, "module", { value: String(base) }); throw cause; } const stats = tryStatSync( filePath.endsWith("/") ? filePath.slice(-1) : filePath ); if (stats && stats.isDirectory()) { const error = new ERR_UNSUPPORTED_DIR_IMPORT(filePath, node_url.fileURLToPath(base)); error.url = String(resolved); throw error; } if (!stats || !stats.isFile()) { const error = new ERR_MODULE_NOT_FOUND( filePath || resolved.pathname, base && node_url.fileURLToPath(base), true ); error.url = String(resolved); throw error; } if (!preserveSymlinks) { const real = fs.realpathSync(filePath); const { search, hash: hash2 } = resolved; resolved = node_url.pathToFileURL(real + (filePath.endsWith(path__default.sep) ? "/" : "")); resolved.search = search; resolved.hash = hash2; } return resolved; } function importNotDefined(specifier, packageJsonUrl, base) { return new ERR_PACKAGE_IMPORT_NOT_DEFINED( specifier, packageJsonUrl && node_url.fileURLToPath(new node_url.URL(".", packageJsonUrl)), node_url.fileURLToPath(base) ); } function exportsNotFound(subpath, packageJsonUrl, base) { return new ERR_PACKAGE_PATH_NOT_EXPORTED( node_url.fileURLToPath(new node_url.URL(".", packageJsonUrl)), subpath, base && node_url.fileURLToPath(base) ); } function throwInvalidSubpath(request, match, packageJsonUrl, internal, base) { const reason = `request is not a valid match in pattern "${match}" for the "${internal ? "imports" : "exports"}" resolution of ${node_url.fileURLToPath(packageJsonUrl)}`; throw new ERR_INVALID_MODULE_SPECIFIER( request, reason, base && node_url.fileURLToPath(base) ); } function invalidPackageTarget(subpath, target, packageJsonUrl, internal, base) { target = typeof target === "object" && target !== null ? JSON.stringify(target, null, "") : `${target}`; return new ERR_INVALID_PACKAGE_TARGET( node_url.fileURLToPath(new node_url.URL(".", packageJsonUrl)), subpath, target, internal, base && node_url.fileURLToPath(base) ); } function resolvePackageTargetString(target, subpath, match, packageJsonUrl, base, pattern, internal, isPathMap, conditions) { if (subpath !== "" && !pattern && target[target.length - 1] !== "/") throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); if (!target.startsWith("./")) { if (internal && !target.startsWith("../") && !target.startsWith("/")) { let isURL = false; try { new node_url.URL(target); isURL = true; } catch { } if (!isURL) { const exportTarget = pattern ? RegExpPrototypeSymbolReplace.call( patternRegEx, target, () => subpath ) : target + subpath; return packageResolve(exportTarget, packageJsonUrl, conditions); } } throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); } if (invalidSegmentRegEx.exec(target.slice(2)) !== null) { if (deprecatedInvalidSegmentRegEx.exec(target.slice(2)) === null) { if (!isPathMap) { const request = pattern ? match.replace("*", () => subpath) : match + subpath; const resolvedTarget = pattern ? RegExpPrototypeSymbolReplace.call( patternRegEx, target, () => subpath ) : target; emitInvalidSegmentDeprecation( resolvedTarget, request, match, packageJsonUrl, internal, base, true ); } } else { throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); } } const resolved = new node_url.URL(target, packageJsonUrl); const resolvedPath = resolved.pathname; const packagePath = new node_url.URL(".", packageJsonUrl).pathname; if (!resolvedPath.startsWith(packagePath)) throw invalidPackageTarget(match, target, packageJsonUrl, internal, base); if (subpath === "") return resolved; if (invalidSegmentRegEx.exec(subpath) !== null) { const request = pattern ? match.replace("*", () => subpath) : match + subpath; if (deprecatedInvalidSegmentRegEx.exec(subpath) === null) { if (!isPathMap) { const resolvedTarget = pattern ? RegExpPrototypeSymbolReplace.call( patternRegEx, target, () => subpath ) : target; emitInvalidSegmentDeprecation( resolvedTarget, request, match, packageJsonUrl, internal, base, false ); } } else { throwInvalidSubpath(request, match, packageJsonUrl, internal, base); } } if (pattern) { return new node_url.URL( RegExpPrototypeSymbolReplace.call( patternRegEx, resolved.href, () => subpath ) ); } return new node_url.URL(subpath, resolved); } function isArrayIndex(key) { const keyNumber = Number(key); if (`${keyNumber}` !== key) return false; return keyNumber >= 0 && keyNumber < 4294967295; } function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions) { if (typeof target === "string") { return resolvePackageTargetString( target, subpath, packageSubpath, packageJsonUrl, base, pattern, internal, isPathMap, conditions ); } if (Array.isArray(target)) { const targetList = target; if (targetList.length === 0) return null; let lastException; let i = -1; while (++i < targetList.length) { const targetItem = targetList[i]; let resolveResult; try { resolveResult = resolvePackageTarget( packageJsonUrl, targetItem, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions ); } catch (error) { const exception = ( /** @type {ErrnoException} */ error ); lastException = exception; if (exception.code === "ERR_INVALID_PACKAGE_TARGET") continue; throw error; } if (resolveResult === void 0) continue; if (resolveResult === null) { lastException = null; continue; } return resolveResult; } if (lastException === void 0 || lastException === null) { return null; } throw lastException; } if (typeof target === "object" && target !== null) { const keys = Object.getOwnPropertyNames(target); let i = -1; while (++i < keys.length) { const key = keys[i]; if (isArrayIndex(key)) { throw new ERR_INVALID_PACKAGE_CONFIG( node_url.fileURLToPath(packageJsonUrl), base, '"exports" cannot contain numeric property keys.' ); } } i = -1; while (++i < keys.length) { const key = keys[i]; if (key === "default" || conditions && conditions.has(key)) { const conditionalTarget = ( /** @type {unknown} */ target[key] ); const resolveResult = resolvePackageTarget( packageJsonUrl, conditionalTarget, subpath, packageSubpath, base, pattern, internal, isPathMap, conditions ); if (resolveResult === void 0) continue; return resolveResult; } } return null; } if (target === null) { return null; } throw invalidPackageTarget( packageSubpath, target, packageJsonUrl, internal, base ); } function isConditionalExportsMainSugar(exports2, packageJsonUrl, base) { if (typeof exports2 === "string" || Array.isArray(exports2)) return true; if (typeof exports2 !== "object" || exports2 === null) return false; const keys = Object.getOwnPropertyNames(exports2); let isConditionalSugar = false; let i = 0; let keyIndex = -1; while (++keyIndex < keys.length) { const key = keys[keyIndex]; const currentIsConditionalSugar = key === "" || key[0] !== "."; if (i++ === 0) { isConditionalSugar = currentIsConditionalSugar; } else if (isConditionalSugar !== currentIsConditionalSugar) { throw new ERR_INVALID_PACKAGE_CONFIG( node_url.fileURLToPath(packageJsonUrl), base, `"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.` ); } } return isConditionalSugar; } function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) { if (process__default.noDeprecation) { return; } const pjsonPath = node_url.fileURLToPath(pjsonUrl); if (emittedPackageWarnings.has(pjsonPath + "|" + match)) return; emittedPackageWarnings.add(pjsonPath + "|" + match); process__default.emitWarning( `Use of deprecated trailing slash pattern mapping "${match}" in the "exports" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${node_url.fileURLToPath(base)}` : ""}. Mapping specifiers ending in "/" is no longer supported.`, "DeprecationWarning", "DEP0155" ); } function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions) { let exports2 = packageConfig.exports; if (isConditionalExportsMainSugar(exports2, packageJsonUrl, base)) { exports2 = { ".": exports2 }; } if (own.call(exports2, packageSubpath) && !packageSubpath.includes("*") && !packageSubpath.endsWith("/")) { const target = exports2[packageSubpath]; const resolveResult = resolvePackageTarget( packageJsonUrl, target, "", packageSubpath, base, false, false, false, conditions ); if (resolveResult === null || resolveResult === void 0) { throw exportsNotFound(packageSubpath, packageJsonUrl, base); } return resolveResult; } let bestMatch = ""; let bestMatchSubpath = ""; const keys = Object.getOwnPropertyNames(exports2); let i = -1; while (++i < keys.length) { const key = keys[i]; const patternIndex = key.indexOf("*"); if (patternIndex !== -1 && packageSubpath.startsWith(key.slice(0, patternIndex))) { if (packageSubpath.endsWith("/")) { emitTrailingSlashPatternDeprecation( packageSubpath, packageJsonUrl, base ); } const patternTrailer = key.slice(patternIndex + 1); if (packageSubpath.length >= key.length && packageSubpath.endsWith(patternTrailer) && patternKeyCompare(bestMatch, key) === 1 && key.lastIndexOf("*") === patternIndex) { bestMatch = key; bestMatchSubpath = packageSubpath.slice( patternIndex, packageSubpath.length - patternTrailer.length ); } } } if (bestMatch) { const target = ( /** @type {unknown} */ exports2[bestMatch] ); const resolveResult = resolvePackageTarget( packageJsonUrl, target, bestMatchSubpath, bestMatch, base, true, false, packageSubpath.endsWith("/"), conditions ); if (resolveResult === null || resolveResult === void 0) { throw exportsNotFound(packageSubpath, packageJsonUrl, base); } return resolveResult; } throw exportsNotFound(packageSubpath, packageJsonUrl, base); } function patternKeyCompare(a, b) { const aPatternIndex = a.indexOf("*"); const bPatternIndex = b.indexOf("*"); const baseLengthA = aPatternIndex === -1 ? a.length : aPatternIndex + 1; const baseLengthB = bPatternIndex === -1 ? b.length : bPatternIndex + 1; if (baseLengthA > baseLengthB) return -1; if (baseLengthB > baseLengthA) return 1; if (aPatternIndex === -1) return 1; if (bPatternIndex === -1) return -1; if (a.length > b.length) return -1; if (b.length > a.length) return 1; return 0; } function packageImportsResolve(name42, base, conditions) { if (name42 === "#" || name42.startsWith("#/") || name42.endsWith("/")) { const reason = "is not a valid internal imports specifier name"; throw new ERR_INVALID_MODULE_SPECIFIER(name42, reason, node_url.fileURLToPath(base)); } let packageJsonUrl; const packageConfig = getPackageScopeConfig(base); if (packageConfig.exists) { packageJsonUrl = node_url.pathToFileURL(packageConfig.pjsonPath); const imports = packageConfig.imports; if (imports) { if (own.call(imports, name42) && !name42.includes("*")) { const resolveResult = resolvePackageTarget( packageJsonUrl, imports[name42], "", name42, base, false, true, false, conditions ); if (resolveResult !== null && resolveResult !== void 0) { return resolveResult; } } else { let bestMatch = ""; let bestMatchSubpath = ""; const keys = Object.getOwnPropertyNames(imports); let i = -1; while (++i < keys.length) { const key = keys[i]; const patternIndex = key.indexOf("*"); if (patternIndex !== -1 && name42.startsWith(key.slice(0, -1))) { const patternTrailer = key.slice(patternIndex + 1); if (name42.length >= key.length && name42.endsWith(patternTrailer) && patternKeyCompare(bestMatch, key) === 1 && key.lastIndexOf("*") === patternIndex) { bestMatch = key; bestMatchSubpath = name42.slice( patternIndex, name42.length - patternTrailer.length ); } } } if (bestMatch) { const target = imports[bestMatch]; const resolveResult = resolvePackageTarget( packageJsonUrl, target, bestMatchSubpath, bestMatch, base, true, true, false, conditions ); if (resolveResult !== null && resolveResult !== void 0) { return resolveResult; } } } } } throw importNotDefined(name42, packageJsonUrl, base); } function parsePackageName(specifier, base) { let separatorIndex = specifier.indexOf("/"); let validPackageName = true; let isScoped = false; if (specifier[0] === "@") { isScoped = true; if (separatorIndex === -1 || specifier.length === 0) { validPackageName = false; } else { separatorIndex = specifier.indexOf("/", separatorIndex + 1); } } const packageName = separatorIndex === -1 ? specifier : specifier.slice(0, separatorIndex); if (invalidPackageNameRegEx.exec(packageName) !== null) { validPackageName = false; } if (!validPackageName) { throw new ERR_INVALID_MODULE_SPECIFIER( specifier, "is not a valid package name", node_url.fileURLToPath(base) ); } const packageSubpath = "." + (separatorIndex === -1 ? "" : specifier.slice(separatorIndex)); return { packageName, packageSubpath, isScoped }; } function packageResolve(specifier, base, conditions) { if (node_module.builtinModules.includes(specifier)) { return new node_url.URL("node:" + specifier); } const { packageName, packageSubpath, isScoped } = parsePackageName( specifier, base ); const packageConfig = getPackageScopeConfig(base); if (packageConfig.exists) { const packageJsonUrl2 = node_url.pathToFileURL(packageConfig.pjsonPath); if (packageConfig.name === packageName && packageConfig.exports !== void 0 && packageConfig.exports !== null) { return packageExportsResolve( packageJsonUrl2, packageSubpath, packageConfig, base, conditions ); } } let packageJsonUrl = new node_url.URL( "./node_modules/" + packageName + "/package.json", base ); let packageJsonPath = node_url.fileURLToPath(packageJsonUrl); let lastPath; do { const stat = tryStatSync(packageJsonPath.slice(0, -13)); if (!stat || !stat.isDirectory()) { lastPath = packageJsonPath; packageJsonUrl = new node_url.URL( (isScoped ? "../../../../node_modules/" : "../../../node_modules/") + packageName + "/package.json", packageJsonUrl ); packageJsonPath = node_url.fileURLToPath(packageJsonUrl); continue; } const packageConfig2 = read(packageJsonPath, { base, specifier }); if (packageConfig2.exports !== void 0 && packageConfig2.exports !== null) { return packageExportsResolve( packageJsonUrl, packageSubpath, packageConfig2, base, conditions ); } if (packageSubpath === ".") { return legacyMainResolve(packageJsonUrl, packageConfig2, base); } return new node_url.URL(packageSubpath, packageJsonUrl); } while (packageJsonPath.length !== lastPath.length); throw new ERR_MODULE_NOT_FOUND(packageName, node_url.fileURLToPath(base), false); } function isRelativeSpecifier(specifier) { if (specifier[0] === ".") { if (specifier.length === 1 || specifier[1] === "/") return true; if (specifier[1] === "." && (specifier.length === 2 || specifier[2] === "/")) { return true; } } return false; } function shouldBeTreatedAsRelativeOrAbsolutePath(specifier) { if (specifier === "") return false; if (specifier[0] === "/") return true; return isRelativeSpecifier(specifier); } function moduleResolve(specifier, base, conditions, preserveSymlinks) { const protocol = base.protocol; const isData = protocol === "data:"; const isRemote = isData || protocol === "http:" || protocol === "https:"; let resolved; if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) { try { resolved = new node_url.URL(specifier, base); } catch (error_) { const error = new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier, base); error.cause = error_; throw error; } } else if (protocol === "file:" && specifier[0] === "#") { resolved = packageImportsResolve(specifier, base, conditions); } else { try { resolved = new node_url.URL(specifier); } catch (error_) { if (isRemote && !node_module.builtinModules.includes(specifier)) { const error = new ERR_UNSUPPORTED_RESOLVE_REQUEST(specifier, base); error.cause = error_; throw error; } resolved = packageResolve(specifier, base, conditions); } } assert__default(resolved !== void 0, "expected to be defined"); if (resolved.protocol !== "file:") { return resolved; } return finalizeResolution(resolved, base, preserveSymlinks); } function fileURLToPath(id) { if (typeof id === "string" && !id.startsWith("file://")) { return normalizeSlash(id); } return normalizeSlash(node_url.fileURLToPath(id)); } function pathToFileURL(id) { return node_url.pathToFileURL(fileURLToPath(id)).toString(); } var INVALID_CHAR_RE = /[\u0000-\u001F"#$&*+,/:;<=>?@[\]^`{|}\u007F]+/g; function sanitizeURIComponent(name42 = "", replacement = "_") { return name42.replace(INVALID_CHAR_RE, replacement).replace(/%../g, replacement); } function sanitizeFilePath(filePath = "") { return filePath.replace(/\?.*$/, "").split(/[/\\]/g).map((p) => sanitizeURIComponent(p)).join("/").replace(/^([A-Za-z])_\//, "$1:/"); } function normalizeid(id) { if (typeof id !== "string") { id = id.toString(); } if (/(node|data|http|https|file):/.test(id)) { return id; } if (BUILTIN_MODULES.has(id)) { return "node:" + id; } return "file://" + encodeURI(normalizeSlash(id)); } async function loadURL(url) { const code2 = await fs.promises.readFile(fileURLToPath(url), "utf8"); return code2; } function toDataURL(code2) { const base64 = Buffer.from(code2).toString("base64"); return `data:text/javascript;base64,${base64}`; } function isNodeBuiltin(id = "") { id = id.replace(/^node:/, "").split("/")[0]; return BUILTIN_MODULES.has(id); } var ProtocolRegex = /^(?.{2,}?):.+$/; function getProtocol(id) { const proto = id.match(ProtocolRegex); return proto ? proto.groups?.proto : void 0; } var DEFAULT_CONDITIONS_SET = /* @__PURE__ */ new Set(["node", "import"]); var DEFAULT_EXTENSIONS = [".mjs", ".cjs", ".js", ".json"]; var NOT_FOUND_ERRORS = /* @__PURE__ */ new Set([ "ERR_MODULE_NOT_FOUND", "ERR_UNSUPPORTED_DIR_IMPORT", "MODULE_NOT_FOUND", "ERR_PACKAGE_PATH_NOT_EXPORTED" ]); function _tryModuleResolve(id, url, conditions) { try { return moduleResolve(id, url, conditions); } catch (error) { if (!NOT_FOUND_ERRORS.has(error?.code)) { throw error; } } } function _resolve(id, options = {}) { if (typeof id !== "string") { if (id instanceof URL) { id = fileURLToPath(id); } else { throw new TypeError("input must be a `string` or `URL`"); } } if (/(node|data|http|https):/.test(id)) { return id; } if (BUILTIN_MODULES.has(id)) { return "node:" + id; } if (id.startsWith("file://")) { id = fileURLToPath(id); } if (pathe.isAbsolute(id)) { try { const stat = fs.statSync(id); if (stat.isFile()) { return pathToFileURL(id); } } catch (error) { if (error?.code !== "ENOENT") { throw error; } } } const conditionsSet = options.conditions ? new Set(options.conditions) : DEFAULT_CONDITIONS_SET; const _urls = (Array.isArray(options.url) ? options.url : [options.url]).filter(Boolean).map((url) => new URL(normalizeid(url.toString()))); if (_urls.length === 0) { _urls.push(new URL(pathToFileURL(process.cwd()))); } const urls = [..._urls]; for (const url of _urls) { if (url.protocol === "file:") { urls.push( new URL("./", url), // If url is directory new URL(ufo.joinURL(url.pathname, "_index.js"), url), // TODO: Remove in next major version? new URL("node_modules", url) ); } } let resolved; for (const url of urls) { resolved = _tryModuleResolve(id, url, conditionsSet); if (resolved) { break; } for (const prefix of ["", "/index"]) { for (const extension of options.extensions || DEFAULT_EXTENSIONS) { resolved = _tryModuleResolve( ufo.joinURL(id, prefix) + extension, url, conditionsSet ); if (resolved) { break; } } if (resolved) { break; } } if (resolved) { break; } } if (!resolved) { const error = new Error( `Cannot find module ${id} imported from ${urls.join(", ")}` ); error.code = "ERR_MODULE_NOT_FOUND"; throw error; } return pathToFileURL(resolved); } function resolveSync(id, options) { return _resolve(id, options); } function resolve(id, options) { try { return Promise.resolve(resolveSync(id, options)); } catch (error) { return Promise.reject(error); } } function resolvePathSync(id, options) { return fileURLToPath(resolveSync(id, options)); } function resolvePath(id, options) { try { return Promise.resolve(resolvePathSync(id, options)); } catch (error) { return Promise.reject(error); } } function createResolve(defaults) { return (id, url) => { return resolve(id, { url, ...defaults }); }; } var NODE_MODULES_RE = /^(.+\/node_modules\/)([^/@]+|@[^/]+\/[^/]+)(\/?.*?)?$/; function parseNodeModulePath(path2) { if (!path2) { return {}; } path2 = pathe.normalize(fileURLToPath(path2)); const match = NODE_MODULES_RE.exec(path2); if (!match) { return {}; } const [, dir, name42, subpath] = match; return { dir, name: name42, subpath: subpath ? `.${subpath}` : void 0 }; } async function lookupNodeModuleSubpath(path2) { path2 = pathe.normalize(fileURLToPath(path2)); const { name: name42, subpath } = parseNodeModulePath(path2); if (!name42 || !subpath) { return subpath; } const { exports: exports2 } = await pkgTypes.readPackageJSON(path2).catch(() => { }) || {}; if (exports2) { const resolvedSubpath = _findSubpath(subpath, exports2); if (resolvedSubpath) { return resolvedSubpath; } } return subpath; } function _findSubpath(subpath, exports2) { if (typeof exports2 === "string") { exports2 = { ".": exports2 }; } if (!subpath.startsWith(".")) { subpath = subpath.startsWith("/") ? `.${subpath}` : `./${subpath}`; } if (subpath in (exports2 || {})) { return subpath; } return _flattenExports(exports2).find((p) => p.fsPath === subpath)?.subpath; } function _flattenExports(exports2 = {}, parentSubpath = "./") { return Object.entries(exports2).flatMap(([key, value]) => { const [subpath, condition] = key.startsWith(".") ? [key.slice(1), void 0] : ["", key]; const _subPath = ufo.joinURL(parentSubpath, subpath); if (typeof value === "string") { return [{ subpath: _subPath, fsPath: value, condition }]; } else { return _flattenExports(value, _subPath); } }); } var ESM_STATIC_IMPORT_RE = /(?<=\s|^|;|\})import\s*([\s"']*(?[\p{L}\p{M}\w\t\n\r $*,/{}@.]+)from\s*)?["']\s*(?(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][\s;]*/gmu; var DYNAMIC_IMPORT_RE = /import\s*\((?(?:[^()]+|\((?:[^()]+|\([^()]*\))*\))*)\)/gm; var IMPORT_NAMED_TYPE_RE = /(?<=\s|^|;|})import\s*type\s+([\s"']*(?[\w\t\n\r $*,/{}]+)from\s*)?["']\s*(?(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][\s;]*/gm; var EXPORT_DECAL_RE = /\bexport\s+(?(async function\s*\*?|function\s*\*?|let|const enum|const|enum|var|class))\s+\*?(?[\w$]+)(?.*,\s*[\s\w:[\]{}]*[\w$\]}]+)*/g; var EXPORT_DECAL_TYPE_RE = /\bexport\s+(?(interface|type|declare (async function|function|let|const enum|const|enum|var|class)))\s+(?[\w$]+)/g; var EXPORT_NAMED_RE = /\bexport\s*{(?[^}]+?)[\s,]*}(\s*from\s*["']\s*(?(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][^\n;]*)?/g; var EXPORT_NAMED_TYPE_RE = /\bexport\s+type\s*{(?[^}]+?)[\s,]*}(\s*from\s*["']\s*(?(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][^\n;]*)?/g; var EXPORT_NAMED_DESTRUCT = /\bexport\s+(let|var|const)\s+(?:{(?[^}]+?)[\s,]*}|\[(?[^\]]+?)[\s,]*])\s+=/gm; var EXPORT_STAR_RE = /\bexport\s*(\*)(\s*as\s+(?[\w$]+)\s+)?\s*(\s*from\s*["']\s*(?(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][^\n;]*)?/g; var EXPORT_DEFAULT_RE = /\bexport\s+default\s+(async function|function|class|true|false|\W|\d)|\bexport\s+default\s+(?.*)/g; var TYPE_RE = /^\s*?type\s/; function findStaticImports(code2) { return _filterStatement( _tryGetLocations(code2, "import"), matchAll(ESM_STATIC_IMPORT_RE, code2, { type: "static" }) ); } function findDynamicImports(code2) { return _filterStatement( _tryGetLocations(code2, "import"), matchAll(DYNAMIC_IMPORT_RE, code2, { type: "dynamic" }) ); } function findTypeImports(code2) { return [ ...matchAll(IMPORT_NAMED_TYPE_RE, code2, { type: "type" }), ...matchAll(ESM_STATIC_IMPORT_RE, code2, { type: "static" }).filter( (match) => /[^A-Za-z]type\s/.test(match.imports) ) ]; } function parseStaticImport(matched) { const cleanedImports = clearImports(matched.imports); const namedImports = {}; const _matches = cleanedImports.match(/{([^}]*)}/)?.[1]?.split(",") || []; for (const namedImport of _matches) { const _match = namedImport.match(/^\s*(\S*) as (\S*)\s*$/); const source = _match?.[1] || namedImport.trim(); const importName = _match?.[2] || source; if (source && !TYPE_RE.test(source)) { namedImports[source] = importName; } } const { namespacedImport, defaultImport } = getImportNames(cleanedImports); return { ...matched, defaultImport, namespacedImport, namedImports }; } function parseTypeImport(matched) { if (matched.type === "type") { return parseStaticImport(matched); } const cleanedImports = clearImports(matched.imports); const namedImports = {}; const _matches = cleanedImports.match(/{([^}]*)}/)?.[1]?.split(",") || []; for (const namedImport of _matches) { const _match = /\s+as\s+/.test(namedImport) ? namedImport.match(/^\s*type\s+(\S*) as (\S*)\s*$/) : namedImport.match(/^\s*type\s+(\S*)\s*$/); const source = _match?.[1] || namedImport.trim(); const importName = _match?.[2] || source; if (source && TYPE_RE.test(namedImport)) { namedImports[source] = importName; } } const { namespacedImport, defaultImport } = getImportNames(cleanedImports); return { ...matched, defaultImport, namespacedImport, namedImports }; } function findExports(code2) { const declaredExports = matchAll(EXPORT_DECAL_RE, code2, { type: "declaration" }); for (const declaredExport of declaredExports) { const extraNamesStr = declaredExport.extraNames; if (extraNamesStr) { const extraNames = matchAll( /({.*?})|(\[.*?])|(,\s*(?\w+))/g, extraNamesStr, {} ).map((m) => m.name).filter(Boolean); declaredExport.names = [declaredExport.name, ...extraNames]; } delete declaredExport.extraNames; } const namedExports = normalizeNamedExports( matchAll(EXPORT_NAMED_RE, code2, { type: "named" }) ); const destructuredExports = matchAll( EXPORT_NAMED_DESTRUCT, code2, { type: "named" } ); for (const namedExport of destructuredExports) { namedExport.exports = namedExport.exports1 || namedExport.exports2; namedExport.names = namedExport.exports.replace(/^\r?\n?/, "").split(/\s*,\s*/g).filter((name42) => !TYPE_RE.test(name42)).map( (name42) => name42.replace(/^.*?\s*:\s*/, "").replace(/\s*=\s*.*$/, "").trim() ); } const defaultExport = matchAll(EXPORT_DEFAULT_RE, code2, { type: "default", name: "default" }); const starExports = matchAll(EXPORT_STAR_RE, code2, { type: "star" }); const exports2 = normalizeExports([ ...declaredExports, ...namedExports, ...destructuredExports, ...defaultExport, ...starExports ]); if (exports2.length === 0) { return []; } const exportLocations = _tryGetLocations(code2, "export"); if (exportLocations && exportLocations.length === 0) { return []; } return ( // Filter false positive export matches _filterStatement(exportLocations, exports2).filter((exp, index, exports22) => { const nextExport = exports22[index + 1]; return !nextExport || exp.type !== nextExport.type || !exp.name || exp.name !== nextExport.name; }) ); } function findTypeExports(code2) { const declaredExports = matchAll( EXPORT_DECAL_TYPE_RE, code2, { type: "declaration" } ); const namedExports = normalizeNamedExports( matchAll(EXPORT_NAMED_TYPE_RE, code2, { type: "named" }) ); const exports2 = normalizeExports([ ...declaredExports, ...namedExports ]); if (exports2.length === 0) { return []; } const exportLocations = _tryGetLocations(code2, "export"); if (exportLocations && exportLocations.length === 0) { return []; } return ( // Filter false positive export matches _filterStatement(exportLocations, exports2).filter((exp, index, exports22) => { const nextExport = exports22[index + 1]; return !nextExport || exp.type !== nextExport.type || !exp.name || exp.name !== nextExport.name; }) ); } function normalizeExports(exports2) { for (const exp of exports2) { if (!exp.name && exp.names && exp.names.length === 1) { exp.name = exp.names[0]; } if (exp.name === "default" && exp.type !== "default") { exp._type = exp.type; exp.type = "default"; } if (!exp.names && exp.name) { exp.names = [exp.name]; } if (exp.type === "declaration" && exp.declaration) { exp.declarationType = exp.declaration.replace( /^declare\s*/, "" ); } } return exports2; } function normalizeNamedExports(namedExports) { for (const namedExport of namedExports) { namedExport.names = namedExport.exports.replace(/^\r?\n?/, "").split(/\s*,\s*/g).filter((name42) => !TYPE_RE.test(name42)).map((name42) => name42.replace(/^.*?\sas\s/, "").trim()); } return namedExports; } function findExportNames(code2) { return findExports(code2).flatMap((exp) => exp.names).filter(Boolean); } async function resolveModuleExportNames(id, options) { const url = await resolvePath(id, options); const code2 = await loadURL(url); const exports2 = findExports(code2); const exportNames = new Set( exports2.flatMap((exp) => exp.names).filter(Boolean) ); for (const exp of exports2) { if (exp.type !== "star" || !exp.specifier) { continue; } const subExports = await resolveModuleExportNames(exp.specifier, { ...options, url }); for (const subExport of subExports) { exportNames.add(subExport); } } return [...exportNames]; } function _filterStatement(locations, statements) { return statements.filter((exp) => { return !locations || locations.some((location) => { return exp.start <= location.start && exp.end >= location.end; }); }); } function _tryGetLocations(code2, label) { try { return _getLocations(code2, label); } catch { } } function _getLocations(code2, label) { const tokens = acorn.tokenizer(code2, { ecmaVersion: "latest", sourceType: "module", allowHashBang: true, allowAwaitOutsideFunction: true, allowImportExportEverywhere: true }); const locations = []; for (const token of tokens) { if (token.type.label === label) { locations.push({ start: token.start, end: token.end }); } } return locations; } function createCommonJS(url) { const __filename2 = fileURLToPath(url); const __dirname = path.dirname(__filename2); let _nativeRequire; const getNativeRequire = () => { if (!_nativeRequire) { _nativeRequire = node_module.createRequire(url); } return _nativeRequire; }; function require2(id) { return getNativeRequire()(id); } require2.resolve = function requireResolve(id, options) { return getNativeRequire().resolve(id, options); }; return { __filename: __filename2, __dirname, require: require2 }; } function interopDefault(sourceModule, opts = {}) { if (!isObject3(sourceModule) || !("default" in sourceModule)) { return sourceModule; } const defaultValue = sourceModule.default; if (defaultValue === void 0 || defaultValue === null) { return sourceModule; } const _defaultType = typeof defaultValue; if (_defaultType !== "object" && !(_defaultType === "function" && !opts.preferNamespace)) { return opts.preferNamespace ? sourceModule : defaultValue; } for (const key in sourceModule) { try { if (!(key in defaultValue)) { Object.defineProperty(defaultValue, key, { enumerable: key !== "default", configurable: key !== "default", get() { return sourceModule[key]; } }); } } catch { } } return defaultValue; } var EVAL_ESM_IMPORT_RE = /(?<=import .* from ["'])([^"']+)(?=["'])|(?<=export .* from ["'])([^"']+)(?=["'])|(?<=import\s*["'])([^"']+)(?=["'])|(?<=import\s*\(["'])([^"']+)(?=["']\))/g; async function loadModule(id, options = {}) { const url = await resolve(id, options); const code2 = await loadURL(url); return evalModule(code2, { ...options, url }); } async function evalModule(code2, options = {}) { const transformed = await transformModule(code2, options); const dataURL = toDataURL(transformed); return import(dataURL).catch((error) => { error.stack = error.stack.replace( new RegExp(dataURL, "g"), options.url || "_mlly_eval_" ); throw error; }); } function transformModule(code2, options = {}) { if (options.url && options.url.endsWith(".json")) { return Promise.resolve("export default " + code2); } if (options.url) { code2 = code2.replace(/import\.meta\.url/g, `'${options.url}'`); } return Promise.resolve(code2); } async function resolveImports(code2, options) { const imports = [...code2.matchAll(EVAL_ESM_IMPORT_RE)].map((m) => m[0]); if (imports.length === 0) { return code2; } const uniqueImports = [...new Set(imports)]; const resolved = /* @__PURE__ */ new Map(); await Promise.all( uniqueImports.map(async (id) => { let url = await resolve(id, options); if (url.endsWith(".json")) { const code22 = await loadURL(url); url = toDataURL(await transformModule(code22, { url })); } resolved.set(id, url); }) ); const re = new RegExp( uniqueImports.map((index) => `(${index})`).join("|"), "g" ); return code2.replace(re, (id) => resolved.get(id)); } var ESM_RE = /([\s;]|^)(import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m; var CJS_RE = /([\s;]|^)(module.exports\b|exports\.\w|require\s*\(|global\.\w)/m; var COMMENT_RE = /\/\*.+?\*\/|\/\/.*(?=[nr])/g; var BUILTIN_EXTENSIONS = /* @__PURE__ */ new Set([".mjs", ".cjs", ".node", ".wasm"]); function hasESMSyntax(code2, opts = {}) { if (opts.stripComments) { code2 = code2.replace(COMMENT_RE, ""); } return ESM_RE.test(code2); } function hasCJSSyntax(code2, opts = {}) { if (opts.stripComments) { code2 = code2.replace(COMMENT_RE, ""); } return CJS_RE.test(code2); } function detectSyntax(code2, opts = {}) { if (opts.stripComments) { code2 = code2.replace(COMMENT_RE, ""); } const hasESM = hasESMSyntax(code2, {}); const hasCJS = hasCJSSyntax(code2, {}); return { hasESM, hasCJS, isMixed: hasESM && hasCJS }; } var validNodeImportDefaults = { allowedProtocols: ["node", "file", "data"] }; async function isValidNodeImport(id, _options = {}) { if (isNodeBuiltin(id)) { return true; } const options = { ...validNodeImportDefaults, ..._options }; const proto = getProtocol(id); if (proto && !options.allowedProtocols?.includes(proto)) { return false; } if (proto === "data") { return true; } const resolvedPath = await resolvePath(id, options); const extension = pathe.extname(resolvedPath); if (BUILTIN_EXTENSIONS.has(extension)) { return true; } if (extension !== ".js") { return false; } const package_ = await pkgTypes.readPackageJSON(resolvedPath).catch(() => { }); if (package_?.type === "module") { return true; } if (/\.(\w+-)?esm?(-\w+)?\.js$|\/(esm?)\//.test(resolvedPath)) { return false; } const code2 = options.code || await fs.promises.readFile(resolvedPath, "utf8").catch(() => { }) || ""; return !hasESMSyntax(code2, { stripComments: options.stripComments }); } exports.DYNAMIC_IMPORT_RE = DYNAMIC_IMPORT_RE; exports.ESM_STATIC_IMPORT_RE = ESM_STATIC_IMPORT_RE; exports.EXPORT_DECAL_RE = EXPORT_DECAL_RE; exports.EXPORT_DECAL_TYPE_RE = EXPORT_DECAL_TYPE_RE; exports.createCommonJS = createCommonJS; exports.createResolve = createResolve; exports.detectSyntax = detectSyntax; exports.evalModule = evalModule; exports.fileURLToPath = fileURLToPath; exports.findDynamicImports = findDynamicImports; exports.findExportNames = findExportNames; exports.findExports = findExports; exports.findStaticImports = findStaticImports; exports.findTypeExports = findTypeExports; exports.findTypeImports = findTypeImports; exports.getProtocol = getProtocol; exports.hasCJSSyntax = hasCJSSyntax; exports.hasESMSyntax = hasESMSyntax; exports.interopDefault = interopDefault; exports.isNodeBuiltin = isNodeBuiltin; exports.isValidNodeImport = isValidNodeImport; exports.loadModule = loadModule; exports.loadURL = loadURL; exports.lookupNodeModuleSubpath = lookupNodeModuleSubpath; exports.normalizeid = normalizeid; exports.parseNodeModulePath = parseNodeModulePath; exports.parseStaticImport = parseStaticImport; exports.parseTypeImport = parseTypeImport; exports.pathToFileURL = pathToFileURL; exports.resolve = resolve; exports.resolveImports = resolveImports; exports.resolveModuleExportNames = resolveModuleExportNames; exports.resolvePath = resolvePath; exports.resolvePathSync = resolvePathSync; exports.resolveSync = resolveSync; exports.sanitizeFilePath = sanitizeFilePath; exports.sanitizeURIComponent = sanitizeURIComponent; exports.toDataURL = toDataURL; exports.transformModule = transformModule; } }); // node_modules/.pnpm/local-pkg@0.5.1/node_modules/local-pkg/dist/index.cjs var require_dist6 = __commonJS({ "node_modules/.pnpm/local-pkg@0.5.1/node_modules/local-pkg/dist/index.cjs"(exports) { "use strict"; var fs = require_node_fs(); var fsp = require_promises(); var node_module = require_node_module(); var path = require_node_path(); var process2 = require_node_process(); var node_url = require_node_url(); var mlly = require_dist5(); var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null; function _interopDefaultCompat(e2) { return e2 && typeof e2 === "object" && "default" in e2 ? e2.default : e2; } var fs__default = _interopDefaultCompat(fs); var fsp__default = _interopDefaultCompat(fsp); var path__default = _interopDefaultCompat(path); var process__default = _interopDefaultCompat(process2); var Node = class { value; next; constructor(value) { this.value = value; } }; var Queue = class { #head; #tail; #size; constructor() { this.clear(); } enqueue(value) { const node = new Node(value); if (this.#head) { this.#tail.next = node; this.#tail = node; } else { this.#head = node; this.#tail = node; } this.#size++; } dequeue() { const current = this.#head; if (!current) { return; } this.#head = this.#head.next; this.#size--; return current.value; } clear() { this.#head = void 0; this.#tail = void 0; this.#size = 0; } get size() { return this.#size; } *[Symbol.iterator]() { let current = this.#head; while (current) { yield current.value; current = current.next; } } }; function pLimit(concurrency) { if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) { throw new TypeError("Expected `concurrency` to be a number from 1 and up"); } const queue = new Queue(); let activeCount = 0; const next = () => { activeCount--; if (queue.size > 0) { queue.dequeue()(); } }; const run = async (fn, resolve, args) => { activeCount++; const result = (async () => fn(...args))(); resolve(result); try { await result; } catch { } next(); }; const enqueue = (fn, resolve, args) => { queue.enqueue(run.bind(void 0, fn, resolve, args)); (async () => { await Promise.resolve(); if (activeCount < concurrency && queue.size > 0) { queue.dequeue()(); } })(); }; const generator = (fn, ...args) => new Promise((resolve) => { enqueue(fn, resolve, args); }); Object.defineProperties(generator, { activeCount: { get: () => activeCount }, pendingCount: { get: () => queue.size }, clearQueue: { value: () => { queue.clear(); } } }); return generator; } var EndError = class extends Error { constructor(value) { super(); this.value = value; } }; var testElement = async (element, tester) => tester(await element); var finder = async (element) => { const values = await Promise.all(element); if (values[1] === true) { throw new EndError(values[0]); } return false; }; async function pLocate(iterable, tester, { concurrency = Number.POSITIVE_INFINITY, preserveOrder = true } = {}) { const limit = pLimit(concurrency); const items = [...iterable].map((element) => [element, limit(testElement, element, tester)]); const checkLimit = pLimit(preserveOrder ? 1 : Number.POSITIVE_INFINITY); try { await Promise.all(items.map((element) => checkLimit(finder, element))); } catch (error) { if (error instanceof EndError) { return error.value; } throw error; } } var typeMappings = { directory: "isDirectory", file: "isFile" }; function checkType(type) { if (Object.hasOwnProperty.call(typeMappings, type)) { return; } throw new Error(`Invalid type specified: ${type}`); } var matchType = (type, stat) => stat[typeMappings[type]](); var toPath$1 = (urlOrPath) => urlOrPath instanceof URL ? node_url.fileURLToPath(urlOrPath) : urlOrPath; async function locatePath(paths, { cwd = process__default.cwd(), type = "file", allowSymlinks = true, concurrency, preserveOrder } = {}) { checkType(type); cwd = toPath$1(cwd); const statFunction = allowSymlinks ? fs.promises.stat : fs.promises.lstat; return pLocate(paths, async (path_) => { try { const stat = await statFunction(path__default.resolve(cwd, path_)); return matchType(type, stat); } catch { return false; } }, { concurrency, preserveOrder }); } var toPath = (urlOrPath) => urlOrPath instanceof URL ? node_url.fileURLToPath(urlOrPath) : urlOrPath; var findUpStop = Symbol("findUpStop"); async function findUpMultiple(name42, options = {}) { let directory = path__default.resolve(toPath(options.cwd) || ""); const { root } = path__default.parse(directory); const stopAt = path__default.resolve(directory, options.stopAt || root); const limit = options.limit || Number.POSITIVE_INFINITY; const paths = [name42].flat(); const runMatcher = async (locateOptions) => { if (typeof name42 !== "function") { return locatePath(paths, locateOptions); } const foundPath = await name42(locateOptions.cwd); if (typeof foundPath === "string") { return locatePath([foundPath], locateOptions); } return foundPath; }; const matches = []; while (true) { const foundPath = await runMatcher({ ...options, cwd: directory }); if (foundPath === findUpStop) { break; } if (foundPath) { matches.push(path__default.resolve(directory, foundPath)); } if (directory === stopAt || matches.length >= limit) { break; } directory = path__default.dirname(directory); } return matches; } async function findUp(name42, options = {}) { const matches = await findUpMultiple(name42, { ...options, limit: 1 }); return matches[0]; } function _resolve(path$1, options = {}) { if (options.platform === "auto" || !options.platform) options.platform = process__default.platform === "win32" ? "win32" : "posix"; if (process__default.versions.pnp) { const paths = options.paths || []; if (paths.length === 0) paths.push(process__default.cwd()); const targetRequire = node_module.createRequire(typeof document === "undefined" ? require_url().pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.src || new URL("index.cjs", document.baseURI).href); try { return targetRequire.resolve(path$1, { paths }); } catch { } } const modulePath = mlly.resolvePathSync(path$1, { url: options.paths }); if (options.platform === "win32") return path.win32.normalize(modulePath); return modulePath; } function resolveModule(name42, options = {}) { try { return _resolve(name42, options); } catch { return void 0; } } async function importModule(path2) { const i = await import(path2); if (i) return mlly.interopDefault(i); return i; } function isPackageExists(name42, options = {}) { return !!resolvePackage(name42, options); } function getPackageJsonPath(name42, options = {}) { const entry = resolvePackage(name42, options); if (!entry) return; return searchPackageJSON(entry); } async function getPackageInfo(name42, options = {}) { const packageJsonPath = getPackageJsonPath(name42, options); if (!packageJsonPath) return; const packageJson = JSON.parse(await fs__default.promises.readFile(packageJsonPath, "utf8")); return { name: name42, version: packageJson.version, rootPath: path.dirname(packageJsonPath), packageJsonPath, packageJson }; } function getPackageInfoSync(name42, options = {}) { const packageJsonPath = getPackageJsonPath(name42, options); if (!packageJsonPath) return; const packageJson = JSON.parse(fs__default.readFileSync(packageJsonPath, "utf8")); return { name: name42, version: packageJson.version, rootPath: path.dirname(packageJsonPath), packageJsonPath, packageJson }; } function resolvePackage(name42, options = {}) { try { return _resolve(`${name42}/package.json`, options); } catch { } try { return _resolve(name42, options); } catch (e2) { if (e2.code !== "MODULE_NOT_FOUND" && e2.code !== "ERR_MODULE_NOT_FOUND") console.error(e2); return false; } } function searchPackageJSON(dir) { let packageJsonPath; while (true) { if (!dir) return; const newDir = path.dirname(dir); if (newDir === dir) return; dir = newDir; packageJsonPath = path.join(dir, "package.json"); if (fs__default.existsSync(packageJsonPath)) break; } return packageJsonPath; } async function loadPackageJSON(cwd = process__default.cwd()) { const path2 = await findUp("package.json", { cwd }); if (!path2 || !fs__default.existsSync(path2)) return null; return JSON.parse(await fsp__default.readFile(path2, "utf-8")); } async function isPackageListed(name42, cwd) { const pkg = await loadPackageJSON(cwd) || {}; return name42 in (pkg.dependencies || {}) || name42 in (pkg.devDependencies || {}); } exports.getPackageInfo = getPackageInfo; exports.getPackageInfoSync = getPackageInfoSync; exports.importModule = importModule; exports.isPackageExists = isPackageExists; exports.isPackageListed = isPackageListed; exports.loadPackageJSON = loadPackageJSON; exports.resolveModule = resolveModule; } }); // node_modules/.pnpm/package-manager-detector@0.2.5/node_modules/package-manager-detector/dist/constants.cjs var require_constants = __commonJS({ "node_modules/.pnpm/package-manager-detector@0.2.5/node_modules/package-manager-detector/dist/constants.cjs"(exports) { "use strict"; var AGENTS = [ "npm", "yarn", "yarn@berry", "pnpm", "pnpm@6", "bun", "deno" ]; var LOCKS = { "bun.lockb": "bun", "deno.lock": "deno", "pnpm-lock.yaml": "pnpm", "yarn.lock": "yarn", "package-lock.json": "npm", "npm-shrinkwrap.json": "npm" }; var INSTALL_PAGE = { "bun": "https://bun.sh", "deno": "https://deno.com", "pnpm": "https://pnpm.io/installation", "pnpm@6": "https://pnpm.io/6.x/installation", "yarn": "https://classic.yarnpkg.com/en/docs/install", "yarn@berry": "https://yarnpkg.com/getting-started/install", "npm": "https://docs.npmjs.com/cli/v8/configuring-npm/install" }; exports.AGENTS = AGENTS; exports.INSTALL_PAGE = INSTALL_PAGE; exports.LOCKS = LOCKS; } }); // node_modules/.pnpm/package-manager-detector@0.2.5/node_modules/package-manager-detector/dist/detect.cjs var require_detect = __commonJS({ "node_modules/.pnpm/package-manager-detector@0.2.5/node_modules/package-manager-detector/dist/detect.cjs"(exports) { "use strict"; var fs = require_node_fs(); var fsPromises = require_promises(); var path = require_node_path(); var process2 = require_node_process(); var constants = require_constants(); function _interopDefaultCompat(e2) { return e2 && typeof e2 === "object" && "default" in e2 ? e2.default : e2; } var fs__default = _interopDefaultCompat(fs); var fsPromises__default = _interopDefaultCompat(fsPromises); var path__default = _interopDefaultCompat(path); var process__default = _interopDefaultCompat(process2); async function detect(options = {}) { const { cwd, onUnknown } = options; for (const directory of lookup(cwd)) { for (const lock of Object.keys(constants.LOCKS)) { if (await fileExists(path__default.join(directory, lock))) { const name42 = constants.LOCKS[lock]; const result2 = await parsePackageJson(path__default.join(directory, "package.json"), onUnknown); if (result2) return result2; else return { name: name42, agent: name42 }; } } const result = await parsePackageJson(path__default.join(directory, "package.json"), onUnknown); if (result) return result; } return null; } function detectSync(options = {}) { const { cwd, onUnknown } = options; for (const directory of lookup(cwd)) { for (const lock of Object.keys(constants.LOCKS)) { if (fileExistsSync(path__default.join(directory, lock))) { const name42 = constants.LOCKS[lock]; const result2 = parsePackageJsonSync(path__default.join(directory, "package.json"), onUnknown); if (result2) return result2; else return { name: name42, agent: name42 }; } } const result = parsePackageJsonSync(path__default.join(directory, "package.json"), onUnknown); if (result) return result; } return null; } function getUserAgent() { const userAgent = process__default.env.npm_config_user_agent; if (!userAgent) { return null; } const name42 = userAgent.split("/")[0]; return constants.AGENTS.includes(name42) ? name42 : null; } function* lookup(cwd = process__default.cwd()) { let directory = path__default.resolve(cwd); const { root } = path__default.parse(directory); while (directory && directory !== root) { yield directory; directory = path__default.dirname(directory); } } async function parsePackageJson(filepath, onUnknown) { return !filepath || !await fileExists(filepath) ? null : handlePackageManager(filepath, onUnknown); } function parsePackageJsonSync(filepath, onUnknown) { return !filepath || !fileExistsSync(filepath) ? null : handlePackageManager(filepath, onUnknown); } function handlePackageManager(filepath, onUnknown) { try { const pkg = JSON.parse(fs__default.readFileSync(filepath, "utf8")); let agent; if (typeof pkg.packageManager === "string") { const [name42, ver] = pkg.packageManager.replace(/^\^/, "").split("@"); let version2 = ver; if (name42 === "yarn" && Number.parseInt(ver) > 1) { agent = "yarn@berry"; version2 = "berry"; return { name: name42, agent, version: version2 }; } else if (name42 === "pnpm" && Number.parseInt(ver) < 7) { agent = "pnpm@6"; return { name: name42, agent, version: version2 }; } else if (constants.AGENTS.includes(name42)) { agent = name42; return { name: name42, agent, version: version2 }; } else { return onUnknown?.(pkg.packageManager) ?? null; } } } catch { } return null; } async function fileExists(filePath) { try { const stats = await fsPromises__default.stat(filePath); if (stats.isFile()) { return true; } } catch { } return false; } function fileExistsSync(filePath) { try { const stats = fs__default.statSync(filePath); if (stats.isFile()) { return true; } } catch { } return false; } exports.detect = detect; exports.detectSync = detectSync; exports.getUserAgent = getUserAgent; } }); // node_modules/.pnpm/tinyexec@0.3.1/node_modules/tinyexec/dist/main.cjs var require_main = __commonJS({ "node_modules/.pnpm/tinyexec@0.3.1/node_modules/tinyexec/dist/main.cjs"(exports, module) { "use strict"; var It = Object.create; var v = Object.defineProperty; var Lt = Object.getOwnPropertyDescriptor; var jt = Object.getOwnPropertyNames; var Ft = Object.getPrototypeOf; var zt = Object.prototype.hasOwnProperty; var l = (t, e2) => () => (e2 || t((e2 = { exports: {} }).exports, e2), e2.exports); var Ht = (t, e2) => { for (var n2 in e2) v(t, n2, { get: e2[n2], enumerable: true }); }; var N6 = (t, e2, n2, r) => { if (e2 && typeof e2 == "object" || typeof e2 == "function") for (let s of jt(e2)) !zt.call(t, s) && s !== n2 && v(t, s, { get: () => e2[s], enumerable: !(r = Lt(e2, s)) || r.enumerable }); return t; }; var q = (t, e2, n2) => (n2 = t != null ? It(Ft(t)) : {}, N6( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. e2 || !t || !t.__esModule ? v(n2, "default", { value: t, enumerable: true }) : n2, t )); var Wt = (t) => N6(v({}, "__esModule", { value: true }), t); var K = l((Pe, D) => { "use strict"; D.exports = W; W.sync = Xt; var z = require_fs(); function Bt(t, e2) { var n2 = e2.pathExt !== void 0 ? e2.pathExt : process.env.PATHEXT; if (!n2 || (n2 = n2.split(";"), n2.indexOf("") !== -1)) return true; for (var r = 0; r < n2.length; r++) { var s = n2[r].toLowerCase(); if (s && t.substr(-s.length).toLowerCase() === s) return true; } return false; } function H(t, e2, n2) { return !t.isSymbolicLink() && !t.isFile() ? false : Bt(e2, n2); } function W(t, e2, n2) { z.stat(t, function(r, s) { n2(r, r ? false : H(s, t, e2)); }); } function Xt(t, e2) { return H(z.statSync(t), t, e2); } }); var U3 = l((Oe, G) => { "use strict"; G.exports = B; B.sync = Gt; var M = require_fs(); function B(t, e2, n2) { M.stat(t, function(r, s) { n2(r, r ? false : X(s, e2)); }); } function Gt(t, e2) { return X(M.statSync(t), e2); } function X(t, e2) { return t.isFile() && Ut(t, e2); } function Ut(t, e2) { var n2 = t.mode, r = t.uid, s = t.gid, o = e2.uid !== void 0 ? e2.uid : process.getuid && process.getuid(), i = e2.gid !== void 0 ? e2.gid : process.getgid && process.getgid(), a = parseInt("100", 8), c = parseInt("010", 8), u = parseInt("001", 8), f = a | c, p = n2 & u || n2 & c && s === i || n2 & a && r === o || n2 & f && o === 0; return p; } }); var V = l((ke, Y) => { "use strict"; var Se = require_fs(), b; process.platform === "win32" || global.TESTING_WINDOWS ? b = K() : b = U3(); Y.exports = C; C.sync = Yt; function C(t, e2, n2) { if (typeof e2 == "function" && (n2 = e2, e2 = {}), !n2) { if (typeof Promise != "function") throw new TypeError("callback not provided"); return new Promise(function(r, s) { C(t, e2 || {}, function(o, i) { o ? s(o) : r(i); }); }); } b(t, e2 || {}, function(r, s) { r && (r.code === "EACCES" || e2 && e2.ignoreErrors) && (r = null, s = false), n2(r, s); }); } function Yt(t, e2) { try { return b.sync(t, e2 || {}); } catch (n2) { if (e2 && e2.ignoreErrors || n2.code === "EACCES") return false; throw n2; } } }); var rt = l((Te, nt) => { "use strict"; var g = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", J = require_path(), Vt = g ? ";" : ":", Q = V(), Z = (t) => Object.assign(new Error(`not found: ${t}`), { code: "ENOENT" }), tt = (t, e2) => { let n2 = e2.colon || Vt, r = t.match(/\//) || g && t.match(/\\/) ? [""] : [ // windows always checks the cwd first ...g ? [process.cwd()] : [], ...(e2.path || process.env.PATH || /* istanbul ignore next: very unusual */ "").split(n2) ], s = g ? e2.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", o = g ? s.split(n2) : [""]; return g && t.indexOf(".") !== -1 && o[0] !== "" && o.unshift(""), { pathEnv: r, pathExt: o, pathExtExe: s }; }, et = (t, e2, n2) => { typeof e2 == "function" && (n2 = e2, e2 = {}), e2 || (e2 = {}); let { pathEnv: r, pathExt: s, pathExtExe: o } = tt(t, e2), i = [], a = (u) => new Promise((f, p) => { if (u === r.length) return e2.all && i.length ? f(i) : p(Z(t)); let d = r[u], x2 = /^".*"$/.test(d) ? d.slice(1, -1) : d, m = J.join(x2, t), _ = !x2 && /^\.[\\\/]/.test(t) ? t.slice(0, 2) + m : m; f(c(_, u, 0)); }), c = (u, f, p) => new Promise((d, x2) => { if (p === s.length) return d(a(f + 1)); let m = s[p]; Q(u + m, { pathExt: o }, (_, qt) => { if (!_ && qt) if (e2.all) i.push(u + m); else return d(u + m); return d(c(u, f, p + 1)); }); }); return n2 ? a(0).then((u) => n2(null, u), n2) : a(0); }, Jt = (t, e2) => { e2 = e2 || {}; let { pathEnv: n2, pathExt: r, pathExtExe: s } = tt(t, e2), o = []; for (let i = 0; i < n2.length; i++) { let a = n2[i], c = /^".*"$/.test(a) ? a.slice(1, -1) : a, u = J.join(c, t), f = !c && /^\.[\\\/]/.test(t) ? t.slice(0, 2) + u : u; for (let p = 0; p < r.length; p++) { let d = f + r[p]; try { if (Q.sync(d, { pathExt: s })) if (e2.all) o.push(d); else return d; } catch { } } } if (e2.all && o.length) return o; if (e2.nothrow) return null; throw Z(t); }; nt.exports = et; et.sync = Jt; }); var ot = l((Ae, P) => { "use strict"; var st = (t = {}) => { let e2 = t.env || process.env; return (t.platform || process.platform) !== "win32" ? "PATH" : Object.keys(e2).reverse().find((r) => r.toUpperCase() === "PATH") || "Path"; }; P.exports = st; P.exports.default = st; }); var at = l((Re, ut) => { "use strict"; var it = require_path(), Qt = rt(), Zt = ot(); function ct(t, e2) { let n2 = t.options.env || process.env, r = process.cwd(), s = t.options.cwd != null, o = s && process.chdir !== void 0 && !process.chdir.disabled; if (o) try { process.chdir(t.options.cwd); } catch { } let i; try { i = Qt.sync(t.command, { path: n2[Zt({ env: n2 })], pathExt: e2 ? it.delimiter : void 0 }); } catch { } finally { o && process.chdir(r); } return i && (i = it.resolve(s ? t.options.cwd : "", i)), i; } function te(t) { return ct(t) || ct(t, true); } ut.exports = te; }); var lt = l(($e, S) => { "use strict"; var O = /([()\][%!^"`<>&|;, *?])/g; function ee(t) { return t = t.replace(O, "^$1"), t; } function ne(t, e2) { return t = `${t}`, t = t.replace(/(\\*)"/g, '$1$1\\"'), t = t.replace(/(\\*)$/, "$1$1"), t = `"${t}"`, t = t.replace(O, "^$1"), e2 && (t = t.replace(O, "^$1")), t; } S.exports.command = ee; S.exports.argument = ne; }); var dt = l((Ne, pt) => { "use strict"; pt.exports = /^#!(.*)/; }); var ht = l((qe, ft) => { "use strict"; var re = dt(); ft.exports = (t = "") => { let e2 = t.match(re); if (!e2) return null; let [n2, r] = e2[0].replace(/#! ?/, "").split(" "), s = n2.split("/").pop(); return s === "env" ? r : r ? `${s} ${r}` : s; }; }); var gt = l((Ie, mt) => { "use strict"; var k = require_fs(), se = ht(); function oe(t) { let n2 = Buffer.alloc(150), r; try { r = k.openSync(t, "r"), k.readSync(r, n2, 0, 150, 0), k.closeSync(r); } catch { } return se(n2.toString()); } mt.exports = oe; }); var vt = l((Le, xt) => { "use strict"; var ie = require_path(), Et = at(), wt = lt(), ce = gt(), ue = process.platform === "win32", ae = /\.(?:com|exe)$/i, le = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; function pe(t) { t.file = Et(t); let e2 = t.file && ce(t.file); return e2 ? (t.args.unshift(t.file), t.command = e2, Et(t)) : t.file; } function de(t) { if (!ue) return t; let e2 = pe(t), n2 = !ae.test(e2); if (t.options.forceShell || n2) { let r = le.test(e2); t.command = ie.normalize(t.command), t.command = wt.command(t.command), t.args = t.args.map((o) => wt.argument(o, r)); let s = [t.command].concat(t.args).join(" "); t.args = ["/d", "/s", "/c", `"${s}"`], t.command = process.env.comspec || "cmd.exe", t.options.windowsVerbatimArguments = true; } return t; } function fe(t, e2, n2) { e2 && !Array.isArray(e2) && (n2 = e2, e2 = null), e2 = e2 ? e2.slice(0) : [], n2 = Object.assign({}, n2); let r = { command: t, args: e2, options: n2, file: void 0, original: { command: t, args: e2 } }; return n2.shell ? r : de(r); } xt.exports = fe; }); var _t = l((je, yt) => { "use strict"; var T = process.platform === "win32"; function A(t, e2) { return Object.assign(new Error(`${e2} ${t.command} ENOENT`), { code: "ENOENT", errno: "ENOENT", syscall: `${e2} ${t.command}`, path: t.command, spawnargs: t.args }); } function he(t, e2) { if (!T) return; let n2 = t.emit; t.emit = function(r, s) { if (r === "exit") { let o = bt(s, e2, "spawn"); if (o) return n2.call(t, "error", o); } return n2.apply(t, arguments); }; } function bt(t, e2) { return T && t === 1 && !e2.file ? A(e2.original, "spawn") : null; } function me(t, e2) { return T && t === 1 && !e2.file ? A(e2.original, "spawnSync") : null; } yt.exports = { hookChildProcess: he, verifyENOENT: bt, verifyENOENTSync: me, notFoundError: A }; }); var Ot = l((Fe, E) => { "use strict"; var Ct = require_child_process(), R4 = vt(), $ = _t(); function Pt(t, e2, n2) { let r = R4(t, e2, n2), s = Ct.spawn(r.command, r.args, r.options); return $.hookChildProcess(s, r), s; } function ge(t, e2, n2) { let r = R4(t, e2, n2), s = Ct.spawnSync(r.command, r.args, r.options); return s.error = s.error || $.verifyENOENTSync(s.status, r), s; } E.exports = Pt; E.exports.spawn = Pt; E.exports.sync = ge; E.exports._parse = R4; E.exports._enoent = $; }); var be = {}; Ht(be, { ExecProcess: () => y, NonZeroExitError: () => w, exec: () => Nt, x: () => $t }); module.exports = Wt(be); var St = require_child_process(); var kt = require_path(); var Tt = require_browser2(); var h2 = require_path(); var Dt = /^path$/i; var I = { key: "PATH", value: "" }; function Kt(t) { for (let e2 in t) { if (!Object.prototype.hasOwnProperty.call(t, e2) || !Dt.test(e2)) continue; let n2 = t[e2]; return n2 ? { key: e2, value: n2 } : I; } return I; } function Mt(t, e2) { let n2 = e2.value.split(h2.delimiter), r = t, s; do n2.push((0, h2.resolve)(r, "node_modules", ".bin")), s = r, r = (0, h2.dirname)(r); while (r !== s); return { key: e2.key, value: n2.join(h2.delimiter) }; } function L(t, e2) { let n2 = { ...process.env, ...e2 }, r = Mt(t, Kt(n2)); return n2[r.key] = r.value, n2; } var j = require_stream(); var F4 = (t) => { let e2 = t.length, n2 = new j.PassThrough(), r = () => { --e2 === 0 && n2.emit("end"); }; for (let s of t) s.pipe(n2, { end: false }), s.on("end", r); return n2; }; var At = q(require_readline(), 1); var Rt = q(Ot(), 1); var w = class extends Error { result; output; get exitCode() { if (this.result.exitCode !== null) return this.result.exitCode; } constructor(e2, n2) { super(`Process exited with non-zero status (${e2.exitCode})`), this.result = e2, this.output = n2; } }; var Ee = { timeout: void 0, persist: false }; var we = { windowsHide: true }; function xe(t, e2) { return { command: (0, kt.normalize)(t), args: e2 ?? [] }; } function ve(t) { let e2 = new AbortController(); for (let n2 of t) { if (n2.aborted) return e2.abort(), n2; let r = () => { e2.abort(n2.reason); }; n2.addEventListener("abort", r, { signal: e2.signal }); } return e2.signal; } var y = class { _process; _aborted = false; _options; _command; _args; _resolveClose; _processClosed; _thrownError; get process() { return this._process; } get pid() { return this._process?.pid; } get exitCode() { if (this._process && this._process.exitCode !== null) return this._process.exitCode; } constructor(e2, n2, r) { this._options = { ...Ee, ...r }, this._command = e2, this._args = n2 ?? [], this._processClosed = new Promise((s) => { this._resolveClose = s; }); } kill(e2) { return this._process?.kill(e2) === true; } get aborted() { return this._aborted; } get killed() { return this._process?.killed === true; } pipe(e2, n2, r) { return Nt(e2, n2, { ...r, stdin: this }); } async *[Symbol.asyncIterator]() { let e2 = this._process; if (!e2) return; let n2 = []; this._streamErr && n2.push(this._streamErr), this._streamOut && n2.push(this._streamOut); let r = F4(n2), s = At.default.createInterface({ input: r }); for await (let o of s) yield o.toString(); if (await this._processClosed, e2.removeAllListeners(), this._thrownError) throw this._thrownError; if (this._options?.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new w(this); } async _waitForOutput() { let e2 = this._process; if (!e2) throw new Error("No process was started"); let n2 = "", r = ""; if (this._streamErr) for await (let o of this._streamErr) n2 += o.toString(); if (this._streamOut) for await (let o of this._streamOut) r += o.toString(); if (await this._processClosed, this._options?.stdin && await this._options.stdin, e2.removeAllListeners(), this._thrownError) throw this._thrownError; let s = { stderr: n2, stdout: r, exitCode: this.exitCode }; if (this._options.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new w(this, s); return s; } then(e2, n2) { return this._waitForOutput().then(e2, n2); } _streamOut; _streamErr; spawn() { let e2 = (0, Tt.cwd)(), n2 = this._options, r = { ...we, ...n2.nodeOptions }, s = []; this._resetState(), n2.timeout !== void 0 && s.push(AbortSignal.timeout(n2.timeout)), n2.signal !== void 0 && s.push(n2.signal), n2.persist === true && (r.detached = true), s.length > 0 && (r.signal = ve(s)), r.env = L(e2, r.env); let { command: o, args: i } = xe(this._command, this._args), a = (0, Rt._parse)(o, i, r), c = (0, St.spawn)( a.command, a.args, a.options ); if (c.stderr && (this._streamErr = c.stderr), c.stdout && (this._streamOut = c.stdout), this._process = c, c.once("error", this._onError), c.once("close", this._onClose), n2.stdin !== void 0 && c.stdin && n2.stdin.process) { let { stdout: u } = n2.stdin.process; u && u.pipe(c.stdin); } } _resetState() { this._aborted = false, this._processClosed = new Promise((e2) => { this._resolveClose = e2; }), this._thrownError = void 0; } _onError = (e2) => { if (e2.name === "AbortError" && (!(e2.cause instanceof Error) || e2.cause.name !== "TimeoutError")) { this._aborted = true; return; } this._thrownError = e2; }; _onClose = () => { this._resolveClose && this._resolveClose(); }; }; var $t = (t, e2, n2) => { let r = new y(t, e2, n2); return r.spawn(), r; }; var Nt = $t; } }); // node_modules/.pnpm/@antfu+install-pkg@0.4.1/node_modules/@antfu/install-pkg/dist/index.cjs var require_dist7 = __commonJS({ "node_modules/.pnpm/@antfu+install-pkg@0.4.1/node_modules/@antfu/install-pkg/dist/index.cjs"(exports, module) { "use strict"; var __create = Object.create; var __defProp2 = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export2 = (target, all) => { for (var name42 in all) __defProp2(target, name42, { get: all[name42], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target, mod )); var __toCommonJS2 = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod); var src_exports = {}; __export2(src_exports, { detectPackageManager: () => detectPackageManager, installPackage: () => installPackage }); module.exports = __toCommonJS2(src_exports); var import_node_process = __toESM2(require_browser2(), 1); var import_detect = require_detect(); async function detectPackageManager(cwd = import_node_process.default.cwd()) { const result = await (0, import_detect.detect)({ cwd, onUnknown(packageManager) { console.warn("[@antfu/install-pkg] Unknown packageManager:", packageManager); return void 0; } }); return result?.agent || null; } var import_node_fs = require_fs(); var import_node_process2 = __toESM2(require_browser2(), 1); var import_node_path = require_path(); var import_tinyexec = require_main(); async function installPackage(names, options = {}) { const detectedAgent = options.packageManager || await detectPackageManager(options.cwd) || "npm"; const [agent] = detectedAgent.split("@"); if (!Array.isArray(names)) names = [names]; const args = options.additionalArgs || []; if (options.preferOffline) { if (detectedAgent === "yarn@berry") args.unshift("--cached"); else args.unshift("--prefer-offline"); } if (agent === "pnpm" && (0, import_node_fs.existsSync)((0, import_node_path.resolve)(options.cwd ?? import_node_process2.default.cwd(), "pnpm-workspace.yaml"))) args.unshift("-w"); return (0, import_tinyexec.x)( agent, [ agent === "yarn" ? "add" : "install", options.dev ? "-D" : "", ...args, ...names ].filter(Boolean), { nodeOptions: { stdio: options.silent ? "ignore" : "inherit", cwd: options.cwd }, throwOnError: true } ); } } }); // node_modules/.pnpm/@antfu+utils@0.7.10/node_modules/@antfu/utils/dist/index.cjs var require_dist8 = __commonJS({ "node_modules/.pnpm/@antfu+utils@0.7.10/node_modules/@antfu/utils/dist/index.cjs"(exports) { "use strict"; function clamp(n2, min, max) { return Math.min(max, Math.max(min, n2)); } function sum(...args) { return flattenArrayable(args).reduce((a, b) => a + b, 0); } function lerp(min, max, t) { const interpolation = clamp(t, 0, 1); return min + (max - min) * interpolation; } function remap(n2, inMin, inMax, outMin, outMax) { const interpolation = (n2 - inMin) / (inMax - inMin); return lerp(outMin, outMax, interpolation); } function toArray2(array) { array = array ?? []; return Array.isArray(array) ? array : [array]; } function flattenArrayable(array) { return toArray2(array).flat(1); } function mergeArrayable(...args) { return args.flatMap((i) => toArray2(i)); } function partition(array, ...filters2) { const result = Array.from({ length: filters2.length + 1 }).fill(null).map(() => []); array.forEach((e2, idx, arr) => { let i = 0; for (const filter of filters2) { if (filter(e2, idx, arr)) { result[i].push(e2); return; } i += 1; } result[i].push(e2); }); return result; } function uniq2(array) { return Array.from(new Set(array)); } function uniqueBy2(array, equalFn) { return array.reduce((acc, cur) => { const index = acc.findIndex((item) => equalFn(cur, item)); if (index === -1) acc.push(cur); return acc; }, []); } function last(array) { return at(array, -1); } function remove(array, value) { if (!array) return false; const index = array.indexOf(value); if (index >= 0) { array.splice(index, 1); return true; } return false; } function at(array, index) { const len = array.length; if (!len) return void 0; if (index < 0) index += len; return array[index]; } function range(...args) { let start, stop, step; if (args.length === 1) { start = 0; step = 1; [stop] = args; } else { [start, stop, step = 1] = args; } const arr = []; let current = start; while (current < stop) { arr.push(current); current += step || 1; } return arr; } function move(arr, from, to) { arr.splice(to, 0, arr.splice(from, 1)[0]); return arr; } function clampArrayRange(n2, arr) { return clamp(n2, 0, arr.length - 1); } function sample(arr, quantity) { return Array.from({ length: quantity }, (_) => arr[Math.round(Math.random() * (arr.length - 1))]); } function shuffle(array) { for (let i = array.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * (i + 1)); [array[i], array[j]] = [array[j], array[i]]; } return array; } function assert(condition, message) { if (!condition) throw new Error(message); } var toString2 = (v) => Object.prototype.toString.call(v); function getTypeName(v) { if (v === null) return "null"; const type = toString2(v).slice(8, -1).toLowerCase(); return typeof v === "object" || typeof v === "function" ? type : typeof v; } function noop5() { } function isDeepEqual(value1, value2) { const type1 = getTypeName(value1); const type2 = getTypeName(value2); if (type1 !== type2) return false; if (type1 === "array") { if (value1.length !== value2.length) return false; return value1.every((item, i) => { return isDeepEqual(item, value2[i]); }); } if (type1 === "object") { const keyArr = Object.keys(value1); if (keyArr.length !== Object.keys(value2).length) return false; return keyArr.every((key) => { return isDeepEqual(value1[key], value2[key]); }); } return Object.is(value1, value2); } function notNullish(v) { return v != null; } function noNull(v) { return v !== null; } function notUndefined(v) { return v !== void 0; } function isTruthy(v) { return Boolean(v); } var isDef = (val) => typeof val !== "undefined"; var isBoolean = (val) => typeof val === "boolean"; var isFunction = (val) => typeof val === "function"; var isNumber = (val) => typeof val === "number"; var isString2 = (val) => typeof val === "string"; var isObject3 = (val) => toString2(val) === "[object Object]"; var isUndefined = (val) => toString2(val) === "[object Undefined]"; var isNull = (val) => toString2(val) === "[object Null]"; var isRegExp = (val) => toString2(val) === "[object RegExp]"; var isDate = (val) => toString2(val) === "[object Date]"; var isWindow = (val) => typeof window !== "undefined" && toString2(val) === "[object Window]"; var isBrowser = typeof window !== "undefined"; function slash(str) { return str.replace(/\\/g, "/"); } function ensurePrefix(prefix, str) { if (!str.startsWith(prefix)) return prefix + str; return str; } function ensureSuffix(suffix, str) { if (!str.endsWith(suffix)) return str + suffix; return str; } function template(str, ...args) { const [firstArg, fallback] = args; if (isObject3(firstArg)) { const vars = firstArg; return str.replace(/{([\w\d]+)}/g, (_, key) => vars[key] || ((typeof fallback === "function" ? fallback(key) : fallback) ?? key)); } else { return str.replace(/{(\d+)}/g, (_, key) => { const index = Number(key); if (Number.isNaN(index)) return key; return args[index]; }); } } var urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"; function randomStr(size = 16, dict = urlAlphabet) { let id = ""; let i = size; const len = dict.length; while (i--) id += dict[Math.random() * len | 0]; return id; } function capitalize(str) { return str[0].toUpperCase() + str.slice(1).toLowerCase(); } var _reFullWs = /^\s*$/; function unindent(str) { const lines = (typeof str === "string" ? str : str[0]).split("\n"); const whitespaceLines = lines.map((line) => _reFullWs.test(line)); const commonIndent = lines.reduce((min, line, idx) => { var _a; if (whitespaceLines[idx]) return min; const indent = (_a = line.match(/^\s*/)) == null ? void 0 : _a[0].length; return indent === void 0 ? min : Math.min(min, indent); }, Number.POSITIVE_INFINITY); let emptyLinesHead = 0; while (emptyLinesHead < lines.length && whitespaceLines[emptyLinesHead]) emptyLinesHead++; let emptyLinesTail = 0; while (emptyLinesTail < lines.length && whitespaceLines[lines.length - emptyLinesTail - 1]) emptyLinesTail++; return lines.slice(emptyLinesHead, lines.length - emptyLinesTail).map((line) => line.slice(commonIndent)).join("\n"); } var timestamp = () => +Date.now(); function batchInvoke(functions) { functions.forEach((fn) => fn && fn()); } function invoke(fn) { return fn(); } function tap(value, callback) { callback(value); return value; } function objectMap(obj, fn) { return Object.fromEntries( Object.entries(obj).map(([k, v]) => fn(k, v)).filter(notNullish) ); } function isKeyOf(obj, k) { return k in obj; } function objectKeys(obj) { return Object.keys(obj); } function objectEntries(obj) { return Object.entries(obj); } function deepMerge(target, ...sources) { if (!sources.length) return target; const source = sources.shift(); if (source === void 0) return target; if (isMergableObject(target) && isMergableObject(source)) { objectKeys(source).forEach((key) => { if (key === "__proto__" || key === "constructor" || key === "prototype") return; if (isMergableObject(source[key])) { if (!target[key]) target[key] = {}; if (isMergableObject(target[key])) { deepMerge(target[key], source[key]); } else { target[key] = source[key]; } } else { target[key] = source[key]; } }); } return deepMerge(target, ...sources); } function deepMergeWithArray(target, ...sources) { if (!sources.length) return target; const source = sources.shift(); if (source === void 0) return target; if (Array.isArray(target) && Array.isArray(source)) target.push(...source); if (isMergableObject(target) && isMergableObject(source)) { objectKeys(source).forEach((key) => { if (key === "__proto__" || key === "constructor" || key === "prototype") return; if (Array.isArray(source[key])) { if (!target[key]) target[key] = []; deepMergeWithArray(target[key], source[key]); } else if (isMergableObject(source[key])) { if (!target[key]) target[key] = {}; deepMergeWithArray(target[key], source[key]); } else { target[key] = source[key]; } }); } return deepMergeWithArray(target, ...sources); } function isMergableObject(item) { return isObject3(item) && !Array.isArray(item); } function objectPick(obj, keys, omitUndefined = false) { return keys.reduce((n2, k) => { if (k in obj) { if (!omitUndefined || obj[k] !== void 0) n2[k] = obj[k]; } return n2; }, {}); } function clearUndefined(obj) { Object.keys(obj).forEach((key) => obj[key] === void 0 ? delete obj[key] : {}); return obj; } function hasOwnProperty5(obj, v) { if (obj == null) return false; return Object.prototype.hasOwnProperty.call(obj, v); } function createSingletonPromise(fn) { let _promise; function wrapper() { if (!_promise) _promise = fn(); return _promise; } wrapper.reset = async () => { const _prev = _promise; _promise = void 0; if (_prev) await _prev; }; return wrapper; } function sleep(ms, callback) { return new Promise( (resolve) => setTimeout(async () => { await (callback == null ? void 0 : callback()); resolve(); }, ms) ); } function createPromiseLock() { const locks = []; return { async run(fn) { const p2 = fn(); locks.push(p2); try { return await p2; } finally { remove(locks, p2); } }, async wait() { await Promise.allSettled(locks); }, isWaiting() { return Boolean(locks.length); }, clear() { locks.length = 0; } }; } function createControlledPromise() { let resolve, reject; const promise = new Promise((_resolve, _reject) => { resolve = _resolve; reject = _reject; }); promise.resolve = resolve; promise.reject = reject; return promise; } function throttle(delay, callback, options) { var _ref = options || {}, _ref$noTrailing = _ref.noTrailing, noTrailing = _ref$noTrailing === void 0 ? false : _ref$noTrailing, _ref$noLeading = _ref.noLeading, noLeading = _ref$noLeading === void 0 ? false : _ref$noLeading, _ref$debounceMode = _ref.debounceMode, debounceMode = _ref$debounceMode === void 0 ? void 0 : _ref$debounceMode; var timeoutID; var cancelled = false; var lastExec = 0; function clearExistingTimeout() { if (timeoutID) { clearTimeout(timeoutID); } } function cancel(options2) { var _ref2 = options2 || {}, _ref2$upcomingOnly = _ref2.upcomingOnly, upcomingOnly = _ref2$upcomingOnly === void 0 ? false : _ref2$upcomingOnly; clearExistingTimeout(); cancelled = !upcomingOnly; } function wrapper() { for (var _len = arguments.length, arguments_ = new Array(_len), _key = 0; _key < _len; _key++) { arguments_[_key] = arguments[_key]; } var self2 = this; var elapsed = Date.now() - lastExec; if (cancelled) { return; } function exec2() { lastExec = Date.now(); callback.apply(self2, arguments_); } function clear() { timeoutID = void 0; } if (!noLeading && debounceMode && !timeoutID) { exec2(); } clearExistingTimeout(); if (debounceMode === void 0 && elapsed > delay) { if (noLeading) { lastExec = Date.now(); if (!noTrailing) { timeoutID = setTimeout(debounceMode ? clear : exec2, delay); } } else { exec2(); } } else if (noTrailing !== true) { timeoutID = setTimeout(debounceMode ? clear : exec2, debounceMode === void 0 ? delay - elapsed : delay); } } wrapper.cancel = cancel; return wrapper; } function debounce(delay, callback, options) { var _ref = options || {}, _ref$atBegin = _ref.atBegin, atBegin = _ref$atBegin === void 0 ? false : _ref$atBegin; return throttle(delay, callback, { debounceMode: atBegin !== false }); } var Node = class { value; next; constructor(value) { this.value = value; } }; var Queue = class { #head; #tail; #size; constructor() { this.clear(); } enqueue(value) { const node = new Node(value); if (this.#head) { this.#tail.next = node; this.#tail = node; } else { this.#head = node; this.#tail = node; } this.#size++; } dequeue() { const current = this.#head; if (!current) { return; } this.#head = this.#head.next; this.#size--; return current.value; } clear() { this.#head = void 0; this.#tail = void 0; this.#size = 0; } get size() { return this.#size; } *[Symbol.iterator]() { let current = this.#head; while (current) { yield current.value; current = current.next; } } }; var AsyncResource = { bind(fn, _type, thisArg) { return fn.bind(thisArg); } }; function pLimit(concurrency) { if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) { throw new TypeError("Expected `concurrency` to be a number from 1 and up"); } const queue = new Queue(); let activeCount = 0; const next = () => { activeCount--; if (queue.size > 0) { queue.dequeue()(); } }; const run = async (function_, resolve, arguments_) => { activeCount++; const result = (async () => function_(...arguments_))(); resolve(result); try { await result; } catch { } next(); }; const enqueue = (function_, resolve, arguments_) => { queue.enqueue( AsyncResource.bind(run.bind(void 0, function_, resolve, arguments_)) ); (async () => { await Promise.resolve(); if (activeCount < concurrency && queue.size > 0) { queue.dequeue()(); } })(); }; const generator = (function_, ...arguments_) => new Promise((resolve) => { enqueue(function_, resolve, arguments_); }); Object.defineProperties(generator, { activeCount: { get: () => activeCount }, pendingCount: { get: () => queue.size }, clearQueue: { value() { queue.clear(); } } }); return generator; } var VOID = Symbol("p-void"); var PInstance = class _PInstance extends Promise { constructor(items = [], options) { super(() => { }); this.items = items; this.options = options; this.promises = /* @__PURE__ */ new Set(); } get promise() { var _a; let batch; const items = [...Array.from(this.items), ...Array.from(this.promises)]; if ((_a = this.options) == null ? void 0 : _a.concurrency) { const limit = pLimit(this.options.concurrency); batch = Promise.all(items.map((p2) => limit(() => p2))); } else { batch = Promise.all(items); } return batch.then((l) => l.filter((i) => i !== VOID)); } add(...args) { args.forEach((i) => { this.promises.add(i); }); } map(fn) { return new _PInstance( Array.from(this.items).map(async (i, idx) => { const v = await i; if (v === VOID) return VOID; return fn(v, idx); }), this.options ); } filter(fn) { return new _PInstance( Array.from(this.items).map(async (i, idx) => { const v = await i; const r = await fn(v, idx); if (!r) return VOID; return v; }), this.options ); } forEach(fn) { return this.map(fn).then(); } reduce(fn, initialValue) { return this.promise.then((array) => array.reduce(fn, initialValue)); } clear() { this.promises.clear(); } then(fn) { const p2 = this.promise; if (fn) return p2.then(fn); else return p2; } catch(fn) { return this.promise.catch(fn); } finally(fn) { return this.promise.finally(fn); } }; function p(items, options) { return new PInstance(items, options); } exports.assert = assert; exports.at = at; exports.batchInvoke = batchInvoke; exports.capitalize = capitalize; exports.clamp = clamp; exports.clampArrayRange = clampArrayRange; exports.clearUndefined = clearUndefined; exports.createControlledPromise = createControlledPromise; exports.createPromiseLock = createPromiseLock; exports.createSingletonPromise = createSingletonPromise; exports.debounce = debounce; exports.deepMerge = deepMerge; exports.deepMergeWithArray = deepMergeWithArray; exports.ensurePrefix = ensurePrefix; exports.ensureSuffix = ensureSuffix; exports.flattenArrayable = flattenArrayable; exports.getTypeName = getTypeName; exports.hasOwnProperty = hasOwnProperty5; exports.invoke = invoke; exports.isBoolean = isBoolean; exports.isBrowser = isBrowser; exports.isDate = isDate; exports.isDeepEqual = isDeepEqual; exports.isDef = isDef; exports.isFunction = isFunction; exports.isKeyOf = isKeyOf; exports.isNull = isNull; exports.isNumber = isNumber; exports.isObject = isObject3; exports.isRegExp = isRegExp; exports.isString = isString2; exports.isTruthy = isTruthy; exports.isUndefined = isUndefined; exports.isWindow = isWindow; exports.last = last; exports.lerp = lerp; exports.mergeArrayable = mergeArrayable; exports.move = move; exports.noNull = noNull; exports.noop = noop5; exports.notNullish = notNullish; exports.notUndefined = notUndefined; exports.objectEntries = objectEntries; exports.objectKeys = objectKeys; exports.objectMap = objectMap; exports.objectPick = objectPick; exports.p = p; exports.partition = partition; exports.randomStr = randomStr; exports.range = range; exports.remap = remap; exports.remove = remove; exports.sample = sample; exports.shuffle = shuffle; exports.slash = slash; exports.sleep = sleep; exports.sum = sum; exports.tap = tap; exports.template = template; exports.throttle = throttle; exports.timestamp = timestamp; exports.toArray = toArray2; exports.toString = toString2; exports.unindent = unindent; exports.uniq = uniq2; exports.uniqueBy = uniqueBy2; } }); // node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/loader/warn.cjs var require_warn = __commonJS({ "node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/loader/warn.cjs"(exports) { "use strict"; var kolorist = (init_module(), __toCommonJS(module_exports)); var warned3 = /* @__PURE__ */ new Set(); function warnOnce2(msg) { if (!warned3.has(msg)) { warned3.add(msg); console.warn(kolorist.yellow(`[@iconify-loader] ${msg}`)); } } exports.warnOnce = warnOnce2; } }); // node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/loader/install-pkg.cjs var require_install_pkg = __commonJS({ "node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/loader/install-pkg.cjs"(exports) { "use strict"; var installPkg = require_dist7(); var utils = require_dist8(); var kolorist = (init_module(), __toCommonJS(module_exports)); var loader_warn = require_warn(); var pending; var tasks = {}; async function tryInstallPkg(name42, autoInstall) { if (pending) { await pending; } if (!tasks[name42]) { console.log(kolorist.cyan(`Installing ${name42}...`)); if (typeof autoInstall === "function") { tasks[name42] = pending = autoInstall(name42).then(() => utils.sleep(300)).finally(() => { pending = void 0; }); } else { tasks[name42] = pending = installPkg.installPackage(name42, { dev: true, preferOffline: true }).then(() => utils.sleep(300)).catch((e2) => { loader_warn.warnOnce(`Failed to install ${name42}`); console.error(e2); }).finally(() => { pending = void 0; }); } } return tasks[name42]; } exports.tryInstallPkg = tryInstallPkg; } }); // node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/loader/fs.cjs var require_fs2 = __commonJS({ "node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/loader/fs.cjs"(exports) { "use strict"; var fs = require_fs(); var localPkg = require_dist6(); var loader_installPkg = require_install_pkg(); var mlly = require_dist5(); require_dist7(); require_dist8(); init_module(); require_warn(); var _collections = /* @__PURE__ */ Object.create(null); var isLegacyExists = /* @__PURE__ */ Object.create(null); async function loadCollectionFromFS(name42, autoInstall = false, scope = "@iconify-json", cwd = process.cwd()) { const cache = _collections[cwd] || (_collections[cwd] = /* @__PURE__ */ Object.create(null)); if (!await cache[name42]) { cache[name42] = task(); } return cache[name42]; async function task() { const packageName = scope.length === 0 ? name42 : `${scope}/${name42}`; let jsonPath = await mlly.resolvePath(`${packageName}/icons.json`, { url: cwd }).catch(() => void 0); if (scope === "@iconify-json") { if (isLegacyExists[cwd] === void 0) { const testResult = await mlly.resolvePath( `@iconify/json/collections.json`, { url: cwd } ).catch(() => void 0); isLegacyExists[cwd] = !!testResult; } const checkLegacy = isLegacyExists[cwd]; if (!jsonPath && checkLegacy) { jsonPath = await mlly.resolvePath( `@iconify/json/json/${name42}.json`, { url: cwd } ).catch(() => void 0); } if (!jsonPath && !checkLegacy && autoInstall) { await loader_installPkg.tryInstallPkg(packageName, autoInstall); jsonPath = await mlly.resolvePath(`${packageName}/icons.json`, { url: cwd }).catch(() => void 0); } } else if (!jsonPath && autoInstall) { await loader_installPkg.tryInstallPkg(packageName, autoInstall); jsonPath = await mlly.resolvePath(`${packageName}/icons.json`, { url: cwd }).catch(() => void 0); } if (!jsonPath) { let packagePath = await mlly.resolvePath(packageName, { url: cwd }).catch(() => void 0); if (packagePath?.match(/^[a-z]:/i)) { packagePath = `file:///${packagePath}`.replace(/\\/g, "/"); } if (packagePath) { const { icons: icons2 } = await localPkg.importModule( packagePath ); if (icons2) return icons2; } } let stat; try { stat = jsonPath ? await fs.promises.lstat(jsonPath) : void 0; } catch (err) { return void 0; } if (stat?.isFile()) { return JSON.parse( await fs.promises.readFile(jsonPath, "utf8") ); } else { return void 0; } } } exports.loadCollectionFromFS = loadCollectionFromFS; } }); // node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/svg/trim.cjs var require_trim = __commonJS({ "node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/svg/trim.cjs"(exports) { "use strict"; function trimSVG2(str) { return str.replace(/(['"])\s*\n\s*([^>\\/\s])/g, "$1 $2").replace(/(["';{}><])\s*\n\s*/g, "$1").replace(/\s*\n\s*/g, " ").replace(/\s+"/g, '"').replace(/="\s+/g, '="').replace(/(\s)+\/>/g, "/>").trim(); } exports.trimSVG = trimSVG2; } }); // node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/loader/custom.cjs var require_custom = __commonJS({ "node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/loader/custom.cjs"(exports) { "use strict"; var createDebugger = require_browser(); var loader_utils = require_utils(); var svg_trim = require_trim(); require_build(); require_defaults(); require_defaults2(); require_size(); require_defs(); function _interopDefaultCompat(e2) { return e2 && typeof e2 === "object" && "default" in e2 ? e2.default : e2; } var createDebugger__default = _interopDefaultCompat(createDebugger); var debug = createDebugger__default("@iconify-loader:custom"); async function getCustomIcon2(custom, collection, icon, options) { let result; debug(`${collection}:${icon}`); try { if (typeof custom === "function") { result = await custom(icon); } else { const inline = custom[icon]; result = typeof inline === "function" ? await inline() : inline; } } catch (err) { console.warn( `Failed to load custom icon "${icon}" in "${collection}":`, err ); return; } if (result) { const cleanupIdx = result.indexOf(" 0) result = result.slice(cleanupIdx); const { transform } = options?.customizations ?? {}; result = typeof transform === "function" ? await transform(result, collection, icon) : result; if (!result.startsWith(" { const custom = options?.customCollections?.[collection]; if (custom) { if (typeof custom === "function") { let result; try { result = await custom(icon); } catch (err) { console.warn( `Failed to load custom icon "${icon}" in "${collection}":`, err ); return; } if (result) { if (typeof result === "string") { return await loader_custom.getCustomIcon( () => result, collection, icon, options ); } if ("icons" in result) { const ids = [ icon, icon.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), icon.replace(/([a-z])(\d+)/g, "$1-$2") ]; return await loader_modern.searchForIcon( result, collection, ids, options ); } } } else { return await loader_custom.getCustomIcon(custom, collection, icon, options); } } }; exports.loadIcon = loadIcon2; } }); // node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/loader/node-loader.cjs var require_node_loader = __commonJS({ "node_modules/.pnpm/@iconify+utils@2.1.33/node_modules/@iconify/utils/lib/loader/node-loader.cjs"(exports) { "use strict"; var loader_modern = require_modern(); var loader_fs = require_fs2(); var loader_warn = require_warn(); var loader_loader = require_loader(); var loader_utils = require_utils(); require_build(); require_defaults(); require_defaults2(); require_size(); require_defs(); require_get_icon(); require_merge(); require_transformations(); require_tree(); require_browser(); require_fs(); require_dist6(); require_install_pkg(); require_dist7(); require_dist8(); init_module(); require_dist5(); require_custom(); require_trim(); var loadNodeIcon = async (collection, icon, options) => { let result = await loader_loader.loadIcon(collection, icon, options); if (result) { return result; } const cwds = Array.isArray(options?.cwd) ? options.cwd : [options?.cwd]; for (let i = 0; i < cwds.length; i++) { const iconSet = await loader_fs.loadCollectionFromFS( collection, i === cwds.length - 1 ? options?.autoInstall : false, void 0, cwds[i] ); if (iconSet) { result = await loader_modern.searchForIcon( iconSet, collection, loader_utils.getPossibleIconNames(icon), options ); if (result) { return result; } } } if (options?.warn) { loader_warn.warnOnce(`failed to load ${options.warn} icon`); } }; exports.loadNodeIcon = loadNodeIcon; } }); // node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64.js var require_base64 = __commonJS({ "node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64.js"(exports) { var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""); exports.encode = function(number3) { if (0 <= number3 && number3 < intToCharMap.length) { return intToCharMap[number3]; } throw new TypeError("Must be between 0 and 63: " + number3); }; exports.decode = function(charCode) { var bigA = 65; var bigZ = 90; var littleA = 97; var littleZ = 122; var zero2 = 48; var nine = 57; var plus = 43; var slash = 47; var littleOffset = 26; var numberOffset = 52; if (bigA <= charCode && charCode <= bigZ) { return charCode - bigA; } if (littleA <= charCode && charCode <= littleZ) { return charCode - littleA + littleOffset; } if (zero2 <= charCode && charCode <= nine) { return charCode - zero2 + numberOffset; } if (charCode == plus) { return 62; } if (charCode == slash) { return 63; } return -1; }; } }); // node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64-vlq.js var require_base64_vlq = __commonJS({ "node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64-vlq.js"(exports) { var base64 = require_base64(); var VLQ_BASE_SHIFT = 5; var VLQ_BASE = 1 << VLQ_BASE_SHIFT; var VLQ_BASE_MASK = VLQ_BASE - 1; var VLQ_CONTINUATION_BIT = VLQ_BASE; function toVLQSigned(aValue) { return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0; } function fromVLQSigned(aValue) { var isNegative = (aValue & 1) === 1; var shifted = aValue >> 1; return isNegative ? -shifted : shifted; } exports.encode = function base64VLQ_encode(aValue) { var encoded = ""; var digit; var vlq = toVLQSigned(aValue); do { digit = vlq & VLQ_BASE_MASK; vlq >>>= VLQ_BASE_SHIFT; if (vlq > 0) { digit |= VLQ_CONTINUATION_BIT; } encoded += base64.encode(digit); } while (vlq > 0); return encoded; }; exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { var strLen = aStr.length; var result = 0; var shift2 = 0; var continuation, digit; do { if (aIndex >= strLen) { throw new Error("Expected more digits in base 64 VLQ value."); } digit = base64.decode(aStr.charCodeAt(aIndex++)); if (digit === -1) { throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); } continuation = !!(digit & VLQ_CONTINUATION_BIT); digit &= VLQ_BASE_MASK; result = result + (digit << shift2); shift2 += VLQ_BASE_SHIFT; } while (continuation); aOutParam.value = fromVLQSigned(result); aOutParam.rest = aIndex; }; } }); // node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/util.js var require_util = __commonJS({ "node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/util.js"(exports) { function getArg(aArgs, aName, aDefaultValue) { if (aName in aArgs) { return aArgs[aName]; } else if (arguments.length === 3) { return aDefaultValue; } else { throw new Error('"' + aName + '" is a required argument.'); } } exports.getArg = getArg; var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; var dataUrlRegexp = /^data:.+\,.+$/; function urlParse(aUrl) { var match = aUrl.match(urlRegexp); if (!match) { return null; } return { scheme: match[1], auth: match[2], host: match[3], port: match[4], path: match[5] }; } exports.urlParse = urlParse; function urlGenerate(aParsedUrl) { var url = ""; if (aParsedUrl.scheme) { url += aParsedUrl.scheme + ":"; } url += "//"; if (aParsedUrl.auth) { url += aParsedUrl.auth + "@"; } if (aParsedUrl.host) { url += aParsedUrl.host; } if (aParsedUrl.port) { url += ":" + aParsedUrl.port; } if (aParsedUrl.path) { url += aParsedUrl.path; } return url; } exports.urlGenerate = urlGenerate; var MAX_CACHED_INPUTS = 32; function lruMemoize(f) { var cache = []; return function(input) { for (var i = 0; i < cache.length; i++) { if (cache[i].input === input) { var temp = cache[0]; cache[0] = cache[i]; cache[i] = temp; return cache[0].result; } } var result = f(input); cache.unshift({ input, result }); if (cache.length > MAX_CACHED_INPUTS) { cache.pop(); } return result; }; } var normalize = lruMemoize(function normalize2(aPath) { var path = aPath; var url = urlParse(aPath); if (url) { if (!url.path) { return aPath; } path = url.path; } var isAbsolute = exports.isAbsolute(path); var parts = []; var start = 0; var i = 0; while (true) { start = i; i = path.indexOf("/", start); if (i === -1) { parts.push(path.slice(start)); break; } else { parts.push(path.slice(start, i)); while (i < path.length && path[i] === "/") { i++; } } } for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { part = parts[i]; if (part === ".") { parts.splice(i, 1); } else if (part === "..") { up++; } else if (up > 0) { if (part === "") { parts.splice(i + 1, up); up = 0; } else { parts.splice(i, 2); up--; } } } path = parts.join("/"); if (path === "") { path = isAbsolute ? "/" : "."; } if (url) { url.path = path; return urlGenerate(url); } return path; }); exports.normalize = normalize; function join(aRoot, aPath) { if (aRoot === "") { aRoot = "."; } if (aPath === "") { aPath = "."; } var aPathUrl = urlParse(aPath); var aRootUrl = urlParse(aRoot); if (aRootUrl) { aRoot = aRootUrl.path || "/"; } if (aPathUrl && !aPathUrl.scheme) { if (aRootUrl) { aPathUrl.scheme = aRootUrl.scheme; } return urlGenerate(aPathUrl); } if (aPathUrl || aPath.match(dataUrlRegexp)) { return aPath; } if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { aRootUrl.host = aPath; return urlGenerate(aRootUrl); } var joined = aPath.charAt(0) === "/" ? aPath : normalize(aRoot.replace(/\/+$/, "") + "/" + aPath); if (aRootUrl) { aRootUrl.path = joined; return urlGenerate(aRootUrl); } return joined; } exports.join = join; exports.isAbsolute = function(aPath) { return aPath.charAt(0) === "/" || urlRegexp.test(aPath); }; function relative(aRoot, aPath) { if (aRoot === "") { aRoot = "."; } aRoot = aRoot.replace(/\/$/, ""); var level = 0; while (aPath.indexOf(aRoot + "/") !== 0) { var index = aRoot.lastIndexOf("/"); if (index < 0) { return aPath; } aRoot = aRoot.slice(0, index); if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { return aPath; } ++level; } return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); } exports.relative = relative; var supportsNullProto = function() { var obj = /* @__PURE__ */ Object.create(null); return !("__proto__" in obj); }(); function identity(s) { return s; } function toSetString(aStr) { if (isProtoString(aStr)) { return "$" + aStr; } return aStr; } exports.toSetString = supportsNullProto ? identity : toSetString; function fromSetString(aStr) { if (isProtoString(aStr)) { return aStr.slice(1); } return aStr; } exports.fromSetString = supportsNullProto ? identity : fromSetString; function isProtoString(s) { if (!s) { return false; } var length2 = s.length; if (length2 < 9) { return false; } if (s.charCodeAt(length2 - 1) !== 95 || s.charCodeAt(length2 - 2) !== 95 || s.charCodeAt(length2 - 3) !== 111 || s.charCodeAt(length2 - 4) !== 116 || s.charCodeAt(length2 - 5) !== 111 || s.charCodeAt(length2 - 6) !== 114 || s.charCodeAt(length2 - 7) !== 112 || s.charCodeAt(length2 - 8) !== 95 || s.charCodeAt(length2 - 9) !== 95) { return false; } for (var i = length2 - 10; i >= 0; i--) { if (s.charCodeAt(i) !== 36) { return false; } } return true; } function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { var cmp = strcmp(mappingA.source, mappingB.source); if (cmp !== 0) { return cmp; } cmp = mappingA.originalLine - mappingB.originalLine; if (cmp !== 0) { return cmp; } cmp = mappingA.originalColumn - mappingB.originalColumn; if (cmp !== 0 || onlyCompareOriginal) { return cmp; } cmp = mappingA.generatedColumn - mappingB.generatedColumn; if (cmp !== 0) { return cmp; } cmp = mappingA.generatedLine - mappingB.generatedLine; if (cmp !== 0) { return cmp; } return strcmp(mappingA.name, mappingB.name); } exports.compareByOriginalPositions = compareByOriginalPositions; function compareByOriginalPositionsNoSource(mappingA, mappingB, onlyCompareOriginal) { var cmp; cmp = mappingA.originalLine - mappingB.originalLine; if (cmp !== 0) { return cmp; } cmp = mappingA.originalColumn - mappingB.originalColumn; if (cmp !== 0 || onlyCompareOriginal) { return cmp; } cmp = mappingA.generatedColumn - mappingB.generatedColumn; if (cmp !== 0) { return cmp; } cmp = mappingA.generatedLine - mappingB.generatedLine; if (cmp !== 0) { return cmp; } return strcmp(mappingA.name, mappingB.name); } exports.compareByOriginalPositionsNoSource = compareByOriginalPositionsNoSource; function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { var cmp = mappingA.generatedLine - mappingB.generatedLine; if (cmp !== 0) { return cmp; } cmp = mappingA.generatedColumn - mappingB.generatedColumn; if (cmp !== 0 || onlyCompareGenerated) { return cmp; } cmp = strcmp(mappingA.source, mappingB.source); if (cmp !== 0) { return cmp; } cmp = mappingA.originalLine - mappingB.originalLine; if (cmp !== 0) { return cmp; } cmp = mappingA.originalColumn - mappingB.originalColumn; if (cmp !== 0) { return cmp; } return strcmp(mappingA.name, mappingB.name); } exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; function compareByGeneratedPositionsDeflatedNoLine(mappingA, mappingB, onlyCompareGenerated) { var cmp = mappingA.generatedColumn - mappingB.generatedColumn; if (cmp !== 0 || onlyCompareGenerated) { return cmp; } cmp = strcmp(mappingA.source, mappingB.source); if (cmp !== 0) { return cmp; } cmp = mappingA.originalLine - mappingB.originalLine; if (cmp !== 0) { return cmp; } cmp = mappingA.originalColumn - mappingB.originalColumn; if (cmp !== 0) { return cmp; } return strcmp(mappingA.name, mappingB.name); } exports.compareByGeneratedPositionsDeflatedNoLine = compareByGeneratedPositionsDeflatedNoLine; function strcmp(aStr1, aStr2) { if (aStr1 === aStr2) { return 0; } if (aStr1 === null) { return 1; } if (aStr2 === null) { return -1; } if (aStr1 > aStr2) { return 1; } return -1; } function compareByGeneratedPositionsInflated(mappingA, mappingB) { var cmp = mappingA.generatedLine - mappingB.generatedLine; if (cmp !== 0) { return cmp; } cmp = mappingA.generatedColumn - mappingB.generatedColumn; if (cmp !== 0) { return cmp; } cmp = strcmp(mappingA.source, mappingB.source); if (cmp !== 0) { return cmp; } cmp = mappingA.originalLine - mappingB.originalLine; if (cmp !== 0) { return cmp; } cmp = mappingA.originalColumn - mappingB.originalColumn; if (cmp !== 0) { return cmp; } return strcmp(mappingA.name, mappingB.name); } exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; function parseSourceMapInput(str) { return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, "")); } exports.parseSourceMapInput = parseSourceMapInput; function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { sourceURL = sourceURL || ""; if (sourceRoot) { if (sourceRoot[sourceRoot.length - 1] !== "/" && sourceURL[0] !== "/") { sourceRoot += "/"; } sourceURL = sourceRoot + sourceURL; } if (sourceMapURL) { var parsed = urlParse(sourceMapURL); if (!parsed) { throw new Error("sourceMapURL could not be parsed"); } if (parsed.path) { var index = parsed.path.lastIndexOf("/"); if (index >= 0) { parsed.path = parsed.path.substring(0, index + 1); } } sourceURL = join(urlGenerate(parsed), sourceURL); } return normalize(sourceURL); } exports.computeSourceURL = computeSourceURL; } }); // node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/array-set.js var require_array_set = __commonJS({ "node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/array-set.js"(exports) { var util = require_util(); var has = Object.prototype.hasOwnProperty; var hasNativeMap = typeof Map !== "undefined"; function ArraySet() { this._array = []; this._set = hasNativeMap ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null); } ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { var set = new ArraySet(); for (var i = 0, len = aArray.length; i < len; i++) { set.add(aArray[i], aAllowDuplicates); } return set; }; ArraySet.prototype.size = function ArraySet_size() { return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; }; ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { var sStr = hasNativeMap ? aStr : util.toSetString(aStr); var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); var idx = this._array.length; if (!isDuplicate || aAllowDuplicates) { this._array.push(aStr); } if (!isDuplicate) { if (hasNativeMap) { this._set.set(aStr, idx); } else { this._set[sStr] = idx; } } }; ArraySet.prototype.has = function ArraySet_has(aStr) { if (hasNativeMap) { return this._set.has(aStr); } else { var sStr = util.toSetString(aStr); return has.call(this._set, sStr); } }; ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { if (hasNativeMap) { var idx = this._set.get(aStr); if (idx >= 0) { return idx; } } else { var sStr = util.toSetString(aStr); if (has.call(this._set, sStr)) { return this._set[sStr]; } } throw new Error('"' + aStr + '" is not in the set.'); }; ArraySet.prototype.at = function ArraySet_at(aIdx) { if (aIdx >= 0 && aIdx < this._array.length) { return this._array[aIdx]; } throw new Error("No element indexed by " + aIdx); }; ArraySet.prototype.toArray = function ArraySet_toArray() { return this._array.slice(); }; exports.ArraySet = ArraySet; } }); // node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/mapping-list.js var require_mapping_list = __commonJS({ "node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/mapping-list.js"(exports) { var util = require_util(); function generatedPositionAfter(mappingA, mappingB) { var lineA = mappingA.generatedLine; var lineB = mappingB.generatedLine; var columnA = mappingA.generatedColumn; var columnB = mappingB.generatedColumn; return lineB > lineA || lineB == lineA && columnB >= columnA || util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; } function MappingList() { this._array = []; this._sorted = true; this._last = { generatedLine: -1, generatedColumn: 0 }; } MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) { this._array.forEach(aCallback, aThisArg); }; MappingList.prototype.add = function MappingList_add(aMapping) { if (generatedPositionAfter(this._last, aMapping)) { this._last = aMapping; this._array.push(aMapping); } else { this._sorted = false; this._array.push(aMapping); } }; MappingList.prototype.toArray = function MappingList_toArray() { if (!this._sorted) { this._array.sort(util.compareByGeneratedPositionsInflated); this._sorted = true; } return this._array; }; exports.MappingList = MappingList; } }); // node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-generator.js var require_source_map_generator = __commonJS({ "node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-generator.js"(exports) { var base64VLQ = require_base64_vlq(); var util = require_util(); var ArraySet = require_array_set().ArraySet; var MappingList = require_mapping_list().MappingList; function SourceMapGenerator2(aArgs) { if (!aArgs) { aArgs = {}; } this._file = util.getArg(aArgs, "file", null); this._sourceRoot = util.getArg(aArgs, "sourceRoot", null); this._skipValidation = util.getArg(aArgs, "skipValidation", false); this._ignoreInvalidMapping = util.getArg(aArgs, "ignoreInvalidMapping", false); this._sources = new ArraySet(); this._names = new ArraySet(); this._mappings = new MappingList(); this._sourcesContents = null; } SourceMapGenerator2.prototype._version = 3; SourceMapGenerator2.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer, generatorOps) { var sourceRoot = aSourceMapConsumer.sourceRoot; var generator = new SourceMapGenerator2(Object.assign(generatorOps || {}, { file: aSourceMapConsumer.file, sourceRoot })); aSourceMapConsumer.eachMapping(function(mapping) { var newMapping = { generated: { line: mapping.generatedLine, column: mapping.generatedColumn } }; if (mapping.source != null) { newMapping.source = mapping.source; if (sourceRoot != null) { newMapping.source = util.relative(sourceRoot, newMapping.source); } newMapping.original = { line: mapping.originalLine, column: mapping.originalColumn }; if (mapping.name != null) { newMapping.name = mapping.name; } } generator.addMapping(newMapping); }); aSourceMapConsumer.sources.forEach(function(sourceFile) { var sourceRelative = sourceFile; if (sourceRoot !== null) { sourceRelative = util.relative(sourceRoot, sourceFile); } if (!generator._sources.has(sourceRelative)) { generator._sources.add(sourceRelative); } var content = aSourceMapConsumer.sourceContentFor(sourceFile); if (content != null) { generator.setSourceContent(sourceFile, content); } }); return generator; }; SourceMapGenerator2.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) { var generated = util.getArg(aArgs, "generated"); var original = util.getArg(aArgs, "original", null); var source = util.getArg(aArgs, "source", null); var name42 = util.getArg(aArgs, "name", null); if (!this._skipValidation) { if (this._validateMapping(generated, original, source, name42) === false) { return; } } if (source != null) { source = String(source); if (!this._sources.has(source)) { this._sources.add(source); } } if (name42 != null) { name42 = String(name42); if (!this._names.has(name42)) { this._names.add(name42); } } this._mappings.add({ generatedLine: generated.line, generatedColumn: generated.column, originalLine: original != null && original.line, originalColumn: original != null && original.column, source, name: name42 }); }; SourceMapGenerator2.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { var source = aSourceFile; if (this._sourceRoot != null) { source = util.relative(this._sourceRoot, source); } if (aSourceContent != null) { if (!this._sourcesContents) { this._sourcesContents = /* @__PURE__ */ Object.create(null); } this._sourcesContents[util.toSetString(source)] = aSourceContent; } else if (this._sourcesContents) { delete this._sourcesContents[util.toSetString(source)]; if (Object.keys(this._sourcesContents).length === 0) { this._sourcesContents = null; } } }; SourceMapGenerator2.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { var sourceFile = aSourceFile; if (aSourceFile == null) { if (aSourceMapConsumer.file == null) { throw new Error( `SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.` ); } sourceFile = aSourceMapConsumer.file; } var sourceRoot = this._sourceRoot; if (sourceRoot != null) { sourceFile = util.relative(sourceRoot, sourceFile); } var newSources = new ArraySet(); var newNames = new ArraySet(); this._mappings.unsortedForEach(function(mapping) { if (mapping.source === sourceFile && mapping.originalLine != null) { var original = aSourceMapConsumer.originalPositionFor({ line: mapping.originalLine, column: mapping.originalColumn }); if (original.source != null) { mapping.source = original.source; if (aSourceMapPath != null) { mapping.source = util.join(aSourceMapPath, mapping.source); } if (sourceRoot != null) { mapping.source = util.relative(sourceRoot, mapping.source); } mapping.originalLine = original.line; mapping.originalColumn = original.column; if (original.name != null) { mapping.name = original.name; } } } var source = mapping.source; if (source != null && !newSources.has(source)) { newSources.add(source); } var name42 = mapping.name; if (name42 != null && !newNames.has(name42)) { newNames.add(name42); } }, this); this._sources = newSources; this._names = newNames; aSourceMapConsumer.sources.forEach(function(sourceFile2) { var content = aSourceMapConsumer.sourceContentFor(sourceFile2); if (content != null) { if (aSourceMapPath != null) { sourceFile2 = util.join(aSourceMapPath, sourceFile2); } if (sourceRoot != null) { sourceFile2 = util.relative(sourceRoot, sourceFile2); } this.setSourceContent(sourceFile2, content); } }, this); }; SourceMapGenerator2.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) { if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") { var message = "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 (this._ignoreInvalidMapping) { if (typeof console !== "undefined" && console.warn) { console.warn(message); } return false; } else { throw new Error(message); } } if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) { return; } else if (aGenerated && "line" in aGenerated && "column" in aGenerated && aOriginal && "line" in aOriginal && "column" in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) { return; } else { var message = "Invalid mapping: " + JSON.stringify({ generated: aGenerated, source: aSource, original: aOriginal, name: aName }); if (this._ignoreInvalidMapping) { if (typeof console !== "undefined" && console.warn) { console.warn(message); } return false; } else { throw new Error(message); } } }; SourceMapGenerator2.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() { var previousGeneratedColumn = 0; var previousGeneratedLine = 1; var previousOriginalColumn = 0; var previousOriginalLine = 0; var previousName = 0; var previousSource = 0; var result = ""; var next; var mapping; var nameIdx; var sourceIdx; var mappings = this._mappings.toArray(); for (var i = 0, len = mappings.length; i < len; i++) { mapping = mappings[i]; next = ""; if (mapping.generatedLine !== previousGeneratedLine) { previousGeneratedColumn = 0; while (mapping.generatedLine !== previousGeneratedLine) { next += ";"; previousGeneratedLine++; } } else { if (i > 0) { if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { continue; } next += ","; } } next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn); previousGeneratedColumn = mapping.generatedColumn; if (mapping.source != null) { sourceIdx = this._sources.indexOf(mapping.source); next += base64VLQ.encode(sourceIdx - previousSource); previousSource = sourceIdx; next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine); previousOriginalLine = mapping.originalLine - 1; next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn); previousOriginalColumn = mapping.originalColumn; if (mapping.name != null) { nameIdx = this._names.indexOf(mapping.name); next += base64VLQ.encode(nameIdx - previousName); previousName = nameIdx; } } result += next; } return result; }; SourceMapGenerator2.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { return aSources.map(function(source) { if (!this._sourcesContents) { return null; } if (aSourceRoot != null) { source = util.relative(aSourceRoot, source); } var key = util.toSetString(source); return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null; }, this); }; SourceMapGenerator2.prototype.toJSON = function SourceMapGenerator_toJSON() { var map = { version: this._version, sources: this._sources.toArray(), names: this._names.toArray(), mappings: this._serializeMappings() }; if (this._file != null) { map.file = this._file; } if (this._sourceRoot != null) { map.sourceRoot = this._sourceRoot; } if (this._sourcesContents) { map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); } return map; }; SourceMapGenerator2.prototype.toString = function SourceMapGenerator_toString() { return JSON.stringify(this.toJSON()); }; exports.SourceMapGenerator = SourceMapGenerator2; } }); // node_modules/.pnpm/@unocss+core@0.58.9/node_modules/@unocss/core/dist/index.mjs function escapeRegExp(string) { return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); } function escapeSelector(str) { const length2 = str.length; let index = -1; let codeUnit; let result = ""; const firstCodeUnit = str.charCodeAt(0); while (++index < length2) { codeUnit = str.charCodeAt(index); if (codeUnit === 0) { result += "�"; continue; } if (codeUnit === 37) { result += "\\%"; continue; } if (codeUnit === 44) { result += "\\,"; continue; } if ( // If the character is in the range [\1-\1F] (U+0001 to U+001F) or is // U+007F, […] codeUnit >= 1 && codeUnit <= 31 || codeUnit === 127 || index === 0 && codeUnit >= 48 && codeUnit <= 57 || index === 1 && codeUnit >= 48 && codeUnit <= 57 && firstCodeUnit === 45 ) { result += `\\${codeUnit.toString(16)} `; continue; } if ( // If the character is the first character and is a `-` (U+002D), and // there is no second character, […] index === 0 && length2 === 1 && codeUnit === 45 ) { result += `\\${str.charAt(index)}`; continue; } if (codeUnit >= 128 || codeUnit === 45 || codeUnit === 95 || codeUnit >= 48 && codeUnit <= 57 || codeUnit >= 65 && codeUnit <= 90 || codeUnit >= 97 && codeUnit <= 122) { result += str.charAt(index); continue; } result += `\\${str.charAt(index)}`; } return result; } var e = escapeSelector; function toArray(value = []) { return Array.isArray(value) ? value : [value]; } function uniq(value) { return Array.from(new Set(value)); } function uniqueBy(array, equalFn) { return array.reduce((acc, cur) => { const index = acc.findIndex((item) => equalFn(cur, item)); if (index === -1) acc.push(cur); return acc; }, []); } function isString(s) { return typeof s === "string"; } function normalizeCSSEntries(obj) { if (isString(obj)) return obj; return (!Array.isArray(obj) ? Object.entries(obj) : obj).filter((i) => i[1] != null); } function normalizeCSSValues(obj) { if (Array.isArray(obj)) { if (obj.find((i) => !Array.isArray(i) || Array.isArray(i[0]))) return obj.map((i) => normalizeCSSEntries(i)); else return [obj]; } else { return [normalizeCSSEntries(obj)]; } } function clearIdenticalEntries(entry) { return entry.filter(([k, v], idx) => { if (k.startsWith("$$")) return false; for (let i = idx - 1; i >= 0; i--) { if (entry[i][0] === k && entry[i][1] === v) return false; } return true; }); } function entriesToCss(arr) { if (arr == null) return ""; return clearIdenticalEntries(arr).map(([key, value]) => value != null ? `${key}:${value};` : void 0).filter(Boolean).join(""); } function isObject(item) { return item && typeof item === "object" && !Array.isArray(item); } function mergeDeep(original, patch, mergeArray = false) { const o = original; const p = patch; if (Array.isArray(p)) { if (mergeArray && Array.isArray(p)) return [...o, ...p]; else return [...p]; } const output = { ...o }; if (isObject(o) && isObject(p)) { Object.keys(p).forEach((key) => { if (isObject(o[key]) && isObject(p[key]) || Array.isArray(o[key]) && Array.isArray(p[key])) output[key] = mergeDeep(o[key], p[key], mergeArray); else Object.assign(output, { [key]: p[key] }); }); } return output; } function clone(val) { let k, out, tmp; if (Array.isArray(val)) { out = Array(k = val.length); while (k--) out[k] = (tmp = val[k]) && typeof tmp === "object" ? clone(tmp) : tmp; return out; } if (Object.prototype.toString.call(val) === "[object Object]") { out = {}; for (k in val) { if (k === "__proto__") { Object.defineProperty(out, k, { value: clone(val[k]), configurable: true, enumerable: true, writable: true }); } else { out[k] = (tmp = val[k]) && typeof tmp === "object" ? clone(tmp) : tmp; } } return out; } return val; } function isStaticRule(rule) { return isString(rule[0]); } function isStaticShortcut(sc) { return isString(sc[0]); } var attributifyRE = /^\[(.+?)~?="(.*)"\]$/; var cssIdRE = /\.(css|postcss|sass|scss|less|stylus|styl)($|\?)/; var validateFilterRE = /[\w\u00A0-\uFFFF-_:%-?]/; var CONTROL_SHORTCUT_NO_MERGE = "$$shortcut-no-merge"; function isAttributifySelector(selector2) { return selector2.match(attributifyRE); } function isValidSelector(selector2 = "") { return validateFilterRE.test(selector2); } function normalizeVariant(variant) { return typeof variant === "function" ? { match: variant } : variant; } function isRawUtil(util) { return util.length === 3; } function notNull(value) { return value != null; } function noop() { } var __defProp$2 = Object.defineProperty; var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __publicField$2 = (obj, key, value) => { __defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value); return value; }; var TwoKeyMap = class { constructor() { __publicField$2(this, "_map", /* @__PURE__ */ new Map()); } get(key1, key2) { const m2 = this._map.get(key1); if (m2) return m2.get(key2); } getFallback(key1, key2, fallback) { let m2 = this._map.get(key1); if (!m2) { m2 = /* @__PURE__ */ new Map(); this._map.set(key1, m2); } if (!m2.has(key2)) m2.set(key2, fallback); return m2.get(key2); } set(key1, key2, value) { let m2 = this._map.get(key1); if (!m2) { m2 = /* @__PURE__ */ new Map(); this._map.set(key1, m2); } m2.set(key2, value); return this; } has(key1, key2) { return this._map.get(key1)?.has(key2); } delete(key1, key2) { return this._map.get(key1)?.delete(key2) || false; } deleteTop(key1) { return this._map.delete(key1); } map(fn) { return Array.from(this._map.entries()).flatMap(([k1, m2]) => Array.from(m2.entries()).map(([k2, v]) => { return fn(v, k1, k2); })); } }; var BetterMap = class extends Map { getFallback(key, fallback) { const v = this.get(key); if (v === void 0) { this.set(key, fallback); return fallback; } return v; } map(mapFn) { const result = []; this.forEach((v, k) => { result.push(mapFn(v, k)); }); return result; } flatMap(mapFn) { const result = []; this.forEach((v, k) => { result.push(...mapFn(v, k)); }); return result; } }; var __defProp$1 = Object.defineProperty; var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __publicField$1 = (obj, key, value) => { __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value); return value; }; var CountableSet = class extends Set { constructor(values) { super(values); __publicField$1(this, "_map"); this._map ?? (this._map = /* @__PURE__ */ new Map()); } add(key) { this._map ?? (this._map = /* @__PURE__ */ new Map()); this._map.set(key, (this._map.get(key) ?? 0) + 1); return super.add(key); } delete(key) { this._map.delete(key); return super.delete(key); } clear() { this._map.clear(); super.clear(); } getCount(key) { return this._map.get(key) ?? 0; } setCount(key, count) { this._map.set(key, count); return super.add(key); } }; function isCountableSet(value) { return value instanceof CountableSet; } function withLayer(layer, rules3) { rules3.forEach((r) => { if (!r[2]) r[2] = { layer }; else r[2].layer = layer; }); return rules3; } var regexCache = {}; function makeRegexClassGroup(separators = ["-", ":"]) { const key = separators.join("|"); if (!regexCache[key]) regexCache[key] = new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${key})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`, "gm"); regexCache[key].lastIndex = 0; return regexCache[key]; } function parseVariantGroup(str, separators = ["-", ":"], depth = 5) { const regexClassGroup = makeRegexClassGroup(separators); let hasChanged; let content = str.toString(); const prefixes = /* @__PURE__ */ new Set(); const groupsByOffset = /* @__PURE__ */ new Map(); do { hasChanged = false; content = content.replace( regexClassGroup, (from, pre, sep, body, groupOffset) => { if (!separators.includes(sep)) return from; hasChanged = true; prefixes.add(pre + sep); const bodyOffset = groupOffset + pre.length + sep.length + 1; const group = { length: from.length, items: [] }; groupsByOffset.set(groupOffset, group); for (const itemMatch of [...body.matchAll(/\S+/g)]) { const itemOffset = bodyOffset + itemMatch.index; let innerItems = groupsByOffset.get(itemOffset)?.items; if (innerItems) { groupsByOffset.delete(itemOffset); } else { innerItems = [{ offset: itemOffset, length: itemMatch[0].length, className: itemMatch[0] }]; } for (const item of innerItems) { item.className = item.className === "~" ? pre : item.className.replace(/^(!?)(.*)/, `$1${pre}${sep}$2`); group.items.push(item); } } return "$".repeat(from.length); } ); depth -= 1; } while (hasChanged && depth); let expanded; if (typeof str === "string") { expanded = ""; let prevOffset = 0; for (const [offset, group] of groupsByOffset) { expanded += str.slice(prevOffset, offset); expanded += group.items.map((item) => item.className).join(" "); prevOffset = offset + group.length; } expanded += str.slice(prevOffset); } else { expanded = str; for (const [offset, group] of groupsByOffset) { expanded.overwrite( offset, offset + group.length, group.items.map((item) => item.className).join(" ") ); } } return { prefixes: Array.from(prefixes), hasChanged, groupsByOffset, // Computed lazily because MagicString's toString does a lot of work get expanded() { return expanded.toString(); } }; } function collapseVariantGroup(str, prefixes) { const collection = /* @__PURE__ */ new Map(); const sortedPrefix = prefixes.sort((a, b) => b.length - a.length); return str.split(/\s+/g).map((part) => { const prefix = sortedPrefix.find((prefix2) => part.startsWith(prefix2)); if (!prefix) return part; const body = part.slice(prefix.length); if (collection.has(prefix)) { collection.get(prefix).push(body); return null; } else { const items = [body]; collection.set(prefix, items); return { prefix, items }; } }).filter(notNull).map((i) => { if (typeof i === "string") return i; return `${i.prefix}(${i.items.join(" ")})`; }).join(" "); } function expandVariantGroup(str, separators = ["-", ":"], depth = 5) { const res = parseVariantGroup(str, separators, depth); return typeof str === "string" ? res.expanded : str; } var warned = /* @__PURE__ */ new Set(); function warnOnce(msg) { if (warned.has(msg)) return; console.warn("[unocss]", msg); warned.add(msg); } var defaultSplitRE = /[\\:]?[\s'"`;{}]+/g; var splitWithVariantGroupRE = /([\\:]?[\s"'`;<>]|:\(|\)"|\)\s)/g; function splitCode(code2) { return code2.split(defaultSplitRE); } var extractorSplit = { name: "@unocss/core/extractor-split", order: 0, extract({ code: code2 }) { return splitCode(code2); } }; function createNanoEvents() { return { events: {}, emit(event, ...args) { (this.events[event] || []).forEach((i) => i(...args)); }, on(event, cb) { (this.events[event] = this.events[event] || []).push(cb); return () => this.events[event] = (this.events[event] || []).filter((i) => i !== cb); } }; } var LAYER_DEFAULT = "default"; var LAYER_PREFLIGHTS = "preflights"; var LAYER_SHORTCUTS = "shortcuts"; var LAYER_IMPORTS = "imports"; var DEFAULT_LAYERS = { [LAYER_IMPORTS]: -200, [LAYER_PREFLIGHTS]: -100, [LAYER_SHORTCUTS]: -10, [LAYER_DEFAULT]: 0 }; function resolveShortcuts(shortcuts2) { return toArray(shortcuts2).flatMap((s) => { if (Array.isArray(s)) return [s]; return Object.entries(s); }); } var __RESOLVED = "_uno_resolved"; function resolvePreset(presetInput) { let preset = typeof presetInput === "function" ? presetInput() : presetInput; if (__RESOLVED in preset) return preset; preset = { ...preset }; Object.defineProperty(preset, __RESOLVED, { value: true, enumerable: false }); const shortcuts2 = preset.shortcuts ? resolveShortcuts(preset.shortcuts) : void 0; preset.shortcuts = shortcuts2; if (preset.prefix || preset.layer) { const apply = (i) => { if (!i[2]) i[2] = {}; const meta = i[2]; if (meta.prefix == null && preset.prefix) meta.prefix = toArray(preset.prefix); if (meta.layer == null && preset.layer) meta.layer = preset.layer; }; shortcuts2?.forEach(apply); preset.rules?.forEach(apply); } return preset; } function resolvePresets(preset) { const root = resolvePreset(preset); if (!root.presets) return [root]; const nested = (root.presets || []).flatMap(toArray).flatMap(resolvePresets); return [root, ...nested]; } function resolveConfig(userConfig = {}, defaults = {}) { const config = Object.assign({}, defaults, userConfig); const rawPresets = uniqueBy((config.presets || []).flatMap(toArray).flatMap(resolvePresets), (a, b) => a.name === b.name); const sortedPresets = [ ...rawPresets.filter((p) => p.enforce === "pre"), ...rawPresets.filter((p) => !p.enforce), ...rawPresets.filter((p) => p.enforce === "post") ]; const sources = [ ...sortedPresets, config ]; const sourcesReversed = [...sources].reverse(); const layers = Object.assign({}, DEFAULT_LAYERS, ...sources.map((i) => i.layers)); function getMerged(key) { return uniq(sources.flatMap((p) => toArray(p[key] || []))); } const extractors = getMerged("extractors"); let extractorDefault = sourcesReversed.find((i) => i.extractorDefault !== void 0)?.extractorDefault; if (extractorDefault === void 0) extractorDefault = extractorSplit; if (extractorDefault && !extractors.includes(extractorDefault)) extractors.unshift(extractorDefault); extractors.sort((a, b) => (a.order || 0) - (b.order || 0)); const rules3 = getMerged("rules"); const rulesStaticMap = {}; const rulesSize = rules3.length; const rulesDynamic = rules3.map((rule, i) => { if (isStaticRule(rule)) { const prefixes = toArray(rule[2]?.prefix || ""); prefixes.forEach((prefix) => { rulesStaticMap[prefix + rule[0]] = [i, rule[1], rule[2], rule]; }); return void 0; } return [i, ...rule]; }).filter(Boolean).reverse(); let theme3 = mergeThemes(sources.map((p) => p.theme)); const extendThemes = getMerged("extendTheme"); for (const extendTheme of extendThemes) theme3 = extendTheme(theme3) || theme3; const autocomplete = { templates: uniq(sources.flatMap((p) => toArray(p.autocomplete?.templates))), extractors: sources.flatMap((p) => toArray(p.autocomplete?.extractors)).sort((a, b) => (a.order || 0) - (b.order || 0)), shorthands: mergeAutocompleteShorthands(sources.map((p) => p.autocomplete?.shorthands || {})) }; let separators = getMerged("separators"); if (!separators.length) separators = [":", "-"]; const resolved = { mergeSelectors: true, warn: true, sortLayers: (layers2) => layers2, ...config, blocklist: getMerged("blocklist"), presets: sortedPresets, envMode: config.envMode || "build", shortcutsLayer: config.shortcutsLayer || "shortcuts", layers, theme: theme3, rulesSize, rulesDynamic, rulesStaticMap, preprocess: getMerged("preprocess"), postprocess: getMerged("postprocess"), preflights: getMerged("preflights"), autocomplete, variants: getMerged("variants").map(normalizeVariant).sort((a, b) => (a.order || 0) - (b.order || 0)), shortcuts: resolveShortcuts(getMerged("shortcuts")).reverse(), extractors, safelist: getMerged("safelist"), separators, details: config.details ?? config.envMode === "dev" }; for (const p of sources) p?.configResolved?.(resolved); return resolved; } function mergeConfigs(configs) { const maybeArrays = ["shortcuts", "preprocess", "postprocess"]; const config = configs.map((config2) => Object.entries(config2).reduce((acc, [key, value]) => ({ ...acc, [key]: maybeArrays.includes(key) ? toArray(value) : value }), {})).reduce(({ theme: themeA, ...a }, { theme: themeB, ...b }) => { const c = mergeDeep(a, b, true); if (themeA || themeB) c.theme = mergeThemes([themeA, themeB]); return c; }, {}); return config; } function mergeThemes(themes) { return themes.map((theme3) => theme3 ? clone(theme3) : {}).reduce((a, b) => mergeDeep(a, b), {}); } function mergeAutocompleteShorthands(shorthands2) { return shorthands2.reduce((a, b) => { const rs = {}; for (const key in b) { const value = b[key]; if (Array.isArray(value)) rs[key] = `(${value.join("|")})`; else rs[key] = value; } return { ...a, ...rs }; }, {}); } function definePreset(preset) { return preset; } var version = "0.58.9"; var __defProp = Object.defineProperty; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __publicField = (obj, key, value) => { __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); return value; }; var UnoGenerator = class { constructor(userConfig = {}, defaults = {}) { this.userConfig = userConfig; this.defaults = defaults; __publicField(this, "version", version); __publicField(this, "_cache", /* @__PURE__ */ new Map()); __publicField(this, "config"); __publicField(this, "blocked", /* @__PURE__ */ new Set()); __publicField(this, "parentOrders", /* @__PURE__ */ new Map()); __publicField(this, "events", createNanoEvents()); this.config = resolveConfig(userConfig, defaults); this.events.emit("config", this.config); } setConfig(userConfig, defaults) { if (!userConfig) return; if (defaults) this.defaults = defaults; this.userConfig = userConfig; this.blocked.clear(); this.parentOrders.clear(); this._cache.clear(); this.config = resolveConfig(userConfig, this.defaults); this.events.emit("config", this.config); } async applyExtractors(code2, id, extracted = /* @__PURE__ */ new Set()) { const context = { original: code2, code: code2, id, extracted, envMode: this.config.envMode }; for (const extractor of this.config.extractors) { const result = await extractor.extract?.(context); if (!result) continue; if (isCountableSet(result) && isCountableSet(extracted)) { for (const token of result) extracted.setCount(token, extracted.getCount(token) + result.getCount(token)); } else { for (const token of result) extracted.add(token); } } return extracted; } makeContext(raw, applied) { const context = { rawSelector: raw, currentSelector: applied[1], theme: this.config.theme, generator: this, variantHandlers: applied[2], constructCSS: (...args) => this.constructCustomCSS(context, ...args), variantMatch: applied }; return context; } async parseToken(raw, alias) { if (this.blocked.has(raw)) return; const cacheKey = `${raw}${alias ? ` ${alias}` : ""}`; if (this._cache.has(cacheKey)) return this._cache.get(cacheKey); let current = raw; for (const p of this.config.preprocess) current = p(raw); if (this.isBlocked(current)) { this.blocked.add(raw); this._cache.set(cacheKey, null); return; } const applied = await this.matchVariants(raw, current); if (!applied || this.isBlocked(applied[1])) { this.blocked.add(raw); this._cache.set(cacheKey, null); return; } const context = this.makeContext(raw, [alias || applied[0], applied[1], applied[2], applied[3]]); if (this.config.details) context.variants = [...applied[3]]; const expanded = await this.expandShortcut(context.currentSelector, context); const utils = expanded ? await this.stringifyShortcuts(context.variantMatch, context, expanded[0], expanded[1]) : (await this.parseUtil(context.variantMatch, context))?.map((i) => this.stringifyUtil(i, context)).filter(notNull); if (utils?.length) { this._cache.set(cacheKey, utils); return utils; } this._cache.set(cacheKey, null); } async generate(input, options = {}) { const { id, scope, preflights: preflights2 = true, safelist = true, minify = false, extendedInfo = false } = options; const outputCssLayers = this.config.outputToCssLayers; const tokens = isString(input) ? await this.applyExtractors( input, id, extendedInfo ? new CountableSet() : /* @__PURE__ */ new Set() ) : Array.isArray(input) ? new Set(input) : input; if (safelist) { this.config.safelist.forEach((s) => { if (!tokens.has(s)) tokens.add(s); }); } const nl = minify ? "" : "\n"; const layerSet = /* @__PURE__ */ new Set([LAYER_DEFAULT]); const matched = extendedInfo ? /* @__PURE__ */ new Map() : /* @__PURE__ */ new Set(); const sheet = /* @__PURE__ */ new Map(); let preflightsMap = {}; const tokenPromises = Array.from(tokens).map(async (raw) => { if (matched.has(raw)) return; const payload = await this.parseToken(raw); if (payload == null) return; if (matched instanceof Map) { matched.set(raw, { data: payload, count: isCountableSet(tokens) ? tokens.getCount(raw) : -1 }); } else { matched.add(raw); } for (const item of payload) { const parent = item[3] || ""; const layer = item[4]?.layer; if (!sheet.has(parent)) sheet.set(parent, []); sheet.get(parent).push(item); if (layer) layerSet.add(layer); } }); await Promise.all(tokenPromises); await (async () => { if (!preflights2) return; const preflightContext = { generator: this, theme: this.config.theme }; const preflightLayerSet = /* @__PURE__ */ new Set([]); this.config.preflights.forEach(({ layer = LAYER_PREFLIGHTS }) => { layerSet.add(layer); preflightLayerSet.add(layer); }); preflightsMap = Object.fromEntries( await Promise.all(Array.from(preflightLayerSet).map( async (layer) => { const preflights22 = await Promise.all( this.config.preflights.filter((i) => (i.layer || LAYER_PREFLIGHTS) === layer).map(async (i) => await i.getCSS(preflightContext)) ); const css = preflights22.filter(Boolean).join(nl); return [layer, css]; } )) ); })(); const layers = this.config.sortLayers(Array.from(layerSet).sort((a, b) => (this.config.layers[a] ?? 0) - (this.config.layers[b] ?? 0) || a.localeCompare(b))); const layerCache = {}; const getLayer = (layer = LAYER_DEFAULT) => { if (layerCache[layer]) return layerCache[layer]; let css = Array.from(sheet).sort((a, b) => (this.parentOrders.get(a[0]) ?? 0) - (this.parentOrders.get(b[0]) ?? 0) || a[0]?.localeCompare(b[0] || "") || 0).map(([parent, items]) => { const size = items.length; const sorted = items.filter((i) => (i[4]?.layer || LAYER_DEFAULT) === layer).sort((a, b) => { return a[0] - b[0] || (a[4]?.sort || 0) - (b[4]?.sort || 0) || a[5]?.currentSelector?.localeCompare(b[5]?.currentSelector ?? "") || a[1]?.localeCompare(b[1] || "") || a[2]?.localeCompare(b[2] || "") || 0; }).map(([, selector2, body, , meta, , variantNoMerge]) => { const scopedSelector = selector2 ? applyScope(selector2, scope) : selector2; return [ [[scopedSelector ?? "", meta?.sort ?? 0]], body, !!(variantNoMerge ?? meta?.noMerge) ]; }); if (!sorted.length) return void 0; const rules3 = sorted.reverse().map(([selectorSortPair, body, noMerge], idx) => { if (!noMerge && this.config.mergeSelectors) { for (let i = idx + 1; i < size; i++) { const current = sorted[i]; if (current && !current[2] && (selectorSortPair && current[0] || selectorSortPair == null && current[0] == null) && current[1] === body) { if (selectorSortPair && current[0]) current[0].push(...selectorSortPair); return null; } } } const selectors = selectorSortPair ? uniq(selectorSortPair.sort((a, b) => a[1] - b[1] || a[0]?.localeCompare(b[0] || "") || 0).map((pair) => pair[0]).filter(Boolean)) : []; return selectors.length ? `${selectors.join(`,${nl}`)}{${body}}` : body; }).filter(Boolean).reverse().join(nl); if (!parent) return rules3; const parents = parent.split(" $$ "); return `${parents.join("{")}{${nl}${rules3}${nl}${"}".repeat(parents.length)}`; }).filter(Boolean).join(nl); if (preflights2) { css = [preflightsMap[layer], css].filter(Boolean).join(nl); } if (outputCssLayers && css) { let cssLayer = typeof outputCssLayers === "object" ? outputCssLayers.cssLayerName?.(layer) : void 0; if (cssLayer !== null) { if (!cssLayer) cssLayer = layer; css = `@layer ${cssLayer}{${nl}${css}${nl}}`; } } const layerMark = minify ? "" : `/* layer: ${layer} */${nl}`; return layerCache[layer] = css ? layerMark + css : ""; }; const getLayers = (includes = layers, excludes) => { return includes.filter((i) => !excludes?.includes(i)).map((i) => getLayer(i) || "").filter(Boolean).join(nl); }; return { get css() { return getLayers(); }, layers, matched, getLayers, getLayer }; } async matchVariants(raw, current) { const variants3 = /* @__PURE__ */ new Set(); const handlers = []; let processed = current || raw; let applied = true; const context = { rawSelector: raw, theme: this.config.theme, generator: this }; while (applied) { applied = false; for (const v of this.config.variants) { if (!v.multiPass && variants3.has(v)) continue; let handler2 = await v.match(processed, context); if (!handler2) continue; if (isString(handler2)) { if (handler2 === processed) continue; handler2 = { matcher: handler2 }; } processed = handler2.matcher; handlers.unshift(handler2); variants3.add(v); applied = true; break; } if (!applied) break; if (handlers.length > 500) throw new Error(`Too many variants applied to "${raw}"`); } return [raw, processed, handlers, variants3]; } applyVariants(parsed, variantHandlers = parsed[4], raw = parsed[1]) { const handler2 = variantHandlers.slice().sort((a, b) => (a.order || 0) - (b.order || 0)).reduceRight( (previous, v) => (input) => { const entries = v.body?.(input.entries) || input.entries; const parents = Array.isArray(v.parent) ? v.parent : [v.parent, void 0]; return (v.handle ?? defaultVariantHandler)({ ...input, entries, selector: v.selector?.(input.selector, entries) || input.selector, parent: parents[0] || input.parent, parentOrder: parents[1] || input.parentOrder, layer: v.layer || input.layer, sort: v.sort || input.sort }, previous); }, (input) => input ); const variantContextResult = handler2({ prefix: "", selector: toEscapedSelector(raw), pseudo: "", entries: parsed[2] }); const { parent, parentOrder } = variantContextResult; if (parent != null && parentOrder != null) this.parentOrders.set(parent, parentOrder); const obj = { selector: [ variantContextResult.prefix, variantContextResult.selector, variantContextResult.pseudo ].join(""), entries: variantContextResult.entries, parent, layer: variantContextResult.layer, sort: variantContextResult.sort, noMerge: variantContextResult.noMerge }; for (const p of this.config.postprocess) p(obj); return obj; } constructCustomCSS(context, body, overrideSelector) { const normalizedBody = normalizeCSSEntries(body); if (isString(normalizedBody)) return normalizedBody; const { selector: selector2, entries, parent } = this.applyVariants([0, overrideSelector || context.rawSelector, normalizedBody, void 0, context.variantHandlers]); const cssBody = `${selector2}{${entriesToCss(entries)}}`; if (parent) return `${parent}{${cssBody}}`; return cssBody; } async parseUtil(input, context, internal = false, shortcutPrefix) { const [raw, processed, variantHandlers] = isString(input) ? await this.matchVariants(input) : input; if (this.config.details) context.rules = context.rules ?? []; const staticMatch = this.config.rulesStaticMap[processed]; if (staticMatch) { if (staticMatch[1] && (internal || !staticMatch[2]?.internal)) { if (this.config.details) context.rules.push(staticMatch[3]); const index = staticMatch[0]; const entry = normalizeCSSEntries(staticMatch[1]); const meta = staticMatch[2]; if (isString(entry)) return [[index, entry, meta]]; else return [[index, raw, entry, meta, variantHandlers]]; } } context.variantHandlers = variantHandlers; const { rulesDynamic } = this.config; for (const [i, matcher, handler2, meta] of rulesDynamic) { if (meta?.internal && !internal) continue; let unprefixed = processed; if (meta?.prefix) { const prefixes = toArray(meta.prefix); if (shortcutPrefix) { const shortcutPrefixes = toArray(shortcutPrefix); if (!prefixes.some((i2) => shortcutPrefixes.includes(i2))) continue; } else { const prefix = prefixes.find((i2) => processed.startsWith(i2)); if (prefix == null) continue; unprefixed = processed.slice(prefix.length); } } const match = unprefixed.match(matcher); if (!match) continue; const result = await handler2(match, context); if (!result) continue; if (this.config.details) context.rules.push([matcher, handler2, meta]); const entries = normalizeCSSValues(result).filter((i2) => i2.length); if (entries.length) { return entries.map((e2) => { if (isString(e2)) return [i, e2, meta]; else return [i, raw, e2, meta, variantHandlers]; }); } } } stringifyUtil(parsed, context) { if (!parsed) return; if (isRawUtil(parsed)) return [parsed[0], void 0, parsed[1], void 0, parsed[2], this.config.details ? context : void 0, void 0]; const { selector: selector2, entries, parent, layer: variantLayer, sort: variantSort, noMerge } = this.applyVariants(parsed); const body = entriesToCss(entries); if (!body) return; const { layer: metaLayer, sort: metaSort, ...meta } = parsed[3] ?? {}; const ruleMeta = { ...meta, layer: variantLayer ?? metaLayer, sort: variantSort ?? metaSort }; return [parsed[0], selector2, body, parent, ruleMeta, this.config.details ? context : void 0, noMerge]; } async expandShortcut(input, context, depth = 5) { if (depth === 0) return; const recordShortcut = this.config.details ? (s) => { context.shortcuts = context.shortcuts ?? []; context.shortcuts.push(s); } : noop; let meta; let result; for (const s of this.config.shortcuts) { let unprefixed = input; if (s[2]?.prefix) { const prefixes = toArray(s[2].prefix); const prefix = prefixes.find((i) => input.startsWith(i)); if (prefix == null) continue; unprefixed = input.slice(prefix.length); } if (isStaticShortcut(s)) { if (s[0] === unprefixed) { meta = meta || s[2]; result = s[1]; recordShortcut(s); break; } } else { const match = unprefixed.match(s[0]); if (match) result = s[1](match, context); if (result) { meta = meta || s[2]; recordShortcut(s); break; } } } if (isString(result)) result = expandVariantGroup(result.trim()).split(/\s+/g); if (!result) { const [raw, inputWithoutVariant] = isString(input) ? await this.matchVariants(input) : input; if (raw !== inputWithoutVariant) { const expanded = await this.expandShortcut(inputWithoutVariant, context, depth - 1); if (expanded) result = expanded[0].map((item) => isString(item) ? raw.replace(inputWithoutVariant, item) : item); } } if (!result) return; return [ (await Promise.all(result.map(async (r) => (isString(r) ? (await this.expandShortcut(r, context, depth - 1))?.[0] : void 0) || [r]))).flat(1).filter(Boolean), meta ]; } async stringifyShortcuts(parent, context, expanded, meta = { layer: this.config.shortcutsLayer }) { const layerMap = new BetterMap(); const parsed = (await Promise.all(uniq(expanded).map(async (i) => { const result = isString(i) ? await this.parseUtil(i, context, true, meta.prefix) : [[Number.POSITIVE_INFINITY, "{inline}", normalizeCSSEntries(i), void 0, []]]; if (!result && this.config.warn) warnOnce(`unmatched utility "${i}" in shortcut "${parent[1]}"`); return result || []; }))).flat(1).filter(Boolean).sort((a, b) => a[0] - b[0]); const [raw, , parentVariants] = parent; const rawStringifiedUtil = []; for (const item of parsed) { if (isRawUtil(item)) { rawStringifiedUtil.push([item[0], void 0, item[1], void 0, item[2], context, void 0]); continue; } const { selector: selector2, entries, parent: parent2, sort, noMerge, layer } = this.applyVariants(item, [...item[4], ...parentVariants], raw); const selectorMap = layerMap.getFallback(layer ?? meta.layer, new TwoKeyMap()); const mapItem = selectorMap.getFallback(selector2, parent2, [[], item[0]]); mapItem[0].push([entries, !!(noMerge ?? item[3]?.noMerge), sort ?? 0]); } return rawStringifiedUtil.concat(layerMap.flatMap( (selectorMap, layer) => selectorMap.map(([e2, index], selector2, joinedParents) => { const stringify = (flatten, noMerge, entrySortPair) => { const maxSort = Math.max(...entrySortPair.map((e3) => e3[1])); const entriesList = entrySortPair.map((e3) => e3[0]); return (flatten ? [entriesList.flat(1)] : entriesList).map((entries) => { const body = entriesToCss(entries); if (body) return [index, selector2, body, joinedParents, { ...meta, noMerge, sort: maxSort, layer }, context, void 0]; return void 0; }); }; const merges = [ [e2.filter(([, noMerge]) => noMerge).map(([entries, , sort]) => [entries, sort]), true], [e2.filter(([, noMerge]) => !noMerge).map(([entries, , sort]) => [entries, sort]), false] ]; return merges.map(([e3, noMerge]) => [ ...stringify(false, noMerge, e3.filter(([entries]) => entries.some((entry) => entry[0] === CONTROL_SHORTCUT_NO_MERGE))), ...stringify(true, noMerge, e3.filter(([entries]) => entries.every((entry) => entry[0] !== CONTROL_SHORTCUT_NO_MERGE))) ]); }).flat(2).filter(Boolean) )); } isBlocked(raw) { return !raw || this.config.blocklist.some((e2) => typeof e2 === "function" ? e2(raw) : isString(e2) ? e2 === raw : e2.test(raw)); } }; function createGenerator(config, defaults) { return new UnoGenerator(config, defaults); } var regexScopePlaceholder = /\s\$\$\s+/g; function hasScopePlaceholder(css) { return regexScopePlaceholder.test(css); } function applyScope(css, scope) { if (hasScopePlaceholder(css)) return css.replace(regexScopePlaceholder, scope ? ` ${scope} ` : " "); else return scope ? `${scope} ${css}` : css; } var attributifyRe = /^\[(.+?)(~?=)"(.*)"\]$/; function toEscapedSelector(raw) { if (attributifyRe.test(raw)) return raw.replace(attributifyRe, (_, n2, s, i) => `[${e(n2)}${s}"${e(i)}"]`); return `.${e(raw)}`; } function defaultVariantHandler(input, next) { return next(input); } // node_modules/.pnpm/@unocss+extractor-arbitrary-variants@0.58.9/node_modules/@unocss/extractor-arbitrary-variants/dist/index.mjs var sourceMapRE = /\/\/#\s*sourceMappingURL=.*\n?/g; function removeSourceMap(code2) { if (code2.includes("sourceMappingURL=")) return code2.replace(sourceMapRE, ""); return code2; } var quotedArbitraryValuesRE = /(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g; var arbitraryPropertyRE = /\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g; var arbitraryPropertyCandidateRE = /^\[(\\\W|[\w-]){1,64}:['"]?\S{1,64}?['"]?\]$/; function splitCodeWithArbitraryVariants(code2) { const result = []; for (const match of code2.matchAll(arbitraryPropertyRE)) { if (match.index !== 0 && !/^[\s'"`]/.test(code2[match.index - 1] ?? "")) continue; result.push(match[0]); } for (const match of code2.matchAll(quotedArbitraryValuesRE)) result.push(match[0]); code2.split(defaultSplitRE).forEach((match) => { if (isValidSelector(match) && !arbitraryPropertyCandidateRE.test(match)) result.push(match); }); return result; } var extractorArbitraryVariants = { name: "@unocss/extractor-arbitrary-variants", order: 0, extract({ code: code2 }) { return splitCodeWithArbitraryVariants(removeSourceMap(code2)); } }; // node_modules/.pnpm/magic-string@0.30.14/node_modules/magic-string/dist/magic-string.es.mjs var import_sourcemap_codec = __toESM(require_sourcemap_codec_umd(), 1); var BitSet = class _BitSet { constructor(arg) { this.bits = arg instanceof _BitSet ? arg.bits.slice() : []; } add(n2) { this.bits[n2 >> 5] |= 1 << (n2 & 31); } has(n2) { return !!(this.bits[n2 >> 5] & 1 << (n2 & 31)); } }; var Chunk = class _Chunk { constructor(start, end, content) { this.start = start; this.end = end; this.original = content; this.intro = ""; this.outro = ""; this.content = content; this.storeName = false; this.edited = false; { this.previous = null; this.next = null; } } appendLeft(content) { this.outro += content; } appendRight(content) { this.intro = this.intro + content; } clone() { const chunk = new _Chunk(this.start, this.end, this.original); chunk.intro = this.intro; chunk.outro = this.outro; chunk.content = this.content; chunk.storeName = this.storeName; chunk.edited = this.edited; return chunk; } contains(index) { return this.start < index && index < this.end; } eachNext(fn) { let chunk = this; while (chunk) { fn(chunk); chunk = chunk.next; } } eachPrevious(fn) { let chunk = this; while (chunk) { fn(chunk); chunk = chunk.previous; } } edit(content, storeName, contentOnly) { this.content = content; if (!contentOnly) { this.intro = ""; this.outro = ""; } this.storeName = storeName; this.edited = true; return this; } prependLeft(content) { this.outro = content + this.outro; } prependRight(content) { this.intro = content + this.intro; } reset() { this.intro = ""; this.outro = ""; if (this.edited) { this.content = this.original; this.storeName = false; this.edited = false; } } split(index) { const sliceIndex = index - this.start; const originalBefore = this.original.slice(0, sliceIndex); const originalAfter = this.original.slice(sliceIndex); this.original = originalBefore; const newChunk = new _Chunk(index, this.end, originalAfter); newChunk.outro = this.outro; this.outro = ""; this.end = index; if (this.edited) { newChunk.edit("", false); this.content = ""; } else { this.content = originalBefore; } newChunk.next = this.next; if (newChunk.next) newChunk.next.previous = newChunk; newChunk.previous = this; this.next = newChunk; return newChunk; } toString() { return this.intro + this.content + this.outro; } trimEnd(rx) { this.outro = this.outro.replace(rx, ""); if (this.outro.length) return true; const trimmed = this.content.replace(rx, ""); if (trimmed.length) { if (trimmed !== this.content) { this.split(this.start + trimmed.length).edit("", void 0, true); if (this.edited) { this.edit(trimmed, this.storeName, true); } } return true; } else { this.edit("", void 0, true); this.intro = this.intro.replace(rx, ""); if (this.intro.length) return true; } } trimStart(rx) { this.intro = this.intro.replace(rx, ""); if (this.intro.length) return true; const trimmed = this.content.replace(rx, ""); if (trimmed.length) { if (trimmed !== this.content) { const newChunk = this.split(this.end - trimmed.length); if (this.edited) { newChunk.edit(trimmed, this.storeName, true); } this.edit("", void 0, true); } return true; } else { this.edit("", void 0, true); this.outro = this.outro.replace(rx, ""); if (this.outro.length) return true; } } }; function getBtoa() { if (typeof globalThis !== "undefined" && typeof globalThis.btoa === "function") { return (str) => globalThis.btoa(unescape(encodeURIComponent(str))); } else if (typeof Buffer === "function") { return (str) => Buffer.from(str, "utf-8").toString("base64"); } else { return () => { throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported."); }; } } var btoa = getBtoa(); var SourceMap = class { constructor(properties3) { this.version = 3; this.file = properties3.file; this.sources = properties3.sources; this.sourcesContent = properties3.sourcesContent; this.names = properties3.names; this.mappings = (0, import_sourcemap_codec.encode)(properties3.mappings); if (typeof properties3.x_google_ignoreList !== "undefined") { this.x_google_ignoreList = properties3.x_google_ignoreList; } if (typeof properties3.debugId !== "undefined") { this.debugId = properties3.debugId; } } toString() { return JSON.stringify(this); } toUrl() { return "data:application/json;charset=utf-8;base64," + btoa(this.toString()); } }; function guessIndent(code2) { const lines = code2.split("\n"); const tabbed = lines.filter((line) => /^\t+/.test(line)); const spaced = lines.filter((line) => /^ {2,}/.test(line)); if (tabbed.length === 0 && spaced.length === 0) { return null; } if (tabbed.length >= spaced.length) { return " "; } const min = spaced.reduce((previous, current) => { const numSpaces = /^ +/.exec(current)[0].length; return Math.min(numSpaces, previous); }, Infinity); return new Array(min + 1).join(" "); } function getRelativePath(from, to) { const fromParts = from.split(/[/\\]/); const toParts = to.split(/[/\\]/); fromParts.pop(); while (fromParts[0] === toParts[0]) { fromParts.shift(); toParts.shift(); } if (fromParts.length) { let i = fromParts.length; while (i--) fromParts[i] = ".."; } return fromParts.concat(toParts).join("/"); } var toString = Object.prototype.toString; function isObject2(thing) { return toString.call(thing) === "[object Object]"; } function getLocator(source) { const originalLines = source.split("\n"); const lineOffsets = []; for (let i = 0, pos = 0; i < originalLines.length; i++) { lineOffsets.push(pos); pos += originalLines[i].length + 1; } return function locate(index) { let i = 0; let j = lineOffsets.length; while (i < j) { const m = i + j >> 1; if (index < lineOffsets[m]) { j = m; } else { i = m + 1; } } const line = i - 1; const column = index - lineOffsets[line]; return { line, column }; }; } var wordRegex = /\w/; var Mappings = class { constructor(hires) { this.hires = hires; this.generatedCodeLine = 0; this.generatedCodeColumn = 0; this.raw = []; this.rawSegments = this.raw[this.generatedCodeLine] = []; this.pending = null; } addEdit(sourceIndex, content, loc, nameIndex) { if (content.length) { const contentLengthMinusOne = content.length - 1; let contentLineEnd = content.indexOf("\n", 0); let previousContentLineEnd = -1; while (contentLineEnd >= 0 && contentLengthMinusOne > contentLineEnd) { const segment2 = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; if (nameIndex >= 0) { segment2.push(nameIndex); } this.rawSegments.push(segment2); this.generatedCodeLine += 1; this.raw[this.generatedCodeLine] = this.rawSegments = []; this.generatedCodeColumn = 0; previousContentLineEnd = contentLineEnd; contentLineEnd = content.indexOf("\n", contentLineEnd + 1); } const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; if (nameIndex >= 0) { segment.push(nameIndex); } this.rawSegments.push(segment); this.advance(content.slice(previousContentLineEnd + 1)); } else if (this.pending) { this.rawSegments.push(this.pending); this.advance(content); } this.pending = null; } addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) { let originalCharIndex = chunk.start; let first = true; let charInHiresBoundary = false; while (originalCharIndex < chunk.end) { if (original[originalCharIndex] === "\n") { loc.line += 1; loc.column = 0; this.generatedCodeLine += 1; this.raw[this.generatedCodeLine] = this.rawSegments = []; this.generatedCodeColumn = 0; first = true; } else { if (this.hires || first || sourcemapLocations.has(originalCharIndex)) { const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column]; if (this.hires === "boundary") { if (wordRegex.test(original[originalCharIndex])) { if (!charInHiresBoundary) { this.rawSegments.push(segment); charInHiresBoundary = true; } } else { this.rawSegments.push(segment); charInHiresBoundary = false; } } else { this.rawSegments.push(segment); } } loc.column += 1; this.generatedCodeColumn += 1; first = false; } originalCharIndex += 1; } this.pending = null; } advance(str) { if (!str) return; const lines = str.split("\n"); if (lines.length > 1) { for (let i = 0; i < lines.length - 1; i++) { this.generatedCodeLine++; this.raw[this.generatedCodeLine] = this.rawSegments = []; } this.generatedCodeColumn = 0; } this.generatedCodeColumn += lines[lines.length - 1].length; } }; var n = "\n"; var warned2 = { insertLeft: false, insertRight: false, storeName: false }; var MagicString = class _MagicString { constructor(string, options = {}) { const chunk = new Chunk(0, string.length, string); Object.defineProperties(this, { original: { writable: true, value: string }, outro: { writable: true, value: "" }, intro: { writable: true, value: "" }, firstChunk: { writable: true, value: chunk }, lastChunk: { writable: true, value: chunk }, lastSearchedChunk: { writable: true, value: chunk }, byStart: { writable: true, value: {} }, byEnd: { writable: true, value: {} }, filename: { writable: true, value: options.filename }, indentExclusionRanges: { writable: true, value: options.indentExclusionRanges }, sourcemapLocations: { writable: true, value: new BitSet() }, storedNames: { writable: true, value: {} }, indentStr: { writable: true, value: void 0 }, ignoreList: { writable: true, value: options.ignoreList } }); this.byStart[0] = chunk; this.byEnd[string.length] = chunk; } addSourcemapLocation(char) { this.sourcemapLocations.add(char); } append(content) { if (typeof content !== "string") throw new TypeError("outro content must be a string"); this.outro += content; return this; } appendLeft(index, content) { if (typeof content !== "string") throw new TypeError("inserted content must be a string"); this._split(index); const chunk = this.byEnd[index]; if (chunk) { chunk.appendLeft(content); } else { this.intro += content; } return this; } appendRight(index, content) { if (typeof content !== "string") throw new TypeError("inserted content must be a string"); this._split(index); const chunk = this.byStart[index]; if (chunk) { chunk.appendRight(content); } else { this.outro += content; } return this; } clone() { const cloned = new _MagicString(this.original, { filename: this.filename }); let originalChunk = this.firstChunk; let clonedChunk = cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone(); while (originalChunk) { cloned.byStart[clonedChunk.start] = clonedChunk; cloned.byEnd[clonedChunk.end] = clonedChunk; const nextOriginalChunk = originalChunk.next; const nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone(); if (nextClonedChunk) { clonedChunk.next = nextClonedChunk; nextClonedChunk.previous = clonedChunk; clonedChunk = nextClonedChunk; } originalChunk = nextOriginalChunk; } cloned.lastChunk = clonedChunk; if (this.indentExclusionRanges) { cloned.indentExclusionRanges = this.indentExclusionRanges.slice(); } cloned.sourcemapLocations = new BitSet(this.sourcemapLocations); cloned.intro = this.intro; cloned.outro = this.outro; return cloned; } generateDecodedMap(options) { options = options || {}; const sourceIndex = 0; const names = Object.keys(this.storedNames); const mappings = new Mappings(options.hires); const locate = getLocator(this.original); if (this.intro) { mappings.advance(this.intro); } this.firstChunk.eachNext((chunk) => { const loc = locate(chunk.start); if (chunk.intro.length) mappings.advance(chunk.intro); if (chunk.edited) { mappings.addEdit( sourceIndex, chunk.content, loc, chunk.storeName ? names.indexOf(chunk.original) : -1 ); } else { mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations); } if (chunk.outro.length) mappings.advance(chunk.outro); }); return { file: options.file ? options.file.split(/[/\\]/).pop() : void 0, sources: [ options.source ? getRelativePath(options.file || "", options.source) : options.file || "" ], sourcesContent: options.includeContent ? [this.original] : void 0, names, mappings: mappings.raw, x_google_ignoreList: this.ignoreList ? [sourceIndex] : void 0 }; } generateMap(options) { return new SourceMap(this.generateDecodedMap(options)); } _ensureindentStr() { if (this.indentStr === void 0) { this.indentStr = guessIndent(this.original); } } _getRawIndentString() { this._ensureindentStr(); return this.indentStr; } getIndentString() { this._ensureindentStr(); return this.indentStr === null ? " " : this.indentStr; } indent(indentStr, options) { const pattern = /^[^\r\n]/gm; if (isObject2(indentStr)) { options = indentStr; indentStr = void 0; } if (indentStr === void 0) { this._ensureindentStr(); indentStr = this.indentStr || " "; } if (indentStr === "") return this; options = options || {}; const isExcluded = {}; if (options.exclude) { const exclusions = typeof options.exclude[0] === "number" ? [options.exclude] : options.exclude; exclusions.forEach((exclusion) => { for (let i = exclusion[0]; i < exclusion[1]; i += 1) { isExcluded[i] = true; } }); } let shouldIndentNextCharacter = options.indentStart !== false; const replacer = (match) => { if (shouldIndentNextCharacter) return `${indentStr}${match}`; shouldIndentNextCharacter = true; return match; }; this.intro = this.intro.replace(pattern, replacer); let charIndex = 0; let chunk = this.firstChunk; while (chunk) { const end = chunk.end; if (chunk.edited) { if (!isExcluded[charIndex]) { chunk.content = chunk.content.replace(pattern, replacer); if (chunk.content.length) { shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === "\n"; } } } else { charIndex = chunk.start; while (charIndex < end) { if (!isExcluded[charIndex]) { const char = this.original[charIndex]; if (char === "\n") { shouldIndentNextCharacter = true; } else if (char !== "\r" && shouldIndentNextCharacter) { shouldIndentNextCharacter = false; if (charIndex === chunk.start) { chunk.prependRight(indentStr); } else { this._splitChunk(chunk, charIndex); chunk = chunk.next; chunk.prependRight(indentStr); } } } charIndex += 1; } } charIndex = chunk.end; chunk = chunk.next; } this.outro = this.outro.replace(pattern, replacer); return this; } insert() { throw new Error( "magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)" ); } insertLeft(index, content) { if (!warned2.insertLeft) { console.warn( "magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead" ); warned2.insertLeft = true; } return this.appendLeft(index, content); } insertRight(index, content) { if (!warned2.insertRight) { console.warn( "magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead" ); warned2.insertRight = true; } return this.prependRight(index, content); } move(start, end, index) { if (index >= start && index <= end) throw new Error("Cannot move a selection inside itself"); this._split(start); this._split(end); this._split(index); const first = this.byStart[start]; const last = this.byEnd[end]; const oldLeft = first.previous; const oldRight = last.next; const newRight = this.byStart[index]; if (!newRight && last === this.lastChunk) return this; const newLeft = newRight ? newRight.previous : this.lastChunk; if (oldLeft) oldLeft.next = oldRight; if (oldRight) oldRight.previous = oldLeft; if (newLeft) newLeft.next = first; if (newRight) newRight.previous = last; if (!first.previous) this.firstChunk = last.next; if (!last.next) { this.lastChunk = first.previous; this.lastChunk.next = null; } first.previous = newLeft; last.next = newRight || null; if (!newLeft) this.firstChunk = first; if (!newRight) this.lastChunk = last; return this; } overwrite(start, end, content, options) { options = options || {}; return this.update(start, end, content, { ...options, overwrite: !options.contentOnly }); } update(start, end, content, options) { if (typeof content !== "string") throw new TypeError("replacement content must be a string"); if (this.original.length !== 0) { while (start < 0) start += this.original.length; while (end < 0) end += this.original.length; } if (end > this.original.length) throw new Error("end is out of bounds"); if (start === end) throw new Error( "Cannot overwrite a zero-length range – use appendLeft or prependRight instead" ); this._split(start); this._split(end); if (options === true) { if (!warned2.storeName) { console.warn( "The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string" ); warned2.storeName = true; } options = { storeName: true }; } const storeName = options !== void 0 ? options.storeName : false; const overwrite = options !== void 0 ? options.overwrite : false; if (storeName) { const original = this.original.slice(start, end); Object.defineProperty(this.storedNames, original, { writable: true, value: true, enumerable: true }); } const first = this.byStart[start]; const last = this.byEnd[end]; if (first) { let chunk = first; while (chunk !== last) { if (chunk.next !== this.byStart[chunk.end]) { throw new Error("Cannot overwrite across a split point"); } chunk = chunk.next; chunk.edit("", false); } first.edit(content, storeName, !overwrite); } else { const newChunk = new Chunk(start, end, "").edit(content, storeName); last.next = newChunk; newChunk.previous = last; } return this; } prepend(content) { if (typeof content !== "string") throw new TypeError("outro content must be a string"); this.intro = content + this.intro; return this; } prependLeft(index, content) { if (typeof content !== "string") throw new TypeError("inserted content must be a string"); this._split(index); const chunk = this.byEnd[index]; if (chunk) { chunk.prependLeft(content); } else { this.intro = content + this.intro; } return this; } prependRight(index, content) { if (typeof content !== "string") throw new TypeError("inserted content must be a string"); this._split(index); const chunk = this.byStart[index]; if (chunk) { chunk.prependRight(content); } else { this.outro = content + this.outro; } return this; } remove(start, end) { if (this.original.length !== 0) { while (start < 0) start += this.original.length; while (end < 0) end += this.original.length; } if (start === end) return this; if (start < 0 || end > this.original.length) throw new Error("Character is out of bounds"); if (start > end) throw new Error("end must be greater than start"); this._split(start); this._split(end); let chunk = this.byStart[start]; while (chunk) { chunk.intro = ""; chunk.outro = ""; chunk.edit(""); chunk = end > chunk.end ? this.byStart[chunk.end] : null; } return this; } reset(start, end) { if (this.original.length !== 0) { while (start < 0) start += this.original.length; while (end < 0) end += this.original.length; } if (start === end) return this; if (start < 0 || end > this.original.length) throw new Error("Character is out of bounds"); if (start > end) throw new Error("end must be greater than start"); this._split(start); this._split(end); let chunk = this.byStart[start]; while (chunk) { chunk.reset(); chunk = end > chunk.end ? this.byStart[chunk.end] : null; } return this; } lastChar() { if (this.outro.length) return this.outro[this.outro.length - 1]; let chunk = this.lastChunk; do { if (chunk.outro.length) return chunk.outro[chunk.outro.length - 1]; if (chunk.content.length) return chunk.content[chunk.content.length - 1]; if (chunk.intro.length) return chunk.intro[chunk.intro.length - 1]; } while (chunk = chunk.previous); if (this.intro.length) return this.intro[this.intro.length - 1]; return ""; } lastLine() { let lineIndex = this.outro.lastIndexOf(n); if (lineIndex !== -1) return this.outro.substr(lineIndex + 1); let lineStr = this.outro; let chunk = this.lastChunk; do { if (chunk.outro.length > 0) { lineIndex = chunk.outro.lastIndexOf(n); if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr; lineStr = chunk.outro + lineStr; } if (chunk.content.length > 0) { lineIndex = chunk.content.lastIndexOf(n); if (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr; lineStr = chunk.content + lineStr; } if (chunk.intro.length > 0) { lineIndex = chunk.intro.lastIndexOf(n); if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr; lineStr = chunk.intro + lineStr; } } while (chunk = chunk.previous); lineIndex = this.intro.lastIndexOf(n); if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr; return this.intro + lineStr; } slice(start = 0, end = this.original.length) { if (this.original.length !== 0) { while (start < 0) start += this.original.length; while (end < 0) end += this.original.length; } let result = ""; let chunk = this.firstChunk; while (chunk && (chunk.start > start || chunk.end <= start)) { if (chunk.start < end && chunk.end >= end) { return result; } chunk = chunk.next; } if (chunk && chunk.edited && chunk.start !== start) throw new Error(`Cannot use replaced character ${start} as slice start anchor.`); const startChunk = chunk; while (chunk) { if (chunk.intro && (startChunk !== chunk || chunk.start === start)) { result += chunk.intro; } const containsEnd = chunk.start < end && chunk.end >= end; if (containsEnd && chunk.edited && chunk.end !== end) throw new Error(`Cannot use replaced character ${end} as slice end anchor.`); const sliceStart = startChunk === chunk ? start - chunk.start : 0; const sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length; result += chunk.content.slice(sliceStart, sliceEnd); if (chunk.outro && (!containsEnd || chunk.end === end)) { result += chunk.outro; } if (containsEnd) { break; } chunk = chunk.next; } return result; } // TODO deprecate this? not really very useful snip(start, end) { const clone3 = this.clone(); clone3.remove(0, start); clone3.remove(end, clone3.original.length); return clone3; } _split(index) { if (this.byStart[index] || this.byEnd[index]) return; let chunk = this.lastSearchedChunk; const searchForward = index > chunk.end; while (chunk) { if (chunk.contains(index)) return this._splitChunk(chunk, index); chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start]; } } _splitChunk(chunk, index) { if (chunk.edited && chunk.content.length) { const loc = getLocator(this.original)(index); throw new Error( `Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")` ); } const newChunk = chunk.split(index); this.byEnd[index] = chunk; this.byStart[index] = newChunk; this.byEnd[newChunk.end] = newChunk; if (chunk === this.lastChunk) this.lastChunk = newChunk; this.lastSearchedChunk = chunk; return true; } toString() { let str = this.intro; let chunk = this.firstChunk; while (chunk) { str += chunk.toString(); chunk = chunk.next; } return str + this.outro; } isEmpty() { let chunk = this.firstChunk; do { if (chunk.intro.length && chunk.intro.trim() || chunk.content.length && chunk.content.trim() || chunk.outro.length && chunk.outro.trim()) return false; } while (chunk = chunk.next); return true; } length() { let chunk = this.firstChunk; let length2 = 0; do { length2 += chunk.intro.length + chunk.content.length + chunk.outro.length; } while (chunk = chunk.next); return length2; } trimLines() { return this.trim("[\\r\\n]"); } trim(charType) { return this.trimStart(charType).trimEnd(charType); } trimEndAborted(charType) { const rx = new RegExp((charType || "\\s") + "+$"); this.outro = this.outro.replace(rx, ""); if (this.outro.length) return true; let chunk = this.lastChunk; do { const end = chunk.end; const aborted = chunk.trimEnd(rx); if (chunk.end !== end) { if (this.lastChunk === chunk) { this.lastChunk = chunk.next; } this.byEnd[chunk.end] = chunk; this.byStart[chunk.next.start] = chunk.next; this.byEnd[chunk.next.end] = chunk.next; } if (aborted) return true; chunk = chunk.previous; } while (chunk); return false; } trimEnd(charType) { this.trimEndAborted(charType); return this; } trimStartAborted(charType) { const rx = new RegExp("^" + (charType || "\\s") + "+"); this.intro = this.intro.replace(rx, ""); if (this.intro.length) return true; let chunk = this.firstChunk; do { const end = chunk.end; const aborted = chunk.trimStart(rx); if (chunk.end !== end) { if (chunk === this.lastChunk) this.lastChunk = chunk.next; this.byEnd[chunk.end] = chunk; this.byStart[chunk.next.start] = chunk.next; this.byEnd[chunk.next.end] = chunk.next; } if (aborted) return true; chunk = chunk.next; } while (chunk); return false; } trimStart(charType) { this.trimStartAborted(charType); return this; } hasChanged() { return this.original !== this.toString(); } _replaceRegexp(searchValue, replacement) { function getReplacement(match, str) { if (typeof replacement === "string") { return replacement.replace(/\$(\$|&|\d+)/g, (_, i) => { if (i === "$") return "$"; if (i === "&") return match[0]; const num = +i; if (num < match.length) return match[+i]; return `$${i}`; }); } else { return replacement(...match, match.index, str, match.groups); } } function matchAll(re, str) { let match; const matches = []; while (match = re.exec(str)) { matches.push(match); } return matches; } if (searchValue.global) { const matches = matchAll(searchValue, this.original); matches.forEach((match) => { if (match.index != null) { const replacement2 = getReplacement(match, this.original); if (replacement2 !== match[0]) { this.overwrite( match.index, match.index + match[0].length, replacement2 ); } } }); } else { const match = this.original.match(searchValue); if (match && match.index != null) { const replacement2 = getReplacement(match, this.original); if (replacement2 !== match[0]) { this.overwrite( match.index, match.index + match[0].length, replacement2 ); } } } return this; } _replaceString(string, replacement) { const { original } = this; const index = original.indexOf(string); if (index !== -1) { this.overwrite(index, index + string.length, replacement); } return this; } replace(searchValue, replacement) { if (typeof searchValue === "string") { return this._replaceString(searchValue, replacement); } return this._replaceRegexp(searchValue, replacement); } _replaceAllString(string, replacement) { const { original } = this; const stringLength = string.length; for (let index = original.indexOf(string); index !== -1; index = original.indexOf(string, index + stringLength)) { const previous = original.slice(index, index + stringLength); if (previous !== replacement) this.overwrite(index, index + stringLength, replacement); } return this; } replaceAll(searchValue, replacement) { if (typeof searchValue === "string") { return this._replaceAllString(searchValue, replacement); } if (!searchValue.global) { throw new TypeError( "MagicString.prototype.replaceAll called with a non-global RegExp argument" ); } return this._replaceRegexp(searchValue, replacement); } }; // node_modules/.pnpm/@unocss+rule-utils@0.58.9/node_modules/@unocss/rule-utils/dist/index.mjs function getBracket(str, open, close) { if (str === "") return; const l = str.length; let parenthesis = 0; let opened = false; let openAt = 0; for (let i = 0; i < l; i++) { switch (str[i]) { case open: if (!opened) { opened = true; openAt = i; } parenthesis++; break; case close: --parenthesis; if (parenthesis < 0) return; if (parenthesis === 0) { return [ str.slice(openAt, i + 1), str.slice(i + 1), str.slice(0, openAt) ]; } break; } } } function getStringComponent(str, open, close, separators) { if (str === "") return; if (isString(separators)) separators = [separators]; if (separators.length === 0) return; const l = str.length; let parenthesis = 0; for (let i = 0; i < l; i++) { switch (str[i]) { case open: parenthesis++; break; case close: if (--parenthesis < 0) return; break; default: for (const separator of separators) { const separatorLength = separator.length; if (separatorLength && separator === str.slice(i, i + separatorLength) && parenthesis === 0) { if (i === 0 || i === l - separatorLength) return; return [ str.slice(0, i), str.slice(i + separatorLength) ]; } } } } return [ str, "" ]; } function getStringComponents(str, separators, limit) { limit = limit ?? 10; const components = []; let i = 0; while (str !== "") { if (++i > limit) return; const componentPair = getStringComponent(str, "(", ")", separators); if (!componentPair) return; const [component, rest] = componentPair; components.push(component); str = rest; } if (components.length > 0) return components; } var cssColorFunctions = ["hsl", "hsla", "hwb", "lab", "lch", "oklab", "oklch", "rgb", "rgba"]; var alphaPlaceholders = ["%alpha", ""]; var alphaPlaceholdersRE = new RegExp(alphaPlaceholders.map((v) => escapeRegExp(v)).join("|")); function parseCssColor(str = "") { const color = parseColor(str); if (color == null || color === false) return; const { type: casedType, components, alpha } = color; const type = casedType.toLowerCase(); if (components.length === 0) return; if (cssColorFunctions.includes(type) && ![1, 3].includes(components.length)) return; return { type, components: components.map((c) => typeof c === "string" ? c.trim() : c), alpha: typeof alpha === "string" ? alpha.trim() : alpha }; } function colorOpacityToString(color) { const alpha = color.alpha ?? 1; return typeof alpha === "string" && alphaPlaceholders.includes(alpha) ? 1 : alpha; } function colorToString(color, alphaOverride) { if (typeof color === "string") return color.replace(alphaPlaceholdersRE, `${alphaOverride ?? 1}`); const { components } = color; let { alpha, type } = color; alpha = alphaOverride ?? alpha; type = type.toLowerCase(); if (["hsla", "rgba"].includes(type)) return `${type}(${components.join(", ")}${alpha == null ? "" : `, ${alpha}`})`; alpha = alpha == null ? "" : ` / ${alpha}`; if (cssColorFunctions.includes(type)) return `${type}(${components.join(" ")}${alpha})`; return `color(${type} ${components.join(" ")}${alpha})`; } function parseColor(str) { if (!str) return; let color = parseHexColor(str); if (color != null) return color; color = cssColorKeyword(str); if (color != null) return color; color = parseCssCommaColorFunction(str); if (color != null) return color; color = parseCssSpaceColorFunction(str); if (color != null) return color; color = parseCssColorFunction(str); if (color != null) return color; } function parseHexColor(str) { const [, body] = str.match(/^#([\da-f]+)$/i) || []; if (!body) return; switch (body.length) { case 3: case 4: const digits = Array.from(body, (s) => Number.parseInt(s, 16)).map((n2) => n2 << 4 | n2); return { type: "rgb", components: digits.slice(0, 3), alpha: body.length === 3 ? void 0 : Math.round(digits[3] / 255 * 100) / 100 }; case 6: case 8: const value = Number.parseInt(body, 16); return { type: "rgb", components: body.length === 6 ? [value >> 16 & 255, value >> 8 & 255, value & 255] : [value >> 24 & 255, value >> 16 & 255, value >> 8 & 255], alpha: body.length === 6 ? void 0 : Math.round((value & 255) / 255 * 100) / 100 }; } } function cssColorKeyword(str) { const color = { rebeccapurple: [102, 51, 153, 1] }[str]; if (color != null) { return { type: "rgb", components: color.slice(0, 3), alpha: color[3] }; } } function parseCssCommaColorFunction(color) { const match = color.match(/^(rgb|rgba|hsl|hsla)\((.+)\)$/i); if (!match) return; const [, type, componentString] = match; const components = getStringComponents(componentString, ",", 5); if (components) { if ([3, 4].includes(components.length)) { return { type, components: components.slice(0, 3), alpha: components[3] }; } else if (components.length !== 1) { return false; } } } var cssColorFunctionsRe = new RegExp(`^(${cssColorFunctions.join("|")})\\((.+)\\)$`, "i"); function parseCssSpaceColorFunction(color) { const match = color.match(cssColorFunctionsRe); if (!match) return; const [, fn, componentString] = match; const parsed = parseCssSpaceColorValues(`${fn} ${componentString}`); if (parsed) { const { alpha, components: [type, ...components] } = parsed; return { type, components, alpha }; } } function parseCssColorFunction(color) { const match = color.match(/^color\((.+)\)$/); if (!match) return; const parsed = parseCssSpaceColorValues(match[1]); if (parsed) { const { alpha, components: [type, ...components] } = parsed; return { type, components, alpha }; } } function parseCssSpaceColorValues(componentString) { const components = getStringComponents(componentString, " "); if (!components) return; let totalComponents = components.length; if (components[totalComponents - 2] === "/") { return { components: components.slice(0, totalComponents - 2), alpha: components[totalComponents - 1] }; } if (components[totalComponents - 2] != null && (components[totalComponents - 2].endsWith("/") || components[totalComponents - 1].startsWith("/"))) { const removed = components.splice(totalComponents - 2); components.push(removed.join(" ")); --totalComponents; } const withAlpha = getStringComponents(components[totalComponents - 1], "/", 2); if (!withAlpha) return; if (withAlpha.length === 1 || withAlpha[withAlpha.length - 1] === "") return { components }; const alpha = withAlpha.pop(); components[totalComponents - 1] = withAlpha.join("/"); return { components, alpha }; } function createValueHandler(handlers) { const handler2 = function(str) { const s = this.__options?.sequence || []; this.__options.sequence = []; for (const n2 of s) { const res = handlers[n2](str); if (res != null) return res; } }; function addProcessor(that, name42) { if (!that.__options) { that.__options = { sequence: [] }; } that.__options.sequence.push(name42); return that; } for (const name42 of Object.keys(handlers)) { Object.defineProperty(handler2, name42, { enumerable: true, get() { return addProcessor(this, name42); } }); } return handler2; } function variantMatcher(name42, handler2) { let re; return { name: name42, match(input, ctx) { if (!re) re = new RegExp(`^${escapeRegExp(name42)}(?:${ctx.generator.config.separators.join("|")})`); const match = input.match(re); if (match) { return { matcher: input.slice(match[0].length), handle: (input2, next) => next({ ...input2, ...handler2(input2) }) }; } }, autocomplete: `${name42}:` }; } function variantParentMatcher(name42, parent) { let re; return { name: name42, match(input, ctx) { if (!re) re = new RegExp(`^${escapeRegExp(name42)}(?:${ctx.generator.config.separators.join("|")})`); const match = input.match(re); if (match) { return { matcher: input.slice(match[0].length), handle: (input2, next) => next({ ...input2, parent: `${input2.parent ? `${input2.parent} $$ ` : ""}${parent}` }) }; } }, autocomplete: `${name42}:` }; } function variantGetBracket(prefix, matcher, separators) { if (matcher.startsWith(`${prefix}[`)) { const [match, rest] = getBracket(matcher.slice(prefix.length), "[", "]") ?? []; if (match && rest) { for (const separator of separators) { if (rest.startsWith(separator)) return [match, rest.slice(separator.length), separator]; } return [match, rest, ""]; } } } function variantGetParameter(prefix, matcher, separators) { if (matcher.startsWith(prefix)) { const body = variantGetBracket(prefix, matcher, separators); if (body) { const [label = "", rest = body[1]] = variantGetParameter("/", body[1], separators) ?? []; return [body[0], rest, label]; } for (const separator of separators.filter((x2) => x2 !== "/")) { const pos = matcher.indexOf(separator, prefix.length); if (pos !== -1) { const labelPos = matcher.indexOf("/", prefix.length); const unlabelled = labelPos === -1 || pos <= labelPos; return [ matcher.slice(prefix.length, unlabelled ? pos : labelPos), matcher.slice(pos + separator.length), unlabelled ? "" : matcher.slice(labelPos + 1, pos) ]; } } } } var themeFnRE = /theme\(\s*['"]?(.*?)['"]?\s*\)/g; function hasThemeFn(str) { return str.includes("theme(") && str.includes(")"); } function transformThemeFn(code2, theme3, throwOnMissing = true) { const matches = Array.from(code2.toString().matchAll(themeFnRE)); if (!matches.length) return code2; const s = new MagicString(code2); for (const match of matches) { const rawArg = match[1]; if (!rawArg) throw new Error("theme() expect exact one argument, but got 0"); const [rawKey, alpha] = rawArg.split("/"); const keys = rawKey.trim().split("."); let value = keys.reduce((t, k) => t?.[k], theme3); if (typeof value === "string") { if (alpha) { const color = parseCssColor(value); if (color) value = colorToString(color, alpha); } s.overwrite( match.index, match.index + match[0].length, value ); } else if (throwOnMissing) { throw new Error(`theme of "${rawArg}" did not found`); } } return s.toString(); } // node_modules/.pnpm/@unocss+preset-mini@0.58.9/node_modules/@unocss/preset-mini/dist/shared/preset-mini.CWuOZAHF.mjs var directionMap = { "l": ["-left"], "r": ["-right"], "t": ["-top"], "b": ["-bottom"], "s": ["-inline-start"], "e": ["-inline-end"], "x": ["-left", "-right"], "y": ["-top", "-bottom"], "": [""], "bs": ["-block-start"], "be": ["-block-end"], "is": ["-inline-start"], "ie": ["-inline-end"], "block": ["-block-start", "-block-end"], "inline": ["-inline-start", "-inline-end"] }; var insetMap = { ...directionMap, s: ["-inset-inline-start"], start: ["-inset-inline-start"], e: ["-inset-inline-end"], end: ["-inset-inline-end"], bs: ["-inset-block-start"], be: ["-inset-block-end"], is: ["-inset-inline-start"], ie: ["-inset-inline-end"], block: ["-inset-block-start", "-inset-block-end"], inline: ["-inset-inline-start", "-inset-inline-end"] }; var cornerMap = { "l": ["-top-left", "-bottom-left"], "r": ["-top-right", "-bottom-right"], "t": ["-top-left", "-top-right"], "b": ["-bottom-left", "-bottom-right"], "tl": ["-top-left"], "lt": ["-top-left"], "tr": ["-top-right"], "rt": ["-top-right"], "bl": ["-bottom-left"], "lb": ["-bottom-left"], "br": ["-bottom-right"], "rb": ["-bottom-right"], "": [""], "bs": ["-start-start", "-start-end"], "be": ["-end-start", "-end-end"], "s": ["-end-start", "-start-start"], "is": ["-end-start", "-start-start"], "e": ["-start-end", "-end-end"], "ie": ["-start-end", "-end-end"], "ss": ["-start-start"], "bs-is": ["-start-start"], "is-bs": ["-start-start"], "se": ["-start-end"], "bs-ie": ["-start-end"], "ie-bs": ["-start-end"], "es": ["-end-start"], "be-is": ["-end-start"], "is-be": ["-end-start"], "ee": ["-end-end"], "be-ie": ["-end-end"], "ie-be": ["-end-end"] }; var xyzMap = { "x": ["-x"], "y": ["-y"], "z": ["-z"], "": ["-x", "-y"] }; var xyzArray = ["x", "y", "z"]; var basePositionMap = [ "top", "top center", "top left", "top right", "bottom", "bottom center", "bottom left", "bottom right", "left", "left center", "left top", "left bottom", "right", "right center", "right top", "right bottom", "center", "center top", "center bottom", "center left", "center right", "center center" ]; var positionMap = Object.assign( {}, ...basePositionMap.map((p) => ({ [p.replace(/ /, "-")]: p })), ...basePositionMap.map((p) => ({ [p.replace(/\b(\w)\w+/g, "$1").replace(/ /, "")]: p })) ); var globalKeywords = [ "inherit", "initial", "revert", "revert-layer", "unset" ]; var cssMathFnRE = /^(calc|clamp|min|max)\s*\((.+)\)(.*)/; var numberWithUnitRE = /^(-?\d*(?:\.\d+)?)(px|pt|pc|%|r?(?:em|ex|lh|cap|ch|ic)|(?:[sld]?v|cq)(?:[whib]|min|max)|in|cm|mm|rpx)?$/i; var numberRE = /^(-?\d*(?:\.\d+)?)$/i; var unitOnlyRE = /^(px|[sld]?v[wh])$/i; var unitOnlyMap = { px: 1, vw: 100, vh: 100, svw: 100, svh: 100, dvw: 100, dvh: 100, lvh: 100, lvw: 100 }; var bracketTypeRe = /^\[(color|length|size|position|quoted|string):/i; var splitComma = /,(?![^()]*\))/g; var cssProps = [ // basic props "color", "border-color", "background-color", "flex-grow", "flex", "flex-shrink", "caret-color", "font", "gap", "opacity", "visibility", "z-index", "font-weight", "zoom", "text-shadow", "transform", "box-shadow", // positions "background-position", "left", "right", "top", "bottom", "object-position", // sizes "max-height", "min-height", "max-width", "min-width", "height", "width", "border-width", "margin", "padding", "outline-width", "outline-offset", "font-size", "line-height", "text-indent", "vertical-align", "border-spacing", "letter-spacing", "word-spacing", // enhances "stroke", "filter", "backdrop-filter", "fill", "mask", "mask-size", "mask-border", "clip-path", "clip", "border-radius" ]; function round(n2) { return n2.toFixed(10).replace(/\.0+$/, "").replace(/(\.\d+?)0+$/, "$1"); } function numberWithUnit(str) { const match = str.match(numberWithUnitRE); if (!match) return; const [, n2, unit] = match; const num = Number.parseFloat(n2); if (unit && !Number.isNaN(num)) return `${round(num)}${unit}`; } function auto(str) { if (str === "auto" || str === "a") return "auto"; } function rem(str) { if (!str) return; if (unitOnlyRE.test(str)) return `${unitOnlyMap[str]}${str}`; const match = str.match(numberWithUnitRE); if (!match) return; const [, n2, unit] = match; const num = Number.parseFloat(n2); if (!Number.isNaN(num)) { if (num === 0) return "0"; return unit ? `${round(num)}${unit}` : `${round(num / 4)}rem`; } } function px(str) { if (unitOnlyRE.test(str)) return `${unitOnlyMap[str]}${str}`; const match = str.match(numberWithUnitRE); if (!match) return; const [, n2, unit] = match; const num = Number.parseFloat(n2); if (!Number.isNaN(num)) return unit ? `${round(num)}${unit}` : `${round(num)}px`; } function number(str) { if (!numberRE.test(str)) return; const num = Number.parseFloat(str); if (!Number.isNaN(num)) return round(num); } function percent(str) { if (str.endsWith("%")) str = str.slice(0, -1); if (!numberRE.test(str)) return; const num = Number.parseFloat(str); if (!Number.isNaN(num)) return `${round(num / 100)}`; } function fraction(str) { if (!str) return; if (str === "full") return "100%"; const [left, right] = str.split("/"); const num = Number.parseFloat(left) / Number.parseFloat(right); if (!Number.isNaN(num)) { if (num === 0) return "0"; return `${round(num * 100)}%`; } } function bracketWithType(str, requiredType) { if (str && str.startsWith("[") && str.endsWith("]")) { let base; let hintedType; const match = str.match(bracketTypeRe); if (!match) { base = str.slice(1, -1); } else { if (!requiredType) hintedType = match[1]; base = str.slice(match[0].length, -1); } if (!base) return; if (base === '=""') return; if (base.startsWith("--")) base = `var(${base})`; let curly = 0; for (const i of base) { if (i === "[") { curly += 1; } else if (i === "]") { curly -= 1; if (curly < 0) return; } } if (curly) return; switch (hintedType) { case "string": return base.replace(/(^|[^\\])_/g, "$1 ").replace(/\\_/g, "_"); case "quoted": return base.replace(/(^|[^\\])_/g, "$1 ").replace(/\\_/g, "_").replace(/(["\\])/g, "\\$1").replace(/^(.+)$/, '"$1"'); } return base.replace(/(url\(.*?\))/g, (v) => v.replace(/_/g, "\\_")).replace(/(^|[^\\])_/g, "$1 ").replace(/\\_/g, "_").replace(/(?:calc|clamp|max|min)\((.*)/g, (match2) => { const vars = []; return match2.replace(/var\((--.+?)[,)]/g, (match3, g1) => { vars.push(g1); return match3.replace(g1, "--un-calc"); }).replace(/(-?\d*\.?\d(?!\b-\d.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g, "$1 $2 ").replace(/--un-calc/g, () => vars.shift()); }); } } function bracket(str) { return bracketWithType(str); } function bracketOfColor(str) { return bracketWithType(str, "color"); } function bracketOfLength(str) { return bracketWithType(str, "length"); } function bracketOfPosition(str) { return bracketWithType(str, "position"); } function cssvar(str) { if (/^\$[^\s'"`;{}]/.test(str)) { const [name42, defaultValue] = str.slice(1).split(","); return `var(--${escapeSelector(name42)}${defaultValue ? `, ${defaultValue}` : ""})`; } } function time(str) { const match = str.match(/^(-?[0-9.]+)(s|ms)?$/i); if (!match) return; const [, n2, unit] = match; const num = Number.parseFloat(n2); if (!Number.isNaN(num)) { if (num === 0 && !unit) return "0s"; return unit ? `${round(num)}${unit}` : `${round(num)}ms`; } } function degree(str) { const match = str.match(/^(-?[0-9.]+)(deg|rad|grad|turn)?$/i); if (!match) return; const [, n2, unit] = match; const num = Number.parseFloat(n2); if (!Number.isNaN(num)) { if (num === 0) return "0"; return unit ? `${round(num)}${unit}` : `${round(num)}deg`; } } function global2(str) { if (globalKeywords.includes(str)) return str; } function properties(str) { if (str.split(",").every((prop) => cssProps.includes(prop))) return str; } function position(str) { if (["top", "left", "right", "bottom", "center"].includes(str)) return str; } var valueHandlers = { __proto__: null, auto, bracket, bracketOfColor, bracketOfLength, bracketOfPosition, cssvar, degree, fraction, global: global2, number, numberWithUnit, percent, position, properties, px, rem, time }; var handler = createValueHandler(valueHandlers); var h = handler; var CONTROL_MINI_NO_NEGATIVE = "$$mini-no-negative"; function directionSize(propertyPrefix) { return ([_, direction, size], { theme: theme3 }) => { const v = theme3.spacing?.[size || "DEFAULT"] ?? h.bracket.cssvar.global.auto.fraction.rem(size); if (v != null) return directionMap[direction].map((i) => [`${propertyPrefix}${i}`, v]); }; } function getThemeColorForKey(theme3, colors2, key = "colors") { let obj = theme3[key]; let index = -1; for (const c of colors2) { index += 1; if (obj && typeof obj !== "string") { const camel = colors2.slice(index).join("-").replace(/(-[a-z])/g, (n2) => n2.slice(1).toUpperCase()); if (obj[camel]) return obj[camel]; if (obj[c]) { obj = obj[c]; continue; } } return void 0; } return obj; } function getThemeColor(theme3, colors2, key) { return getThemeColorForKey(theme3, colors2, key) || getThemeColorForKey(theme3, colors2, "colors"); } function splitShorthand(body, type) { const [front, rest] = getStringComponent(body, "[", "]", ["/", ":"]) ?? []; if (front != null) { const match = (front.match(bracketTypeRe) ?? [])[1]; if (match == null || match === type) return [front, rest]; } } function parseColor2(body, theme3, key) { const split = splitShorthand(body, "color"); if (!split) return; const [main, opacity2] = split; const colors2 = main.replace(/([a-z])([0-9])/g, "$1-$2").split(/-/g); const [name42] = colors2; if (!name42) return; let color; const bracket2 = h.bracketOfColor(main); const bracketOrMain = bracket2 || main; if (h.numberWithUnit(bracketOrMain)) return; if (/^#[\da-fA-F]+$/.test(bracketOrMain)) color = bracketOrMain; else if (/^hex-[\da-fA-F]+$/.test(bracketOrMain)) color = `#${bracketOrMain.slice(4)}`; else if (main.startsWith("$")) color = h.cssvar(main); color = color || bracket2; if (!color) { const colorData = getThemeColor(theme3, [main], key); if (typeof colorData === "string") color = colorData; } let no = "DEFAULT"; if (!color) { let colorData; const [scale] = colors2.slice(-1); if (/^\d+$/.test(scale)) { no = scale; colorData = getThemeColor(theme3, colors2.slice(0, -1), key); if (!colorData || typeof colorData === "string") color = void 0; else color = colorData[no]; } else { colorData = getThemeColor(theme3, colors2, key); if (!colorData && colors2.length <= 2) { [, no = no] = colors2; colorData = getThemeColor(theme3, [name42], key); } if (typeof colorData === "string") color = colorData; else if (no && colorData) color = colorData[no]; } } return { opacity: opacity2, name: name42, no, color, cssColor: parseCssColor(color), alpha: h.bracket.cssvar.percent(opacity2 ?? "") }; } function colorResolver(property2, varName, key, shouldPass) { return ([, body], { theme: theme3 }) => { const data = parseColor2(body, theme3, key); if (!data) return; const { alpha, color, cssColor } = data; const css = {}; if (cssColor) { if (alpha != null) { css[property2] = colorToString(cssColor, alpha); } else { const opacityVar = `--un-${varName}-opacity`; const result = colorToString(cssColor, `var(${opacityVar})`); if (result.includes(opacityVar)) css[opacityVar] = colorOpacityToString(cssColor); css[property2] = result; } } else if (color) { if (alpha != null) { css[property2] = colorToString(color, alpha); } else { const opacityVar = `--un-${varName}-opacity`; const result = colorToString(color, `var(${opacityVar})`); if (result.includes(opacityVar)) css[opacityVar] = 1; css[property2] = result; } } if (shouldPass?.(css) !== false) return css; }; } function colorableShadows(shadows, colorVar) { const colored = []; shadows = toArray(shadows); for (let i = 0; i < shadows.length; i++) { const components = getStringComponents(shadows[i], " ", 6); if (!components || components.length < 3) return shadows; let isInset = false; const pos = components.indexOf("inset"); if (pos !== -1) { components.splice(pos, 1); isInset = true; } let colorVarValue = ""; if (parseCssColor(components.at(0))) { const color = parseCssColor(components.shift()); if (color) colorVarValue = `, ${colorToString(color)}`; } else if (parseCssColor(components.at(-1))) { const color = parseCssColor(components.pop()); if (color) colorVarValue = `, ${colorToString(color)}`; } colored.push(`${isInset ? "inset " : ""}${components.join(" ")} var(${colorVar}${colorVarValue})`); } return colored; } function hasParseableColor(color, theme3, key) { return color != null && !!parseColor2(color, theme3, key)?.color; } function resolveBreakpoints({ theme: theme3, generator }, key = "breakpoints") { let breakpoints2; if (generator.userConfig && generator.userConfig.theme) breakpoints2 = generator.userConfig.theme[key]; if (!breakpoints2) breakpoints2 = theme3[key]; return breakpoints2 ? Object.entries(breakpoints2).sort((a, b) => Number.parseInt(a[1].replace(/[a-z]+/gi, "")) - Number.parseInt(b[1].replace(/[a-z]+/gi, ""))).map(([point, size]) => ({ point, size })) : void 0; } function makeGlobalStaticRules(prefix, property2) { return globalKeywords.map((keyword2) => [`${prefix}-${keyword2}`, { [property2 ?? prefix]: keyword2 }]); } function isCSSMathFn(value) { return value != null && cssMathFnRE.test(value); } function isSize(str) { if (str[0] === "[" && str.slice(-1) === "]") str = str.slice(1, -1); return cssMathFnRE.test(str) || numberWithUnitRE.test(str); } function transformXYZ(d, v, name42) { const values = v.split(splitComma); if (d || !d && values.length === 1) return xyzMap[d].map((i) => [`--un-${name42}${i}`, v]); return values.map((v2, i) => [`--un-${name42}-${xyzArray[i]}`, v2]); } // node_modules/.pnpm/@unocss+preset-mini@0.58.9/node_modules/@unocss/preset-mini/dist/colors.mjs var colors = { inherit: "inherit", current: "currentColor", transparent: "transparent", black: "#000", white: "#fff", rose: { 50: "#fff1f2", 100: "#ffe4e6", 200: "#fecdd3", 300: "#fda4af", 400: "#fb7185", 500: "#f43f5e", 600: "#e11d48", 700: "#be123c", 800: "#9f1239", 900: "#881337", 950: "#4c0519" }, pink: { 50: "#fdf2f8", 100: "#fce7f3", 200: "#fbcfe8", 300: "#f9a8d4", 400: "#f472b6", 500: "#ec4899", 600: "#db2777", 700: "#be185d", 800: "#9d174d", 900: "#831843", 950: "#500724" }, fuchsia: { 50: "#fdf4ff", 100: "#fae8ff", 200: "#f5d0fe", 300: "#f0abfc", 400: "#e879f9", 500: "#d946ef", 600: "#c026d3", 700: "#a21caf", 800: "#86198f", 900: "#701a75", 950: "#4a044e" }, purple: { 50: "#faf5ff", 100: "#f3e8ff", 200: "#e9d5ff", 300: "#d8b4fe", 400: "#c084fc", 500: "#a855f7", 600: "#9333ea", 700: "#7e22ce", 800: "#6b21a8", 900: "#581c87", 950: "#3b0764" }, violet: { 50: "#f5f3ff", 100: "#ede9fe", 200: "#ddd6fe", 300: "#c4b5fd", 400: "#a78bfa", 500: "#8b5cf6", 600: "#7c3aed", 700: "#6d28d9", 800: "#5b21b6", 900: "#4c1d95", 950: "#2e1065" }, indigo: { 50: "#eef2ff", 100: "#e0e7ff", 200: "#c7d2fe", 300: "#a5b4fc", 400: "#818cf8", 500: "#6366f1", 600: "#4f46e5", 700: "#4338ca", 800: "#3730a3", 900: "#312e81", 950: "#1e1b4b" }, blue: { 50: "#eff6ff", 100: "#dbeafe", 200: "#bfdbfe", 300: "#93c5fd", 400: "#60a5fa", 500: "#3b82f6", 600: "#2563eb", 700: "#1d4ed8", 800: "#1e40af", 900: "#1e3a8a", 950: "#172554" }, sky: { 50: "#f0f9ff", 100: "#e0f2fe", 200: "#bae6fd", 300: "#7dd3fc", 400: "#38bdf8", 500: "#0ea5e9", 600: "#0284c7", 700: "#0369a1", 800: "#075985", 900: "#0c4a6e", 950: "#082f49" }, cyan: { 50: "#ecfeff", 100: "#cffafe", 200: "#a5f3fc", 300: "#67e8f9", 400: "#22d3ee", 500: "#06b6d4", 600: "#0891b2", 700: "#0e7490", 800: "#155e75", 900: "#164e63", 950: "#083344" }, teal: { 50: "#f0fdfa", 100: "#ccfbf1", 200: "#99f6e4", 300: "#5eead4", 400: "#2dd4bf", 500: "#14b8a6", 600: "#0d9488", 700: "#0f766e", 800: "#115e59", 900: "#134e4a", 950: "#042f2e" }, emerald: { 50: "#ecfdf5", 100: "#d1fae5", 200: "#a7f3d0", 300: "#6ee7b7", 400: "#34d399", 500: "#10b981", 600: "#059669", 700: "#047857", 800: "#065f46", 900: "#064e3b", 950: "#022c22" }, green: { 50: "#f0fdf4", 100: "#dcfce7", 200: "#bbf7d0", 300: "#86efac", 400: "#4ade80", 500: "#22c55e", 600: "#16a34a", 700: "#15803d", 800: "#166534", 900: "#14532d", 950: "#052e16" }, lime: { 50: "#f7fee7", 100: "#ecfccb", 200: "#d9f99d", 300: "#bef264", 400: "#a3e635", 500: "#84cc16", 600: "#65a30d", 700: "#4d7c0f", 800: "#3f6212", 900: "#365314", 950: "#1a2e05" }, yellow: { 50: "#fefce8", 100: "#fef9c3", 200: "#fef08a", 300: "#fde047", 400: "#facc15", 500: "#eab308", 600: "#ca8a04", 700: "#a16207", 800: "#854d0e", 900: "#713f12", 950: "#422006" }, amber: { 50: "#fffbeb", 100: "#fef3c7", 200: "#fde68a", 300: "#fcd34d", 400: "#fbbf24", 500: "#f59e0b", 600: "#d97706", 700: "#b45309", 800: "#92400e", 900: "#78350f", 950: "#451a03" }, orange: { 50: "#fff7ed", 100: "#ffedd5", 200: "#fed7aa", 300: "#fdba74", 400: "#fb923c", 500: "#f97316", 600: "#ea580c", 700: "#c2410c", 800: "#9a3412", 900: "#7c2d12", 950: "#431407" }, red: { 50: "#fef2f2", 100: "#fee2e2", 200: "#fecaca", 300: "#fca5a5", 400: "#f87171", 500: "#ef4444", 600: "#dc2626", 700: "#b91c1c", 800: "#991b1b", 900: "#7f1d1d", 950: "#450a0a" }, gray: { 50: "#f9fafb", 100: "#f3f4f6", 200: "#e5e7eb", 300: "#d1d5db", 400: "#9ca3af", 500: "#6b7280", 600: "#4b5563", 700: "#374151", 800: "#1f2937", 900: "#111827", 950: "#030712" }, slate: { 50: "#f8fafc", 100: "#f1f5f9", 200: "#e2e8f0", 300: "#cbd5e1", 400: "#94a3b8", 500: "#64748b", 600: "#475569", 700: "#334155", 800: "#1e293b", 900: "#0f172a", 950: "#020617" }, zinc: { 50: "#fafafa", 100: "#f4f4f5", 200: "#e4e4e7", 300: "#d4d4d8", 400: "#a1a1aa", 500: "#71717a", 600: "#52525b", 700: "#3f3f46", 800: "#27272a", 900: "#18181b", 950: "#09090b" }, neutral: { 50: "#fafafa", 100: "#f5f5f5", 200: "#e5e5e5", 300: "#d4d4d4", 400: "#a3a3a3", 500: "#737373", 600: "#525252", 700: "#404040", 800: "#262626", 900: "#171717", 950: "#0a0a0a" }, stone: { 50: "#fafaf9", 100: "#f5f5f4", 200: "#e7e5e4", 300: "#d6d3d1", 400: "#a8a29e", 500: "#78716c", 600: "#57534e", 700: "#44403c", 800: "#292524", 900: "#1c1917", 950: "#0c0a09" }, light: { 50: "#fdfdfd", 100: "#fcfcfc", 200: "#fafafa", 300: "#f8f9fa", 400: "#f6f6f6", 500: "#f2f2f2", 600: "#f1f3f5", 700: "#e9ecef", 800: "#dee2e6", 900: "#dde1e3", 950: "#d8dcdf" }, dark: { 50: "#4a4a4a", 100: "#3c3c3c", 200: "#323232", 300: "#2d2d2d", 400: "#222222", 500: "#1f1f1f", 600: "#1c1c1e", 700: "#1b1b1b", 800: "#181818", 900: "#0f0f0f", 950: "#080808" }, get lightblue() { return this.sky; }, get lightBlue() { return this.sky; }, get warmgray() { return this.stone; }, get warmGray() { return this.stone; }, get truegray() { return this.neutral; }, get trueGray() { return this.neutral; }, get coolgray() { return this.gray; }, get coolGray() { return this.gray; }, get bluegray() { return this.slate; }, get blueGray() { return this.slate; } }; Object.values(colors).forEach((color) => { if (typeof color !== "string" && color !== void 0) { color.DEFAULT = color.DEFAULT || color[400]; Object.keys(color).forEach((key) => { const short = +key / 100; if (short === Math.round(short)) color[short] = color[key]; }); } }); // node_modules/.pnpm/@unocss+preset-mini@0.58.9/node_modules/@unocss/preset-mini/dist/shared/preset-mini.BLqeNSHq.mjs var cursorValues = ["auto", "default", "none", "context-menu", "help", "pointer", "progress", "wait", "cell", "crosshair", "text", "vertical-text", "alias", "copy", "move", "no-drop", "not-allowed", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out"]; var containValues = ["none", "strict", "content", "size", "inline-size", "layout", "style", "paint"]; var varEmpty = " "; var displays = [ ["inline", { display: "inline" }], ["block", { display: "block" }], ["inline-block", { display: "inline-block" }], ["contents", { display: "contents" }], ["flow-root", { display: "flow-root" }], ["list-item", { display: "list-item" }], ["hidden", { display: "none" }], [/^display-(.+)$/, ([, c]) => ({ display: h.bracket.cssvar.global(c) })] ]; var appearances = [ ["visible", { visibility: "visible" }], ["invisible", { visibility: "hidden" }], ["backface-visible", { "backface-visibility": "visible" }], ["backface-hidden", { "backface-visibility": "hidden" }], ...makeGlobalStaticRules("backface", "backface-visibility") ]; var cursors = [ [/^cursor-(.+)$/, ([, c]) => ({ cursor: h.bracket.cssvar.global(c) })], ...cursorValues.map((v) => [`cursor-${v}`, { cursor: v }]) ]; var contains = [ [/^contain-(.*)$/, ([, d]) => { if (h.bracket(d) != null) { return { contain: h.bracket(d).split(" ").map((e2) => h.cssvar.fraction(e2) ?? e2).join(" ") }; } return containValues.includes(d) ? { contain: d } : void 0; }] ]; var pointerEvents = [ ["pointer-events-auto", { "pointer-events": "auto" }], ["pointer-events-none", { "pointer-events": "none" }], ...makeGlobalStaticRules("pointer-events") ]; var resizes = [ ["resize-x", { resize: "horizontal" }], ["resize-y", { resize: "vertical" }], ["resize", { resize: "both" }], ["resize-none", { resize: "none" }], ...makeGlobalStaticRules("resize") ]; var userSelects = [ ["select-auto", { "-webkit-user-select": "auto", "user-select": "auto" }], ["select-all", { "-webkit-user-select": "all", "user-select": "all" }], ["select-text", { "-webkit-user-select": "text", "user-select": "text" }], ["select-none", { "-webkit-user-select": "none", "user-select": "none" }], ...makeGlobalStaticRules("select", "user-select") ]; var whitespaces = [ [ /^(?:whitespace-|ws-)([-\w]+)$/, ([, v]) => ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces", ...globalKeywords].includes(v) ? { "white-space": v } : void 0, { autocomplete: "(whitespace|ws)-(normal|nowrap|pre|pre-line|pre-wrap|break-spaces)" } ] ]; var contentVisibility = [ [/^intrinsic-size-(.+)$/, ([, d]) => ({ "contain-intrinsic-size": h.bracket.cssvar.global.fraction.rem(d) }), { autocomplete: "intrinsic-size-" }], ["content-visibility-visible", { "content-visibility": "visible" }], ["content-visibility-hidden", { "content-visibility": "hidden" }], ["content-visibility-auto", { "content-visibility": "auto" }], ...makeGlobalStaticRules("content-visibility") ]; var contents = [ [/^content-(.+)$/, ([, v]) => ({ content: h.bracket.cssvar(v) })], ["content-empty", { content: '""' }], ["content-none", { content: "none" }] ]; var breaks = [ ["break-normal", { "overflow-wrap": "normal", "word-break": "normal" }], ["break-words", { "overflow-wrap": "break-word" }], ["break-all", { "word-break": "break-all" }], ["break-keep", { "word-break": "keep-all" }], ["break-anywhere", { "overflow-wrap": "anywhere" }] ]; var textWraps = [ ["text-wrap", { "text-wrap": "wrap" }], ["text-nowrap", { "text-wrap": "nowrap" }], ["text-balance", { "text-wrap": "balance" }], ["text-pretty", { "text-wrap": "pretty" }] ]; var textOverflows = [ ["truncate", { "overflow": "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }], ["text-truncate", { "overflow": "hidden", "text-overflow": "ellipsis", "white-space": "nowrap" }], ["text-ellipsis", { "text-overflow": "ellipsis" }], ["text-clip", { "text-overflow": "clip" }] ]; var textTransforms = [ ["case-upper", { "text-transform": "uppercase" }], ["case-lower", { "text-transform": "lowercase" }], ["case-capital", { "text-transform": "capitalize" }], ["case-normal", { "text-transform": "none" }], ...makeGlobalStaticRules("case", "text-transform") ]; var fontStyles = [ ["italic", { "font-style": "italic" }], ["not-italic", { "font-style": "normal" }], ["font-italic", { "font-style": "italic" }], ["font-not-italic", { "font-style": "normal" }], ["oblique", { "font-style": "oblique" }], ["not-oblique", { "font-style": "normal" }], ["font-oblique", { "font-style": "oblique" }], ["font-not-oblique", { "font-style": "normal" }] ]; var fontSmoothings = [ ["antialiased", { "-webkit-font-smoothing": "antialiased", "-moz-osx-font-smoothing": "grayscale" }], ["subpixel-antialiased", { "-webkit-font-smoothing": "auto", "-moz-osx-font-smoothing": "auto" }] ]; var ringBase = { "--un-ring-inset": varEmpty, "--un-ring-offset-width": "0px", "--un-ring-offset-color": "#fff", "--un-ring-width": "0px", "--un-ring-color": "rgb(147 197 253 / 0.5)", "--un-shadow": "0 0 rgb(0 0 0 / 0)" }; var rings = [ // ring [/^ring(?:-(.+))?$/, ([, d], { theme: theme3 }) => { const value = theme3.ringWidth?.[d || "DEFAULT"] ?? h.px(d || "1"); if (value) { return { "--un-ring-width": value, "--un-ring-offset-shadow": "var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color)", "--un-ring-shadow": "var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color)", "box-shadow": "var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow)" }; } }, { autocomplete: "ring-$ringWidth" }], // size [/^ring-(?:width-|size-)(.+)$/, handleWidth, { autocomplete: "ring-(width|size)-$lineWidth" }], // offset size ["ring-offset", { "--un-ring-offset-width": "1px" }], [/^ring-offset-(?:width-|size-)?(.+)$/, ([, d], { theme: theme3 }) => ({ "--un-ring-offset-width": theme3.lineWidth?.[d] ?? h.bracket.cssvar.px(d) }), { autocomplete: "ring-offset-(width|size)-$lineWidth" }], // colors [/^ring-(.+)$/, handleColorOrWidth, { autocomplete: "ring-$colors" }], [/^ring-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-ring-opacity": h.bracket.percent.cssvar(opacity2) }), { autocomplete: "ring-(op|opacity)-" }], // offset color [/^ring-offset-(.+)$/, colorResolver("--un-ring-offset-color", "ring-offset", "borderColor"), { autocomplete: "ring-offset-$colors" }], [/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-ring-offset-opacity": h.bracket.percent.cssvar(opacity2) }), { autocomplete: "ring-offset-(op|opacity)-" }], // style ["ring-inset", { "--un-ring-inset": "inset" }] ]; function handleWidth([, b], { theme: theme3 }) { return { "--un-ring-width": theme3.ringWidth?.[b] ?? h.bracket.cssvar.px(b) }; } function handleColorOrWidth(match, ctx) { if (isCSSMathFn(h.bracket(match[1]))) return handleWidth(match, ctx); return colorResolver("--un-ring-color", "ring", "borderColor")(match, ctx); } var boxShadowsBase = { "--un-ring-offset-shadow": "0 0 rgb(0 0 0 / 0)", "--un-ring-shadow": "0 0 rgb(0 0 0 / 0)", "--un-shadow-inset": varEmpty, "--un-shadow": "0 0 rgb(0 0 0 / 0)" }; var boxShadows = [ // color [/^shadow(?:-(.+))?$/, (match, context) => { const [, d] = match; const { theme: theme3 } = context; const v = theme3.boxShadow?.[d || "DEFAULT"]; const c = d ? h.bracket.cssvar(d) : void 0; if ((v != null || c != null) && !hasParseableColor(c, theme3, "shadowColor")) { return { "--un-shadow": colorableShadows(v || c, "--un-shadow-color").join(","), "box-shadow": "var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow)" }; } return colorResolver("--un-shadow-color", "shadow", "shadowColor")(match, context); }, { autocomplete: ["shadow-$colors", "shadow-$boxShadow"] }], [/^shadow-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-shadow-opacity": h.bracket.percent.cssvar(opacity2) }), { autocomplete: "shadow-(op|opacity)-" }], // inset ["shadow-inset", { "--un-shadow-inset": "inset" }] ]; var transformValues = [ "translate", "rotate", "scale" ]; var transformCpu = [ "translateX(var(--un-translate-x))", "translateY(var(--un-translate-y))", "translateZ(var(--un-translate-z))", "rotate(var(--un-rotate))", "rotateX(var(--un-rotate-x))", "rotateY(var(--un-rotate-y))", "rotateZ(var(--un-rotate-z))", "skewX(var(--un-skew-x))", "skewY(var(--un-skew-y))", "scaleX(var(--un-scale-x))", "scaleY(var(--un-scale-y))", "scaleZ(var(--un-scale-z))" ].join(" "); var transformGpu = [ "translate3d(var(--un-translate-x), var(--un-translate-y), var(--un-translate-z))", "rotate(var(--un-rotate))", "rotateX(var(--un-rotate-x))", "rotateY(var(--un-rotate-y))", "rotateZ(var(--un-rotate-z))", "skewX(var(--un-skew-x))", "skewY(var(--un-skew-y))", "scaleX(var(--un-scale-x))", "scaleY(var(--un-scale-y))", "scaleZ(var(--un-scale-z))" ].join(" "); var transformBase = { // transform "--un-rotate": 0, "--un-rotate-x": 0, "--un-rotate-y": 0, "--un-rotate-z": 0, "--un-scale-x": 1, "--un-scale-y": 1, "--un-scale-z": 1, "--un-skew-x": 0, "--un-skew-y": 0, "--un-translate-x": 0, "--un-translate-y": 0, "--un-translate-z": 0 }; var transforms = [ // origins [/^(?:transform-)?origin-(.+)$/, ([, s]) => ({ "transform-origin": positionMap[s] ?? h.bracket.cssvar(s) }), { autocomplete: [`transform-origin-(${Object.keys(positionMap).join("|")})`, `origin-(${Object.keys(positionMap).join("|")})`] }], // perspectives [/^(?:transform-)?perspect(?:ive)?-(.+)$/, ([, s]) => { const v = h.bracket.cssvar.px.numberWithUnit(s); if (v != null) { return { "-webkit-perspective": v, "perspective": v }; } }], // skip 1 & 2 letters shortcut [/^(?:transform-)?perspect(?:ive)?-origin-(.+)$/, ([, s]) => { const v = h.bracket.cssvar(s) ?? (s.length >= 3 ? positionMap[s] : void 0); if (v != null) { return { "-webkit-perspective-origin": v, "perspective-origin": v }; } }], // modifiers [/^(?:transform-)?translate-()(.+)$/, handleTranslate], [/^(?:transform-)?translate-([xyz])-(.+)$/, handleTranslate], [/^(?:transform-)?rotate-()(.+)$/, handleRotate], [/^(?:transform-)?rotate-([xyz])-(.+)$/, handleRotate], [/^(?:transform-)?skew-()(.+)$/, handleSkew], [/^(?:transform-)?skew-([xy])-(.+)$/, handleSkew, { autocomplete: ["transform-skew-(x|y)-", "skew-(x|y)-"] }], [/^(?:transform-)?scale-()(.+)$/, handleScale], [/^(?:transform-)?scale-([xyz])-(.+)$/, handleScale, { autocomplete: [`transform-(${transformValues.join("|")})-`, `transform-(${transformValues.join("|")})-(x|y|z)-`, `(${transformValues.join("|")})-`, `(${transformValues.join("|")})-(x|y|z)-`] }], // style [/^(?:transform-)?preserve-3d$/, () => ({ "transform-style": "preserve-3d" })], [/^(?:transform-)?preserve-flat$/, () => ({ "transform-style": "flat" })], // base ["transform", { transform: transformCpu }], ["transform-cpu", { transform: transformCpu }], ["transform-gpu", { transform: transformGpu }], ["transform-none", { transform: "none" }], ...makeGlobalStaticRules("transform") ]; function handleTranslate([, d, b], { theme: theme3 }) { const v = theme3.spacing?.[b] ?? h.bracket.cssvar.fraction.rem(b); if (v != null) { return [ ...transformXYZ(d, v, "translate"), ["transform", transformCpu] ]; } } function handleScale([, d, b]) { const v = h.bracket.cssvar.fraction.percent(b); if (v != null) { return [ ...transformXYZ(d, v, "scale"), ["transform", transformCpu] ]; } } function handleRotate([, d = "", b]) { const v = h.bracket.cssvar.degree(b); if (v != null) { if (d) { return { "--un-rotate": 0, [`--un-rotate-${d}`]: v, "transform": transformCpu }; } else { return { "--un-rotate-x": 0, "--un-rotate-y": 0, "--un-rotate-z": 0, "--un-rotate": v, "transform": transformCpu }; } } } function handleSkew([, d, b]) { const v = h.bracket.cssvar.degree(b); if (v != null) { return [ ...transformXYZ(d, v, "skew"), ["transform", transformCpu] ]; } } // node_modules/.pnpm/@unocss+preset-mini@0.58.9/node_modules/@unocss/preset-mini/dist/shared/preset-mini.DeOzy57x.mjs var fontFamily = { sans: [ "ui-sans-serif", "system-ui", "-apple-system", "BlinkMacSystemFont", '"Segoe UI"', "Roboto", '"Helvetica Neue"', "Arial", '"Noto Sans"', "sans-serif", '"Apple Color Emoji"', '"Segoe UI Emoji"', '"Segoe UI Symbol"', '"Noto Color Emoji"' ].join(","), serif: [ "ui-serif", "Georgia", "Cambria", '"Times New Roman"', "Times", "serif" ].join(","), mono: [ "ui-monospace", "SFMono-Regular", "Menlo", "Monaco", "Consolas", '"Liberation Mono"', '"Courier New"', "monospace" ].join(",") }; var fontSize = { "xs": ["0.75rem", "1rem"], "sm": ["0.875rem", "1.25rem"], "base": ["1rem", "1.5rem"], "lg": ["1.125rem", "1.75rem"], "xl": ["1.25rem", "1.75rem"], "2xl": ["1.5rem", "2rem"], "3xl": ["1.875rem", "2.25rem"], "4xl": ["2.25rem", "2.5rem"], "5xl": ["3rem", "1"], "6xl": ["3.75rem", "1"], "7xl": ["4.5rem", "1"], "8xl": ["6rem", "1"], "9xl": ["8rem", "1"] }; var textIndent = { "DEFAULT": "1.5rem", "xs": "0.5rem", "sm": "1rem", "md": "1.5rem", "lg": "2rem", "xl": "2.5rem", "2xl": "3rem", "3xl": "4rem" }; var textStrokeWidth = { DEFAULT: "1.5rem", none: "0", sm: "thin", md: "medium", lg: "thick" }; var textShadow = { DEFAULT: ["0 0 1px rgb(0 0 0 / 0.2)", "0 0 1px rgb(1 0 5 / 0.1)"], none: "0 0 rgb(0 0 0 / 0)", sm: "1px 1px 3px rgb(36 37 47 / 0.25)", md: ["0 1px 2px rgb(30 29 39 / 0.19)", "1px 2px 4px rgb(54 64 147 / 0.18)"], lg: ["3px 3px 6px rgb(0 0 0 / 0.26)", "0 0 5px rgb(15 3 86 / 0.22)"], xl: ["1px 1px 3px rgb(0 0 0 / 0.29)", "2px 4px 7px rgb(73 64 125 / 0.35)"] }; var lineHeight = { none: "1", tight: "1.25", snug: "1.375", normal: "1.5", relaxed: "1.625", loose: "2" }; var letterSpacing = { tighter: "-0.05em", tight: "-0.025em", normal: "0em", wide: "0.025em", wider: "0.05em", widest: "0.1em" }; var fontWeight = { thin: "100", extralight: "200", light: "300", normal: "400", medium: "500", semibold: "600", bold: "700", extrabold: "800", black: "900" // int[0, 900] -> int }; var wordSpacing = letterSpacing; var breakpoints = { "sm": "640px", "md": "768px", "lg": "1024px", "xl": "1280px", "2xl": "1536px" }; var verticalBreakpoints = { ...breakpoints }; var lineWidth = { DEFAULT: "1px", none: "0" }; var spacing = { "DEFAULT": "1rem", "none": "0", "xs": "0.75rem", "sm": "0.875rem", "lg": "1.125rem", "xl": "1.25rem", "2xl": "1.5rem", "3xl": "1.875rem", "4xl": "2.25rem", "5xl": "3rem", "6xl": "3.75rem", "7xl": "4.5rem", "8xl": "6rem", "9xl": "8rem" }; var duration = { DEFAULT: "150ms", none: "0s", 75: "75ms", 100: "100ms", 150: "150ms", 200: "200ms", 300: "300ms", 500: "500ms", 700: "700ms", 1e3: "1000ms" }; var borderRadius = { "DEFAULT": "0.25rem", "none": "0", "sm": "0.125rem", "md": "0.375rem", "lg": "0.5rem", "xl": "0.75rem", "2xl": "1rem", "3xl": "1.5rem", "full": "9999px" }; var boxShadow = { "DEFAULT": ["var(--un-shadow-inset) 0 1px 3px 0 rgb(0 0 0 / 0.1)", "var(--un-shadow-inset) 0 1px 2px -1px rgb(0 0 0 / 0.1)"], "none": "0 0 rgb(0 0 0 / 0)", "sm": "var(--un-shadow-inset) 0 1px 2px 0 rgb(0 0 0 / 0.05)", "md": ["var(--un-shadow-inset) 0 4px 6px -1px rgb(0 0 0 / 0.1)", "var(--un-shadow-inset) 0 2px 4px -2px rgb(0 0 0 / 0.1)"], "lg": ["var(--un-shadow-inset) 0 10px 15px -3px rgb(0 0 0 / 0.1)", "var(--un-shadow-inset) 0 4px 6px -4px rgb(0 0 0 / 0.1)"], "xl": ["var(--un-shadow-inset) 0 20px 25px -5px rgb(0 0 0 / 0.1)", "var(--un-shadow-inset) 0 8px 10px -6px rgb(0 0 0 / 0.1)"], "2xl": "var(--un-shadow-inset) 0 25px 50px -12px rgb(0 0 0 / 0.25)", "inner": "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)" }; var easing = { "DEFAULT": "cubic-bezier(0.4, 0, 0.2, 1)", "linear": "linear", "in": "cubic-bezier(0.4, 0, 1, 1)", "out": "cubic-bezier(0, 0, 0.2, 1)", "in-out": "cubic-bezier(0.4, 0, 0.2, 1)" }; var ringWidth = { DEFAULT: "1px", none: "0" }; var zIndex = { auto: "auto" }; var media = { mouse: "(hover) and (pointer: fine)" }; var blur = { "DEFAULT": "8px", "0": "0", "sm": "4px", "md": "12px", "lg": "16px", "xl": "24px", "2xl": "40px", "3xl": "64px" }; var dropShadow = { "DEFAULT": ["0 1px 2px rgb(0 0 0 / 0.1)", "0 1px 1px rgb(0 0 0 / 0.06)"], "sm": "0 1px 1px rgb(0 0 0 / 0.05)", "md": ["0 4px 3px rgb(0 0 0 / 0.07)", "0 2px 2px rgb(0 0 0 / 0.06)"], "lg": ["0 10px 8px rgb(0 0 0 / 0.04)", "0 4px 3px rgb(0 0 0 / 0.1)"], "xl": ["0 20px 13px rgb(0 0 0 / 0.03)", "0 8px 5px rgb(0 0 0 / 0.08)"], "2xl": "0 25px 25px rgb(0 0 0 / 0.15)", "none": "0 0 rgb(0 0 0 / 0)" }; var baseSize = { "xs": "20rem", "sm": "24rem", "md": "28rem", "lg": "32rem", "xl": "36rem", "2xl": "42rem", "3xl": "48rem", "4xl": "56rem", "5xl": "64rem", "6xl": "72rem", "7xl": "80rem", "prose": "65ch" }; var width = { auto: "auto", ...baseSize, screen: "100vw" }; var maxWidth = { none: "none", ...baseSize, screen: "100vw" }; var height = { auto: "auto", ...baseSize, screen: "100vh" }; var maxHeight = { none: "none", ...baseSize, screen: "100vh" }; var containers = Object.fromEntries(Object.entries(baseSize).map(([k, v]) => [k, `(min-width: ${v})`])); var preflightBase = { ...transformBase, ...boxShadowsBase, ...ringBase }; var theme = { width, height, maxWidth, maxHeight, minWidth: maxWidth, minHeight: maxHeight, inlineSize: width, blockSize: height, maxInlineSize: maxWidth, maxBlockSize: maxHeight, minInlineSize: maxWidth, minBlockSize: maxHeight, colors, fontFamily, fontSize, fontWeight, breakpoints, verticalBreakpoints, borderRadius, lineHeight, letterSpacing, wordSpacing, boxShadow, textIndent, textShadow, textStrokeWidth, blur, dropShadow, easing, lineWidth, spacing, duration, ringWidth, preflightBase, containers, zIndex, media }; // node_modules/.pnpm/@unocss+preset-mini@0.58.9/node_modules/@unocss/preset-mini/dist/shared/preset-mini.BkfCAdS7.mjs var verticalAlignAlias = { "mid": "middle", "base": "baseline", "btm": "bottom", "baseline": "baseline", "top": "top", "start": "top", "middle": "middle", "bottom": "bottom", "end": "bottom", "text-top": "text-top", "text-bottom": "text-bottom", "sub": "sub", "super": "super", ...Object.fromEntries(globalKeywords.map((x2) => [x2, x2])) }; var verticalAligns = [ [ /^(?:vertical|align|v)-([-\w]+%?)$/, ([, v]) => ({ "vertical-align": verticalAlignAlias[v] ?? h.numberWithUnit(v) }), { autocomplete: [ `(vertical|align|v)-(${Object.keys(verticalAlignAlias).join("|")})`, "(vertical|align|v)-" ] } ] ]; var textAligns = ["center", "left", "right", "justify", "start", "end"].map((v) => [`text-${v}`, { "text-align": v }]); var outline = [ // size [/^outline-(?:width-|size-)?(.+)$/, handleWidth$2, { autocomplete: "outline-(width|size)-" }], // color [/^outline-(?:color-)?(.+)$/, handleColorOrWidth$2, { autocomplete: "outline-$colors" }], // offset [/^outline-offset-(.+)$/, ([, d], { theme: theme3 }) => ({ "outline-offset": theme3.lineWidth?.[d] ?? h.bracket.cssvar.global.px(d) }), { autocomplete: "outline-(offset)-" }], // style ["outline", { "outline-style": "solid" }], ...["auto", "dashed", "dotted", "double", "hidden", "solid", "groove", "ridge", "inset", "outset", ...globalKeywords].map((v) => [`outline-${v}`, { "outline-style": v }]), ["outline-none", { "outline": "2px solid transparent", "outline-offset": "2px" }] ]; function handleWidth$2([, b], { theme: theme3 }) { return { "outline-width": theme3.lineWidth?.[b] ?? h.bracket.cssvar.global.px(b) }; } function handleColorOrWidth$2(match, ctx) { if (isCSSMathFn(h.bracket(match[1]))) return handleWidth$2(match, ctx); return colorResolver("outline-color", "outline-color", "borderColor")(match, ctx); } var appearance = [ ["appearance-auto", { "-webkit-appearance": "auto", "appearance": "auto" }], ["appearance-none", { "-webkit-appearance": "none", "appearance": "none" }] ]; function willChangeProperty(prop) { return h.properties.auto.global(prop) ?? { contents: "contents", scroll: "scroll-position" }[prop]; } var willChange = [ [/^will-change-(.+)/, ([, p]) => ({ "will-change": willChangeProperty(p) })] ]; var borderStyles = ["solid", "dashed", "dotted", "double", "hidden", "none", "groove", "ridge", "inset", "outset", ...globalKeywords]; var borders = [ // compound [/^(?:border|b)()(?:-(.+))?$/, handlerBorderSize, { autocomplete: "(border|b)-" }], [/^(?:border|b)-([xy])(?:-(.+))?$/, handlerBorderSize], [/^(?:border|b)-([rltbse])(?:-(.+))?$/, handlerBorderSize], [/^(?:border|b)-(block|inline)(?:-(.+))?$/, handlerBorderSize], [/^(?:border|b)-([bi][se])(?:-(.+))?$/, handlerBorderSize], // size [/^(?:border|b)-()(?:width|size)-(.+)$/, handlerBorderSize, { autocomplete: ["(border|b)-", "(border|b)--"] }], [/^(?:border|b)-([xy])-(?:width|size)-(.+)$/, handlerBorderSize], [/^(?:border|b)-([rltbse])-(?:width|size)-(.+)$/, handlerBorderSize], [/^(?:border|b)-(block|inline)-(?:width|size)-(.+)$/, handlerBorderSize], [/^(?:border|b)-([bi][se])-(?:width|size)-(.+)$/, handlerBorderSize], // colors [/^(?:border|b)-()(?:color-)?(.+)$/, handlerBorderColorOrSize, { autocomplete: ["(border|b)-$colors", "(border|b)--$colors"] }], [/^(?:border|b)-([xy])-(?:color-)?(.+)$/, handlerBorderColorOrSize], [/^(?:border|b)-([rltbse])-(?:color-)?(.+)$/, handlerBorderColorOrSize], [/^(?:border|b)-(block|inline)-(?:color-)?(.+)$/, handlerBorderColorOrSize], [/^(?:border|b)-([bi][se])-(?:color-)?(.+)$/, handlerBorderColorOrSize], // opacity [/^(?:border|b)-()op(?:acity)?-?(.+)$/, handlerBorderOpacity, { autocomplete: "(border|b)-(op|opacity)-" }], [/^(?:border|b)-([xy])-op(?:acity)?-?(.+)$/, handlerBorderOpacity], [/^(?:border|b)-([rltbse])-op(?:acity)?-?(.+)$/, handlerBorderOpacity], [/^(?:border|b)-(block|inline)-op(?:acity)?-?(.+)$/, handlerBorderOpacity], [/^(?:border|b)-([bi][se])-op(?:acity)?-?(.+)$/, handlerBorderOpacity], // radius [/^(?:border-|b-)?(?:rounded|rd)()(?:-(.+))?$/, handlerRounded, { autocomplete: ["(border|b)-(rounded|rd)", "(border|b)-(rounded|rd)-", "(rounded|rd)", "(rounded|rd)-"] }], [/^(?:border-|b-)?(?:rounded|rd)-([rltbse])(?:-(.+))?$/, handlerRounded], [/^(?:border-|b-)?(?:rounded|rd)-([rltb]{2})(?:-(.+))?$/, handlerRounded], [/^(?:border-|b-)?(?:rounded|rd)-([bise][se])(?:-(.+))?$/, handlerRounded], [/^(?:border-|b-)?(?:rounded|rd)-([bi][se]-[bi][se])(?:-(.+))?$/, handlerRounded], // style [/^(?:border|b)-(?:style-)?()(.+)$/, handlerBorderStyle, { autocomplete: ["(border|b)-style", `(border|b)-(${borderStyles.join("|")})`, "(border|b)--style", `(border|b)--(${borderStyles.join("|")})`, `(border|b)--style-(${borderStyles.join("|")})`, `(border|b)-style-(${borderStyles.join("|")})`] }], [/^(?:border|b)-([xy])-(?:style-)?(.+)$/, handlerBorderStyle], [/^(?:border|b)-([rltbse])-(?:style-)?(.+)$/, handlerBorderStyle], [/^(?:border|b)-(block|inline)-(?:style-)?(.+)$/, handlerBorderStyle], [/^(?:border|b)-([bi][se])-(?:style-)?(.+)$/, handlerBorderStyle] ]; function transformBorderColor(color, alpha, direction) { if (alpha != null) { return { [`border${direction}-color`]: colorToString(color, alpha) }; } if (direction === "") { const object = {}; const opacityVar = `--un-border-opacity`; const result = colorToString(color, `var(${opacityVar})`); if (result.includes(opacityVar)) object[opacityVar] = typeof color === "string" ? 1 : colorOpacityToString(color); object["border-color"] = result; return object; } else { const object = {}; const opacityVar = "--un-border-opacity"; const opacityDirectionVar = `--un-border${direction}-opacity`; const result = colorToString(color, `var(${opacityDirectionVar})`); if (result.includes(opacityDirectionVar)) { object[opacityVar] = typeof color === "string" ? 1 : colorOpacityToString(color); object[opacityDirectionVar] = `var(${opacityVar})`; } object[`border${direction}-color`] = result; return object; } } function borderColorResolver(direction) { return ([, body], theme3) => { const data = parseColor2(body, theme3, "borderColor"); if (!data) return; const { alpha, color, cssColor } = data; if (cssColor) return transformBorderColor(cssColor, alpha, direction); else if (color) return transformBorderColor(color, alpha, direction); }; } function handlerBorderSize([, a = "", b], { theme: theme3 }) { const v = theme3.lineWidth?.[b || "DEFAULT"] ?? h.bracket.cssvar.global.px(b || "1"); if (a in directionMap && v != null) return directionMap[a].map((i) => [`border${i}-width`, v]); } function handlerBorderColorOrSize([, a = "", b], ctx) { if (a in directionMap) { if (isCSSMathFn(h.bracket(b))) return handlerBorderSize(["", a, b], ctx); if (hasParseableColor(b, ctx.theme, "borderColor")) { return Object.assign( {}, ...directionMap[a].map((i) => borderColorResolver(i)(["", b], ctx.theme)) ); } } } function handlerBorderOpacity([, a = "", opacity2]) { const v = h.bracket.percent.cssvar(opacity2); if (a in directionMap && v != null) return directionMap[a].map((i) => [`--un-border${i}-opacity`, v]); } function handlerRounded([, a = "", s], { theme: theme3 }) { const v = theme3.borderRadius?.[s || "DEFAULT"] || h.bracket.cssvar.global.fraction.rem(s || "1"); if (a in cornerMap && v != null) return cornerMap[a].map((i) => [`border${i}-radius`, v]); } function handlerBorderStyle([, a = "", s]) { if (borderStyles.includes(s) && a in directionMap) return directionMap[a].map((i) => [`border${i}-style`, s]); } var opacity = [ [/^op(?:acity)?-?(.+)$/, ([, d]) => ({ opacity: h.bracket.percent.cssvar(d) })] ]; var bgUrlRE = /^\[url\(.+\)\]$/; var bgLengthRE = /^\[(length|size):.+\]$/; var bgPositionRE = /^\[position:.+\]$/; var bgGradientRE = /^\[(linear|conic|radial)-gradient\(.+\)\]$/; var bgColors = [ [/^bg-(.+)$/, (...args) => { const d = args[0][1]; if (bgUrlRE.test(d)) return { "--un-url": h.bracket(d), "background-image": "var(--un-url)" }; if (bgLengthRE.test(d) && h.bracketOfLength(d) != null) return { "background-size": h.bracketOfLength(d).split(" ").map((e2) => h.fraction.auto.px.cssvar(e2) ?? e2).join(" ") }; if ((isSize(d) || bgPositionRE.test(d)) && h.bracketOfPosition(d) != null) return { "background-position": h.bracketOfPosition(d).split(" ").map((e2) => h.position.fraction.auto.px.cssvar(e2) ?? e2).join(" ") }; if (bgGradientRE.test(d)) return { "background-image": h.bracket(d) }; return colorResolver("background-color", "bg", "backgroundColor")(...args); }, { autocomplete: "bg-$colors" }], [/^bg-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-bg-opacity": h.bracket.percent.cssvar(opacity2) }), { autocomplete: "bg-(op|opacity)-" }] ]; var colorScheme = [ [/^color-scheme-(\w+)$/, ([, v]) => ({ "color-scheme": v })] ]; var containerParent = [ [/^@container(?:\/(\w+))?(?:-(normal))?$/, ([, l, v]) => { warnOnce("The container query rule is experimental and may not follow semver."); return { "container-type": v ?? "inline-size", "container-name": l }; }] ]; var decorationStyles = ["solid", "double", "dotted", "dashed", "wavy", ...globalKeywords]; var textDecorations = [ [/^(?:decoration-)?(underline|overline|line-through)$/, ([, s]) => ({ "text-decoration-line": s }), { autocomplete: "decoration-(underline|overline|line-through)" }], // size [/^(?:underline|decoration)-(?:size-)?(.+)$/, handleWidth$1, { autocomplete: "(underline|decoration)-" }], [/^(?:underline|decoration)-(auto|from-font)$/, ([, s]) => ({ "text-decoration-thickness": s }), { autocomplete: "(underline|decoration)-(auto|from-font)" }], // colors [/^(?:underline|decoration)-(.+)$/, handleColorOrWidth$1, { autocomplete: "(underline|decoration)-$colors" }], [/^(?:underline|decoration)-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-line-opacity": h.bracket.percent.cssvar(opacity2) }), { autocomplete: "(underline|decoration)-(op|opacity)-" }], // offset [/^(?:underline|decoration)-offset-(.+)$/, ([, s], { theme: theme3 }) => ({ "text-underline-offset": theme3.lineWidth?.[s] ?? h.auto.bracket.cssvar.global.px(s) }), { autocomplete: "(underline|decoration)-(offset)-" }], // style ...decorationStyles.map((v) => [`underline-${v}`, { "text-decoration-style": v }]), ...decorationStyles.map((v) => [`decoration-${v}`, { "text-decoration-style": v }]), ["no-underline", { "text-decoration": "none" }], ["decoration-none", { "text-decoration": "none" }] ]; function handleWidth$1([, b], { theme: theme3 }) { return { "text-decoration-thickness": theme3.lineWidth?.[b] ?? h.bracket.cssvar.global.px(b) }; } function handleColorOrWidth$1(match, ctx) { if (isCSSMathFn(h.bracket(match[1]))) return handleWidth$1(match, ctx); const result = colorResolver("text-decoration-color", "line", "borderColor")(match, ctx); if (result) { return { "-webkit-text-decoration-color": result["text-decoration-color"], ...result }; } } var transitionPropertyGroup = { all: "all", colors: ["color", "background-color", "border-color", "outline-color", "text-decoration-color", "fill", "stroke"].join(","), none: "none", opacity: "opacity", shadow: "box-shadow", transform: "transform" }; function transitionProperty(prop) { return h.properties(prop) ?? transitionPropertyGroup[prop]; } var transitions = [ // transition [ /^transition(?:-([a-z-]+(?:,[a-z-]+)*))?(?:-(\d+))?$/, ([, prop, d], { theme: theme3 }) => { const p = prop != null ? transitionProperty(prop) : [transitionPropertyGroup.colors, "opacity", "box-shadow", "transform", "filter", "backdrop-filter"].join(","); if (p) { const duration2 = theme3.duration?.[d || "DEFAULT"] ?? h.time(d || "150"); return { "transition-property": p, "transition-timing-function": "cubic-bezier(0.4, 0, 0.2, 1)", "transition-duration": duration2 }; } }, { autocomplete: `transition-(${Object.keys(transitionPropertyGroup).join("|")})` } ], // timings [ /^(?:transition-)?duration-(.+)$/, ([, d], { theme: theme3 }) => ({ "transition-duration": theme3.duration?.[d || "DEFAULT"] ?? h.bracket.cssvar.time(d) }), { autocomplete: ["transition-duration-$duration", "duration-$duration"] } ], [ /^(?:transition-)?delay-(.+)$/, ([, d], { theme: theme3 }) => ({ "transition-delay": theme3.duration?.[d || "DEFAULT"] ?? h.bracket.cssvar.time(d) }), { autocomplete: ["transition-delay-$duration", "delay-$duration"] } ], [ /^(?:transition-)?ease(?:-(.+))?$/, ([, d], { theme: theme3 }) => ({ "transition-timing-function": theme3.easing?.[d || "DEFAULT"] ?? h.bracket.cssvar(d) }), { autocomplete: ["transition-ease-(linear|in|out|in-out|DEFAULT)", "ease-(linear|in|out|in-out|DEFAULT)"] } ], // props [ /^(?:transition-)?property-(.+)$/, ([, v]) => ({ "transition-property": h.bracket.global(v) || transitionProperty(v) }), { autocomplete: [`transition-property-(${[...globalKeywords, ...Object.keys(transitionPropertyGroup)].join("|")})`] } ], // none ["transition-none", { transition: "none" }], ...makeGlobalStaticRules("transition") ]; var flex = [ // display ["flex", { display: "flex" }], ["inline-flex", { display: "inline-flex" }], ["flex-inline", { display: "inline-flex" }], // flex [/^flex-(.*)$/, ([, d]) => ({ flex: h.bracket(d) != null ? h.bracket(d).split(" ").map((e2) => h.cssvar.fraction(e2) ?? e2).join(" ") : h.cssvar.fraction(d) })], ["flex-1", { flex: "1 1 0%" }], ["flex-auto", { flex: "1 1 auto" }], ["flex-initial", { flex: "0 1 auto" }], ["flex-none", { flex: "none" }], // shrink/grow/basis [/^(?:flex-)?shrink(?:-(.*))?$/, ([, d = ""]) => ({ "flex-shrink": h.bracket.cssvar.number(d) ?? 1 }), { autocomplete: ["flex-shrink-", "shrink-"] }], [/^(?:flex-)?grow(?:-(.*))?$/, ([, d = ""]) => ({ "flex-grow": h.bracket.cssvar.number(d) ?? 1 }), { autocomplete: ["flex-grow-", "grow-"] }], [/^(?:flex-)?basis-(.+)$/, ([, d], { theme: theme3 }) => ({ "flex-basis": theme3.spacing?.[d] ?? h.bracket.cssvar.auto.fraction.rem(d) }), { autocomplete: ["flex-basis-$spacing", "basis-$spacing"] }], // directions ["flex-row", { "flex-direction": "row" }], ["flex-row-reverse", { "flex-direction": "row-reverse" }], ["flex-col", { "flex-direction": "column" }], ["flex-col-reverse", { "flex-direction": "column-reverse" }], // wraps ["flex-wrap", { "flex-wrap": "wrap" }], ["flex-wrap-reverse", { "flex-wrap": "wrap-reverse" }], ["flex-nowrap", { "flex-wrap": "nowrap" }] ]; var fonts = [ // text [/^text-(.+)$/, handleText, { autocomplete: "text-$fontSize" }], // text size [/^(?:text|font)-size-(.+)$/, handleSize, { autocomplete: "text-size-$fontSize" }], // text colors [/^text-(?:color-)?(.+)$/, handlerColorOrSize, { autocomplete: "text-$colors" }], // colors [/^(?:color|c)-(.+)$/, colorResolver("color", "text", "textColor"), { autocomplete: "(color|c)-$colors" }], // style [/^(?:text|color|c)-(.+)$/, ([, v]) => globalKeywords.includes(v) ? { color: v } : void 0, { autocomplete: `(text|color|c)-(${globalKeywords.join("|")})` }], // opacity [/^(?:text|color|c)-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-text-opacity": h.bracket.percent.cssvar(opacity2) }), { autocomplete: "(text|color|c)-(op|opacity)-" }], // weights [ /^(?:font|fw)-?([^-]+)$/, ([, s], { theme: theme3 }) => ({ "font-weight": theme3.fontWeight?.[s] || h.bracket.global.number(s) }), { autocomplete: [ "(font|fw)-(100|200|300|400|500|600|700|800|900)", "(font|fw)-$fontWeight" ] } ], // leadings [ /^(?:font-)?(?:leading|lh|line-height)-(.+)$/, ([, s], { theme: theme3 }) => ({ "line-height": handleThemeByKey(s, theme3, "lineHeight") }), { autocomplete: "(leading|lh|line-height)-$lineHeight" } ], // synthesis ["font-synthesis-weight", { "font-synthesis": "weight" }], ["font-synthesis-style", { "font-synthesis": "style" }], ["font-synthesis-small-caps", { "font-synthesis": "small-caps" }], ["font-synthesis-none", { "font-synthesis": "none" }], [/^font-synthesis-(.+)$/, ([, s]) => ({ "font-synthesis": h.bracket.cssvar.global(s) })], // tracking [ /^(?:font-)?tracking-(.+)$/, ([, s], { theme: theme3 }) => ({ "letter-spacing": theme3.letterSpacing?.[s] || h.bracket.cssvar.global.rem(s) }), { autocomplete: "tracking-$letterSpacing" } ], // word-spacing [ /^(?:font-)?word-spacing-(.+)$/, ([, s], { theme: theme3 }) => ({ "word-spacing": theme3.wordSpacing?.[s] || h.bracket.cssvar.global.rem(s) }), { autocomplete: "word-spacing-$wordSpacing" } ], // stretch ["font-stretch-normal", { "font-stretch": "normal" }], ["font-stretch-ultra-condensed", { "font-stretch": "ultra-condensed" }], ["font-stretch-extra-condensed", { "font-stretch": "extra-condensed" }], ["font-stretch-condensed", { "font-stretch": "condensed" }], ["font-stretch-semi-condensed", { "font-stretch": "semi-condensed" }], ["font-stretch-semi-expanded", { "font-stretch": "semi-expanded" }], ["font-stretch-expanded", { "font-stretch": "expanded" }], ["font-stretch-extra-expanded", { "font-stretch": "extra-expanded" }], ["font-stretch-ultra-expanded", { "font-stretch": "ultra-expanded" }], [ /^font-stretch-(.+)$/, ([, s]) => ({ "font-stretch": h.bracket.cssvar.fraction.global(s) }), { autocomplete: "font-stretch-" } ], // family [ /^font-(.+)$/, ([, d], { theme: theme3 }) => ({ "font-family": theme3.fontFamily?.[d] || h.bracket.cssvar.global(d) }), { autocomplete: "font-$fontFamily" } ] ]; var tabSizes = [ [/^tab(?:-(.+))?$/, ([, s]) => { const v = h.bracket.cssvar.global.number(s || "4"); if (v != null) { return { "-moz-tab-size": v, "-o-tab-size": v, "tab-size": v }; } }] ]; var textIndents = [ [/^indent(?:-(.+))?$/, ([, s], { theme: theme3 }) => ({ "text-indent": theme3.textIndent?.[s || "DEFAULT"] || h.bracket.cssvar.global.fraction.rem(s) }), { autocomplete: "indent-$textIndent" }] ]; var textStrokes = [ // widths [/^text-stroke(?:-(.+))?$/, ([, s], { theme: theme3 }) => ({ "-webkit-text-stroke-width": theme3.textStrokeWidth?.[s || "DEFAULT"] || h.bracket.cssvar.px(s) }), { autocomplete: "text-stroke-$textStrokeWidth" }], // colors [/^text-stroke-(.+)$/, colorResolver("-webkit-text-stroke-color", "text-stroke", "borderColor"), { autocomplete: "text-stroke-$colors" }], [/^text-stroke-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-text-stroke-opacity": h.bracket.percent.cssvar(opacity2) }), { autocomplete: "text-stroke-(op|opacity)-" }] ]; var textShadows = [ [/^text-shadow(?:-(.+))?$/, ([, s], { theme: theme3 }) => { const v = theme3.textShadow?.[s || "DEFAULT"]; if (v != null) { return { "--un-text-shadow": colorableShadows(v, "--un-text-shadow-color").join(","), "text-shadow": "var(--un-text-shadow)" }; } return { "text-shadow": h.bracket.cssvar.global(s) }; }, { autocomplete: "text-shadow-$textShadow" }], // colors [/^text-shadow-color-(.+)$/, colorResolver("--un-text-shadow-color", "text-shadow", "shadowColor"), { autocomplete: "text-shadow-color-$colors" }], [/^text-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-text-shadow-opacity": h.bracket.percent.cssvar(opacity2) }), { autocomplete: "text-shadow-color-(op|opacity)-" }] ]; function handleThemeByKey(s, theme3, key) { return theme3[key]?.[s] || h.bracket.cssvar.global.rem(s); } function handleSize([, s], { theme: theme3 }) { const themed = toArray(theme3.fontSize?.[s]); const size = themed?.[0] ?? h.bracket.cssvar.global.rem(s); if (size != null) return { "font-size": size }; } function handlerColorOrSize(match, ctx) { if (isCSSMathFn(h.bracket(match[1]))) return handleSize(match, ctx); return colorResolver("color", "text", "textColor")(match, ctx); } function handleText([, s = "base"], { theme: theme3 }) { const split = splitShorthand(s, "length"); if (!split) return; const [size, leading] = split; const sizePairs = toArray(theme3.fontSize?.[size]); const lineHeight2 = leading ? handleThemeByKey(leading, theme3, "lineHeight") : void 0; if (sizePairs?.[0]) { const [fontSize22, height2, letterSpacing2] = sizePairs; if (typeof height2 === "object") { return { "font-size": fontSize22, ...height2 }; } return { "font-size": fontSize22, "line-height": lineHeight2 ?? height2 ?? "1", "letter-spacing": letterSpacing2 ? handleThemeByKey(letterSpacing2, theme3, "letterSpacing") : void 0 }; } const fontSize2 = h.bracketOfLength.rem(size); if (lineHeight2 && fontSize2) { return { "font-size": fontSize2, "line-height": lineHeight2 }; } return { "font-size": h.bracketOfLength.rem(s) }; } var directions = { "": "", "x": "column-", "y": "row-", "col": "column-", "row": "row-" }; function handleGap([, d = "", s], { theme: theme3 }) { const v = theme3.spacing?.[s] ?? h.bracket.cssvar.global.rem(s); if (v != null) { return { [`${directions[d]}gap`]: v }; } } var gaps = [ [/^(?:flex-|grid-)?gap-?()(.+)$/, handleGap, { autocomplete: ["gap-$spacing", "gap-"] }], [/^(?:flex-|grid-)?gap-([xy])-?(.+)$/, handleGap, { autocomplete: ["gap-(x|y)-$spacing", "gap-(x|y)-"] }], [/^(?:flex-|grid-)?gap-(col|row)-?(.+)$/, handleGap, { autocomplete: ["gap-(col|row)-$spacing", "gap-(col|row)-"] }] ]; function rowCol(s) { return s.replace("col", "column"); } function rowColTheme(s) { return s[0] === "r" ? "Row" : "Column"; } function autoDirection(c, theme3, prop) { const v = theme3[`gridAuto${rowColTheme(c)}`]?.[prop]; if (v != null) return v; switch (prop) { case "min": return "min-content"; case "max": return "max-content"; case "fr": return "minmax(0,1fr)"; } return h.bracket.cssvar.auto.rem(prop); } var grids = [ // displays ["grid", { display: "grid" }], ["inline-grid", { display: "inline-grid" }], // global [/^(?:grid-)?(row|col)-(.+)$/, ([, c, v], { theme: theme3 }) => ({ [`grid-${rowCol(c)}`]: theme3[`grid${rowColTheme(c)}`]?.[v] ?? h.bracket.cssvar.auto(v) })], // span [/^(?:grid-)?(row|col)-span-(.+)$/, ([, c, s]) => { if (s === "full") return { [`grid-${rowCol(c)}`]: "1/-1" }; const v = h.bracket.number(s); if (v != null) return { [`grid-${rowCol(c)}`]: `span ${v}/span ${v}` }; }, { autocomplete: "(grid-row|grid-col|row|col)-span-" }], // starts & ends [/^(?:grid-)?(row|col)-start-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-start`]: h.bracket.cssvar(v) ?? v })], [/^(?:grid-)?(row|col)-end-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-end`]: h.bracket.cssvar(v) ?? v }), { autocomplete: "(grid-row|grid-col|row|col)-(start|end)-" }], // auto flows [/^(?:grid-)?auto-(rows|cols)-(.+)$/, ([, c, v], { theme: theme3 }) => ({ [`grid-auto-${rowCol(c)}`]: autoDirection(c, theme3, v) }), { autocomplete: "(grid-auto|auto)-(rows|cols)-" }], // grid-auto-flow, auto-flow: uno // grid-flow: wind [/^(?:grid-auto-flow|auto-flow|grid-flow)-(.+)$/, ([, v]) => ({ "grid-auto-flow": h.bracket.cssvar(v) })], [/^(?:grid-auto-flow|auto-flow|grid-flow)-(row|col|dense|row-dense|col-dense)$/, ([, v]) => ({ "grid-auto-flow": rowCol(v).replace("-", " ") }), { autocomplete: ["(grid-auto-flow|auto-flow|grid-flow)-(row|col|dense|row-dense|col-dense)"] }], // templates [/^(?:grid-)?(rows|cols)-(.+)$/, ([, c, v], { theme: theme3 }) => ({ [`grid-template-${rowCol(c)}`]: theme3[`gridTemplate${rowColTheme(c)}`]?.[v] ?? h.bracket.cssvar(v) })], [/^(?:grid-)?(rows|cols)-minmax-([\w.-]+)$/, ([, c, d]) => ({ [`grid-template-${rowCol(c)}`]: `repeat(auto-fill,minmax(${d},1fr))` })], [/^(?:grid-)?(rows|cols)-(\d+)$/, ([, c, d]) => ({ [`grid-template-${rowCol(c)}`]: `repeat(${d},minmax(0,1fr))` }), { autocomplete: "(grid-rows|grid-cols|rows|cols)-" }], // areas [/^grid-area(s)?-(.+)$/, ([, s, v]) => { if (s != null) return { "grid-template-areas": h.cssvar(v) ?? v.split("-").map((s2) => `"${h.bracket(s2)}"`).join(" ") }; return { "grid-area": h.bracket.cssvar(v) }; }], // template none ["grid-rows-none", { "grid-template-rows": "none" }], ["grid-cols-none", { "grid-template-columns": "none" }], // template subgrid ["grid-rows-subgrid", { "grid-template-rows": "subgrid" }], ["grid-cols-subgrid", { "grid-template-columns": "subgrid" }] ]; var overflowValues = [ "auto", "hidden", "clip", "visible", "scroll", "overlay", ...globalKeywords ]; var overflows = [ [/^(?:overflow|of)-(.+)$/, ([, v]) => overflowValues.includes(v) ? { overflow: v } : void 0, { autocomplete: [`(overflow|of)-(${overflowValues.join("|")})`, `(overflow|of)-(x|y)-(${overflowValues.join("|")})`] }], [/^(?:overflow|of)-([xy])-(.+)$/, ([, d, v]) => overflowValues.includes(v) ? { [`overflow-${d}`]: v } : void 0] ]; var positions = [ [/^(?:position-|pos-)?(relative|absolute|fixed|sticky)$/, ([, v]) => ({ position: v }), { autocomplete: [ "(position|pos)-", "(position|pos)-", "" ] }], [/^(?:position-|pos-)([-\w]+)$/, ([, v]) => globalKeywords.includes(v) ? { position: v } : void 0], [/^(?:position-|pos-)?(static)$/, ([, v]) => ({ position: v })] ]; var justifies = [ // contents ["justify-start", { "justify-content": "flex-start" }], ["justify-end", { "justify-content": "flex-end" }], ["justify-center", { "justify-content": "center" }], ["justify-between", { "justify-content": "space-between" }], ["justify-around", { "justify-content": "space-around" }], ["justify-evenly", { "justify-content": "space-evenly" }], ["justify-stretch", { "justify-content": "stretch" }], ["justify-left", { "justify-content": "left" }], ["justify-right", { "justify-content": "right" }], ...makeGlobalStaticRules("justify", "justify-content"), // items ["justify-items-start", { "justify-items": "start" }], ["justify-items-end", { "justify-items": "end" }], ["justify-items-center", { "justify-items": "center" }], ["justify-items-stretch", { "justify-items": "stretch" }], ...makeGlobalStaticRules("justify-items"), // selfs ["justify-self-auto", { "justify-self": "auto" }], ["justify-self-start", { "justify-self": "start" }], ["justify-self-end", { "justify-self": "end" }], ["justify-self-center", { "justify-self": "center" }], ["justify-self-stretch", { "justify-self": "stretch" }], ...makeGlobalStaticRules("justify-self") ]; var orders = [ [/^order-(.+)$/, ([, v]) => ({ order: h.bracket.cssvar.number(v) })], ["order-first", { order: "-9999" }], ["order-last", { order: "9999" }], ["order-none", { order: "0" }] ]; var alignments = [ // contents ["content-center", { "align-content": "center" }], ["content-start", { "align-content": "flex-start" }], ["content-end", { "align-content": "flex-end" }], ["content-between", { "align-content": "space-between" }], ["content-around", { "align-content": "space-around" }], ["content-evenly", { "align-content": "space-evenly" }], ...makeGlobalStaticRules("content", "align-content"), // items ["items-start", { "align-items": "flex-start" }], ["items-end", { "align-items": "flex-end" }], ["items-center", { "align-items": "center" }], ["items-baseline", { "align-items": "baseline" }], ["items-stretch", { "align-items": "stretch" }], ...makeGlobalStaticRules("items", "align-items"), // selfs ["self-auto", { "align-self": "auto" }], ["self-start", { "align-self": "flex-start" }], ["self-end", { "align-self": "flex-end" }], ["self-center", { "align-self": "center" }], ["self-stretch", { "align-self": "stretch" }], ["self-baseline", { "align-self": "baseline" }], ...makeGlobalStaticRules("self", "align-self") ]; var placements = [ // contents ["place-content-center", { "place-content": "center" }], ["place-content-start", { "place-content": "start" }], ["place-content-end", { "place-content": "end" }], ["place-content-between", { "place-content": "space-between" }], ["place-content-around", { "place-content": "space-around" }], ["place-content-evenly", { "place-content": "space-evenly" }], ["place-content-stretch", { "place-content": "stretch" }], ...makeGlobalStaticRules("place-content"), // items ["place-items-start", { "place-items": "start" }], ["place-items-end", { "place-items": "end" }], ["place-items-center", { "place-items": "center" }], ["place-items-stretch", { "place-items": "stretch" }], ...makeGlobalStaticRules("place-items"), // selfs ["place-self-auto", { "place-self": "auto" }], ["place-self-start", { "place-self": "start" }], ["place-self-end", { "place-self": "end" }], ["place-self-center", { "place-self": "center" }], ["place-self-stretch", { "place-self": "stretch" }], ...makeGlobalStaticRules("place-self") ]; var flexGridJustifiesAlignments = [...justifies, ...alignments, ...placements].flatMap(([k, v]) => [ [`flex-${k}`, v], [`grid-${k}`, v] ]); function handleInsetValue(v, { theme: theme3 }) { return theme3.spacing?.[v] ?? h.bracket.cssvar.global.auto.fraction.rem(v); } function handleInsetValues([, d, v], ctx) { const r = handleInsetValue(v, ctx); if (r != null && d in insetMap) return insetMap[d].map((i) => [i.slice(1), r]); } var insets = [ [ /^(?:position-|pos-)?inset-(.+)$/, ([, v], ctx) => ({ inset: handleInsetValue(v, ctx) }), { autocomplete: [ "(position|pos)-inset--$spacing", "(position|pos)-inset-(block|inline)-$spacing", "(position|pos)-inset-(bs|be|is|ie)-$spacing", "(position|pos)-(top|left|right|bottom)-$spacing" ] } ], [/^(?:position-|pos-)?(start|end)-(.+)$/, handleInsetValues], [/^(?:position-|pos-)?inset-([xy])-(.+)$/, handleInsetValues], [/^(?:position-|pos-)?inset-([rltbse])-(.+)$/, handleInsetValues], [/^(?:position-|pos-)?inset-(block|inline)-(.+)$/, handleInsetValues], [/^(?:position-|pos-)?inset-([bi][se])-(.+)$/, handleInsetValues], [/^(?:position-|pos-)?(top|left|right|bottom)-(.+)$/, ([, d, v], ctx) => ({ [d]: handleInsetValue(v, ctx) })] ]; var floats = [ // floats ["float-left", { float: "left" }], ["float-right", { float: "right" }], ["float-none", { float: "none" }], ...makeGlobalStaticRules("float"), // clears ["clear-left", { clear: "left" }], ["clear-right", { clear: "right" }], ["clear-both", { clear: "both" }], ["clear-none", { clear: "none" }], ...makeGlobalStaticRules("clear") ]; var zIndexes = [ [/^(?:position-|pos-)?z([\d.]+)$/, ([, v]) => ({ "z-index": h.number(v) })], [/^(?:position-|pos-)?z-(.+)$/, ([, v], { theme: theme3 }) => ({ "z-index": theme3.zIndex?.[v] ?? h.bracket.cssvar.global.auto.number(v) }), { autocomplete: "z-" }] ]; var boxSizing = [ ["box-border", { "box-sizing": "border-box" }], ["box-content", { "box-sizing": "content-box" }], ...makeGlobalStaticRules("box", "box-sizing") ]; var sizeMapping = { h: "height", w: "width", inline: "inline-size", block: "block-size" }; function getPropName(minmax, hw) { return `${minmax || ""}${sizeMapping[hw]}`; } function getSizeValue(minmax, hw, theme3, prop) { const str = getPropName(minmax, hw).replace(/-(\w)/g, (_, p) => p.toUpperCase()); const v = theme3[str]?.[prop]; if (v != null) return v; switch (prop) { case "fit": case "max": case "min": return `${prop}-content`; } return h.bracket.cssvar.global.auto.fraction.rem(prop); } var sizes = [ [/^size-(min-|max-)?(.+)$/, ([, m, s], { theme: theme3 }) => ({ [getPropName(m, "w")]: getSizeValue(m, "w", theme3, s), [getPropName(m, "h")]: getSizeValue(m, "h", theme3, s) })], [/^(?:size-)?(min-|max-)?([wh])-?(.+)$/, ([, m, w, s], { theme: theme3 }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme3, s) })], [/^(?:size-)?(min-|max-)?(block|inline)-(.+)$/, ([, m, w, s], { theme: theme3 }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme3, s) }), { autocomplete: [ "(w|h)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize", "(block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize", "(max|min)-(w|h|block|inline)", "(max|min)-(w|h|block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize", "(w|h)-full", "(max|min)-(w|h)-full" ] }], [/^(?:size-)?(min-|max-)?(h)-screen-(.+)$/, ([, m, h2, p], context) => ({ [getPropName(m, h2)]: handleBreakpoint(context, p, "verticalBreakpoints") })], [/^(?:size-)?(min-|max-)?(w)-screen-(.+)$/, ([, m, w, p], context) => ({ [getPropName(m, w)]: handleBreakpoint(context, p) }), { autocomplete: [ "(w|h)-screen", "(min|max)-(w|h)-screen", "h-screen-$verticalBreakpoints", "(min|max)-h-screen-$verticalBreakpoints", "w-screen-$breakpoints", "(min|max)-w-screen-$breakpoints" ] }] ]; function handleBreakpoint(context, point, key = "breakpoints") { const bp = resolveBreakpoints(context, key); if (bp) return bp.find((i) => i.point === point)?.size; } function getAspectRatio(prop) { if (/^\d+\/\d+$/.test(prop)) return prop; switch (prop) { case "square": return "1/1"; case "video": return "16/9"; } return h.bracket.cssvar.global.auto.number(prop); } var aspectRatio = [ [/^(?:size-)?aspect-(?:ratio-)?(.+)$/, ([, d]) => ({ "aspect-ratio": getAspectRatio(d) }), { autocomplete: ["aspect-(square|video|ratio)", "aspect-ratio-(square|video)"] }] ]; var paddings = [ [/^pa?()-?(-?.+)$/, directionSize("padding"), { autocomplete: ["(m|p)", "(m|p)-"] }], [/^p-?xy()()$/, directionSize("padding"), { autocomplete: "(m|p)-(xy)" }], [/^p-?([xy])(?:-?(-?.+))?$/, directionSize("padding")], [/^p-?([rltbse])(?:-?(-?.+))?$/, directionSize("padding"), { autocomplete: "(m|p)-" }], [/^p-(block|inline)(?:-(-?.+))?$/, directionSize("padding"), { autocomplete: "(m|p)-(block|inline)-" }], [/^p-?([bi][se])(?:-?(-?.+))?$/, directionSize("padding"), { autocomplete: "(m|p)-(bs|be|is|ie)-" }] ]; var margins = [ [/^ma?()-?(-?.+)$/, directionSize("margin")], [/^m-?xy()()$/, directionSize("margin")], [/^m-?([xy])(?:-?(-?.+))?$/, directionSize("margin")], [/^m-?([rltbse])(?:-?(-?.+))?$/, directionSize("margin")], [/^m-(block|inline)(?:-(-?.+))?$/, directionSize("margin")], [/^m-?([bi][se])(?:-?(-?.+))?$/, directionSize("margin")] ]; var variablesAbbrMap = { backface: "backface-visibility", break: "word-break", case: "text-transform", content: "align-content", fw: "font-weight", items: "align-items", justify: "justify-content", select: "user-select", self: "align-self", vertical: "vertical-align", visible: "visibility", whitespace: "white-space", ws: "white-space" }; var cssVariables = [ [/^(.+?)-(\$.+)$/, ([, name42, varname]) => { const prop = variablesAbbrMap[name42]; if (prop) return { [prop]: h.cssvar(varname) }; }] ]; var cssProperty = [ [/^\[(.*)\]$/, ([_, body]) => { if (!body.includes(":")) return; const [prop, ...rest] = body.split(":"); const value = rest.join(":"); if (!isURI(body) && /^[a-z-]+$/.test(prop) && isValidCSSBody(value)) { const parsed = h.bracket(`[${value}]`); if (parsed) return { [prop]: parsed }; } }] ]; function isValidCSSBody(body) { let i = 0; function findUntil(c) { while (i < body.length) { i += 1; const char = body[i]; if (char === c) return true; } return false; } for (i = 0; i < body.length; i++) { const c = body[i]; if ("\"`'".includes(c)) { if (!findUntil(c)) return false; } else if (c === "(") { if (!findUntil(")")) return false; } else if ("[]{}:".includes(c)) { return false; } } return true; } function isURI(declaration) { if (!declaration.includes("://")) return false; try { return new URL(declaration).host !== ""; } catch (err) { return false; } } var questionMark = [ [ /^(where|\?)$/, (_, { constructCSS, generator }) => { if (generator.userConfig.envMode === "dev") return `@keyframes __un_qm{0%{box-shadow:inset 4px 4px #ff1e90, inset -4px -4px #ff1e90}100%{box-shadow:inset 8px 8px #3399ff, inset -8px -8px #3399ff}} ${constructCSS({ animation: "__un_qm 0.5s ease-in-out alternate infinite" })}`; } ] ]; var svgUtilities = [ // fills [/^fill-(.+)$/, colorResolver("fill", "fill", "backgroundColor"), { autocomplete: "fill-$colors" }], [/^fill-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-fill-opacity": h.bracket.percent.cssvar(opacity2) }), { autocomplete: "fill-(op|opacity)-" }], ["fill-none", { fill: "none" }], // stroke size [/^stroke-(?:width-|size-)?(.+)$/, handleWidth2, { autocomplete: ["stroke-width-$lineWidth", "stroke-size-$lineWidth"] }], // stroke dash [/^stroke-dash-(.+)$/, ([, s]) => ({ "stroke-dasharray": h.bracket.cssvar.number(s) }), { autocomplete: "stroke-dash-" }], [/^stroke-offset-(.+)$/, ([, s], { theme: theme3 }) => ({ "stroke-dashoffset": theme3.lineWidth?.[s] ?? h.bracket.cssvar.px.numberWithUnit(s) }), { autocomplete: "stroke-offset-$lineWidth" }], // stroke colors [/^stroke-(.+)$/, handleColorOrWidth2, { autocomplete: "stroke-$colors" }], [/^stroke-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-stroke-opacity": h.bracket.percent.cssvar(opacity2) }), { autocomplete: "stroke-(op|opacity)-" }], // line cap ["stroke-cap-square", { "stroke-linecap": "square" }], ["stroke-cap-round", { "stroke-linecap": "round" }], ["stroke-cap-auto", { "stroke-linecap": "butt" }], // line join ["stroke-join-arcs", { "stroke-linejoin": "arcs" }], ["stroke-join-bevel", { "stroke-linejoin": "bevel" }], ["stroke-join-clip", { "stroke-linejoin": "miter-clip" }], ["stroke-join-round", { "stroke-linejoin": "round" }], ["stroke-join-auto", { "stroke-linejoin": "miter" }], // none ["stroke-none", { stroke: "none" }] ]; function handleWidth2([, b], { theme: theme3 }) { return { "stroke-width": theme3.lineWidth?.[b] ?? h.bracket.cssvar.fraction.px.number(b) }; } function handleColorOrWidth2(match, ctx) { if (isCSSMathFn(h.bracket(match[1]))) return handleWidth2(match, ctx); return colorResolver("stroke", "stroke", "borderColor")(match, ctx); } var rules = [ cssVariables, cssProperty, paddings, margins, displays, opacity, bgColors, colorScheme, svgUtilities, borders, contentVisibility, contents, fonts, tabSizes, textIndents, textOverflows, textDecorations, textStrokes, textShadows, textTransforms, textAligns, fontStyles, fontSmoothings, boxShadows, rings, flex, grids, gaps, positions, sizes, aspectRatio, cursors, appearances, pointerEvents, resizes, verticalAligns, userSelects, whitespaces, breaks, overflows, outline, appearance, orders, justifies, alignments, placements, flexGridJustifiesAlignments, insets, floats, zIndexes, boxSizing, transitions, transforms, willChange, containerParent, contains, textWraps, // should be the last questionMark ].flat(1); // node_modules/.pnpm/@unocss+preset-mini@0.58.9/node_modules/@unocss/preset-mini/dist/shared/preset-mini.Cn7UNwSE.mjs var variantAria = { name: "aria", match(matcher, ctx) { const variant = variantGetParameter("aria-", matcher, ctx.generator.config.separators); if (variant) { const [match, rest] = variant; const aria = h.bracket(match) ?? ctx.theme.aria?.[match] ?? ""; if (aria) { return { matcher: rest, selector: (s) => `${s}[aria-${aria}]` }; } } } }; function calcMaxWidthBySize(size) { const value = size.match(/^-?[0-9]+\.?[0-9]*/)?.[0] || ""; const unit = size.slice(value.length); if (unit === "px") { const maxWidth2 = Number.parseFloat(value) - 0.1; return Number.isNaN(maxWidth2) ? size : `${maxWidth2}${unit}`; } return `calc(${size} - 0.1px)`; } function variantBreakpoints() { const regexCache2 = {}; return { name: "breakpoints", match(matcher, context) { const variantEntries = (resolveBreakpoints(context) ?? []).map(({ point, size }, idx) => [point, size, idx]); for (const [point, size, idx] of variantEntries) { if (!regexCache2[point]) regexCache2[point] = new RegExp(`^((?:([al]t-|[<~]|max-))?${point}(?:${context.generator.config.separators.join("|")}))`); const match = matcher.match(regexCache2[point]); if (!match) continue; const [, pre] = match; const m = matcher.slice(pre.length); if (m === "container") continue; const isLtPrefix = pre.startsWith("lt-") || pre.startsWith("<") || pre.startsWith("max-"); const isAtPrefix = pre.startsWith("at-") || pre.startsWith("~"); let order = 3e3; if (isLtPrefix) { order -= idx + 1; return { matcher: m, handle: (input, next) => next({ ...input, parent: `${input.parent ? `${input.parent} $$ ` : ""}@media (max-width: ${calcMaxWidthBySize(size)})`, parentOrder: order }) }; } order += idx + 1; if (isAtPrefix && idx < variantEntries.length - 1) { return { matcher: m, handle: (input, next) => next({ ...input, parent: `${input.parent ? `${input.parent} $$ ` : ""}@media (min-width: ${size}) and (max-width: ${calcMaxWidthBySize(variantEntries[idx + 1][1])})`, parentOrder: order }) }; } return { matcher: m, handle: (input, next) => next({ ...input, parent: `${input.parent ? `${input.parent} $$ ` : ""}@media (min-width: ${size})`, parentOrder: order }) }; } }, multiPass: true, autocomplete: "(at-|lt-|max-|)$breakpoints:" }; } function scopeMatcher(name42, combinator) { return { name: `combinator:${name42}`, match(matcher, ctx) { if (!matcher.startsWith(name42)) return; const separators = ctx.generator.config.separators; let body = variantGetBracket(`${name42}-`, matcher, separators); if (!body) { for (const separator of separators) { if (matcher.startsWith(`${name42}${separator}`)) { body = ["", matcher.slice(name42.length + separator.length)]; break; } } if (!body) return; } let bracketValue = h.bracket(body[0]) ?? ""; if (bracketValue === "") bracketValue = "*"; return { matcher: body[1], selector: (s) => `${s}${combinator}${bracketValue}` }; }, multiPass: true }; } var variantCombinators = [ scopeMatcher("all", " "), scopeMatcher("children", ">"), scopeMatcher("next", "+"), scopeMatcher("sibling", "+"), scopeMatcher("siblings", "~") ]; var variantContainerQuery = { name: "@", match(matcher, ctx) { if (matcher.startsWith("@container")) return; const variant = variantGetParameter("@", matcher, ctx.generator.config.separators); if (variant) { const [match, rest, label] = variant; const unbracket = h.bracket(match); let container2; if (unbracket) { const minWidth = h.numberWithUnit(unbracket); if (minWidth) container2 = `(min-width: ${minWidth})`; } else { container2 = ctx.theme.containers?.[match] ?? ""; } if (container2) { warnOnce("The container query variant is experimental and may not follow semver."); let order = 1e3 + Object.keys(ctx.theme.containers ?? {}).indexOf(match); if (label) order += 1e3; return { matcher: rest, handle: (input, next) => next({ ...input, parent: `${input.parent ? `${input.parent} $$ ` : ""}@container${label ? ` ${label} ` : " "}${container2}`, parentOrder: order }) }; } } }, multiPass: true }; function variantColorsMediaOrClass(options = {}) { if (options?.dark === "class" || typeof options.dark === "object") { const { dark = ".dark", light = ".light" } = typeof options.dark === "string" ? {} : options.dark; return [ variantMatcher("dark", (input) => ({ prefix: `${dark} $$ ${input.prefix}` })), variantMatcher("light", (input) => ({ prefix: `${light} $$ ${input.prefix}` })) ]; } return [ variantParentMatcher("dark", "@media (prefers-color-scheme: dark)"), variantParentMatcher("light", "@media (prefers-color-scheme: light)") ]; } var variantDataAttribute = { name: "data", match(matcher, ctx) { const variant = variantGetParameter("data-", matcher, ctx.generator.config.separators); if (variant) { const [match, rest] = variant; const dataAttribute = h.bracket(match) ?? ctx.theme.data?.[match] ?? ""; if (dataAttribute) { return { matcher: rest, selector: (s) => `${s}[data-${dataAttribute}]` }; } } } }; function taggedData(tagName) { return { name: `${tagName}-data`, match(matcher, ctx) { const variant = variantGetParameter(`${tagName}-data-`, matcher, ctx.generator.config.separators); if (variant) { const [match, rest] = variant; const dataAttribute = h.bracket(match) ?? ctx.theme.data?.[match] ?? ""; if (dataAttribute) { return { matcher: `${tagName}-[[data-${dataAttribute}]]:${rest}` }; } } } }; } var variantTaggedDataAttributes = [ taggedData("group"), taggedData("peer"), taggedData("parent"), taggedData("previous") ]; var variantLanguageDirections = [ variantMatcher("rtl", (input) => ({ prefix: `[dir="rtl"] $$ ${input.prefix}` })), variantMatcher("ltr", (input) => ({ prefix: `[dir="ltr"] $$ ${input.prefix}` })) ]; var variantSelector = { name: "selector", match(matcher, ctx) { const variant = variantGetBracket("selector-", matcher, ctx.generator.config.separators); if (variant) { const [match, rest] = variant; const selector2 = h.bracket(match); if (selector2) { return { matcher: rest, selector: () => selector2 }; } } } }; var variantCssLayer = { name: "layer", match(matcher, ctx) { const variant = variantGetParameter("layer-", matcher, ctx.generator.config.separators); if (variant) { const [match, rest] = variant; const layer = h.bracket(match) ?? match; if (layer) { return { matcher: rest, handle: (input, next) => next({ ...input, parent: `${input.parent ? `${input.parent} $$ ` : ""}@layer ${layer}` }) }; } } } }; var variantInternalLayer = { name: "uno-layer", match(matcher, ctx) { const variant = variantGetParameter("uno-layer-", matcher, ctx.generator.config.separators); if (variant) { const [match, rest] = variant; const layer = h.bracket(match) ?? match; if (layer) { return { matcher: rest, layer }; } } } }; var variantScope = { name: "scope", match(matcher, ctx) { const variant = variantGetBracket("scope-", matcher, ctx.generator.config.separators); if (variant) { const [match, rest] = variant; const scope = h.bracket(match); if (scope) { return { matcher: rest, selector: (s) => `${scope} $$ ${s}` }; } } } }; var variantVariables = { name: "variables", match(matcher, ctx) { if (!matcher.startsWith("[")) return; const [match, rest] = getBracket(matcher, "[", "]") ?? []; if (!(match && rest)) return; let newMatcher; for (const separator of ctx.generator.config.separators) { if (rest.startsWith(separator)) { newMatcher = rest.slice(separator.length); break; } } if (newMatcher == null) return; const variant = h.bracket(match) ?? ""; const useParent = variant.startsWith("@"); if (!(useParent || variant.includes("&"))) return; return { matcher: newMatcher, handle(input, next) { const updates = useParent ? { parent: `${input.parent ? `${input.parent} $$ ` : ""}${variant}` } : { selector: variant.replace(/&/g, input.selector) }; return next({ ...input, ...updates }); } }; }, multiPass: true }; var variantTheme = { name: "theme-variables", match(matcher, ctx) { if (!hasThemeFn(matcher)) return; return { matcher, handle(input, next) { return next({ ...input, // entries: [ [ '--css-spacing', '28px' ] ], entries: JSON.parse(transformThemeFn(JSON.stringify(input.entries), ctx.theme)) }); } }; } }; var anchoredNumberRE = /^-?[0-9.]+(?:[a-z]+|%)?$/; var numberRE2 = /-?[0-9.]+(?:[a-z]+|%)?/; var ignoreProps = [ /\b(opacity|color|flex|backdrop-filter|^filter|transform)\b/ ]; function negateMathFunction(value) { const match = value.match(cssMathFnRE); if (match) { const [fnBody, rest] = getStringComponent(`(${match[2]})${match[3]}`, "(", ")", " ") ?? []; if (fnBody) return `calc(${match[1]}${fnBody} * -1)${rest ? ` ${rest}` : ""}`; } } var negateFunctionBodyRE = /\b(hue-rotate)\s*(\(.*)/; function negateFunctionBody(value) { const match = value.match(negateFunctionBodyRE); if (match) { const [fnBody, rest] = getStringComponent(match[2], "(", ")", " ") ?? []; if (fnBody) { const body = anchoredNumberRE.test(fnBody.slice(1, -1)) ? fnBody.replace(numberRE2, (i) => i.startsWith("-") ? i.slice(1) : `-${i}`) : `(calc(${fnBody} * -1))`; return `${match[1]}${body}${rest ? ` ${rest}` : ""}`; } } } var variantNegative = { name: "negative", match(matcher) { if (!matcher.startsWith("-")) return; return { matcher: matcher.slice(1), body: (body) => { if (body.find((v) => v[0] === CONTROL_MINI_NO_NEGATIVE)) return; let changed = false; body.forEach((v) => { const value = v[1]?.toString(); if (!value || value === "0") return; if (ignoreProps.some((i) => i.test(v[0]))) return; const negatedFn = negateMathFunction(value); if (negatedFn) { v[1] = negatedFn; changed = true; return; } const negatedBody = negateFunctionBody(value); if (negatedBody) { v[1] = negatedBody; changed = true; return; } if (anchoredNumberRE.test(value)) { v[1] = value.replace(numberRE2, (i) => i.startsWith("-") ? i.slice(1) : `-${i}`); changed = true; } }); if (changed) return body; return []; } }; } }; function variantImportant() { let re; return { name: "important", match(matcher, ctx) { if (!re) re = new RegExp(`^(important(?:${ctx.generator.config.separators.join("|")})|!)`); let base; const match = matcher.match(re); if (match) base = matcher.slice(match[0].length); else if (matcher.endsWith("!")) base = matcher.slice(0, -1); if (base) { return { matcher: base, body: (body) => { body.forEach((v) => { if (v[1]) v[1] += " !important"; }); return body; } }; } } }; } var variantPrint = variantParentMatcher("print", "@media print"); var variantCustomMedia = { name: "media", match(matcher, ctx) { const variant = variantGetParameter("media-", matcher, ctx.generator.config.separators); if (variant) { const [match, rest] = variant; let media2 = h.bracket(match) ?? ""; if (media2 === "") media2 = ctx.theme.media?.[match] ?? ""; if (media2) { return { matcher: rest, handle: (input, next) => next({ ...input, parent: `${input.parent ? `${input.parent} $$ ` : ""}@media ${media2}` }) }; } } }, multiPass: true }; var variantSupports = { name: "supports", match(matcher, ctx) { const variant = variantGetParameter("supports-", matcher, ctx.generator.config.separators); if (variant) { const [match, rest] = variant; let supports = h.bracket(match) ?? ""; if (supports === "") supports = ctx.theme.supports?.[match] ?? ""; if (supports) { return { matcher: rest, handle: (input, next) => next({ ...input, parent: `${input.parent ? `${input.parent} $$ ` : ""}@supports ${supports}` }) }; } } }, multiPass: true }; var PseudoClasses = Object.fromEntries([ // pseudo elements part 1 ["first-letter", "::first-letter"], ["first-line", "::first-line"], // location "any-link", "link", "visited", "target", ["open", "[open]"], // forms "default", "checked", "indeterminate", "placeholder-shown", "autofill", "optional", "required", "valid", "invalid", "user-valid", "user-invalid", "in-range", "out-of-range", "read-only", "read-write", // content "empty", // interactions "focus-within", "hover", "focus", "focus-visible", "active", "enabled", "disabled", "popover-open", // tree-structural "root", "empty", ["even-of-type", ":nth-of-type(even)"], ["even", ":nth-child(even)"], ["odd-of-type", ":nth-of-type(odd)"], ["odd", ":nth-child(odd)"], "first-of-type", ["first", ":first-child"], "last-of-type", ["last", ":last-child"], "only-child", "only-of-type", // pseudo elements part 2 ["backdrop-element", "::backdrop"], ["placeholder", "::placeholder"], ["before", "::before"], ["after", "::after"], ["selection", "::selection"], ["marker", "::marker"], ["file", "::file-selector-button"] ].map((key) => Array.isArray(key) ? key : [key, `:${key}`])); var PseudoClassesKeys = Object.keys(PseudoClasses); var PseudoClassesColon = Object.fromEntries([ ["backdrop", "::backdrop"] ].map((key) => Array.isArray(key) ? key : [key, `:${key}`])); var PseudoClassesColonKeys = Object.keys(PseudoClassesColon); var PseudoClassFunctions = [ "not", "is", "where", "has" ]; var PseudoClassesStr = Object.entries(PseudoClasses).filter(([, pseudo]) => !pseudo.startsWith("::")).map(([key]) => key).sort((a, b) => b.length - a.length).join("|"); var PseudoClassesColonStr = Object.entries(PseudoClassesColon).filter(([, pseudo]) => !pseudo.startsWith("::")).map(([key]) => key).sort((a, b) => b.length - a.length).join("|"); var PseudoClassFunctionsStr = PseudoClassFunctions.join("|"); function taggedPseudoClassMatcher(tag, parent, combinator) { const rawRE = new RegExp(`^(${escapeRegExp(parent)}:)(\\S+)${escapeRegExp(combinator)}\\1`); let splitRE; let pseudoRE; let pseudoColonRE; let pseudoVarRE; const matchBracket = (input) => { const body = variantGetBracket(`${tag}-`, input, []); if (!body) return; const [match, rest] = body; const bracketValue = h.bracket(match); if (bracketValue == null) return; const label = rest.split(splitRE, 1)?.[0] ?? ""; const prefix = `${parent}${escapeSelector(label)}`; return [ label, input.slice(input.length - (rest.length - label.length - 1)), bracketValue.includes("&") ? bracketValue.replace(/&/g, prefix) : `${prefix}${bracketValue}` ]; }; const matchPseudo = (input) => { const match = input.match(pseudoRE) || input.match(pseudoColonRE); if (!match) return; const [original, fn, pseudoKey] = match; const label = match[3] ?? ""; let pseudo = PseudoClasses[pseudoKey] || PseudoClassesColon[pseudoKey] || `:${pseudoKey}`; if (fn) pseudo = `:${fn}(${pseudo})`; return [ label, input.slice(original.length), `${parent}${escapeSelector(label)}${pseudo}`, pseudoKey ]; }; const matchPseudoVar = (input) => { const match = input.match(pseudoVarRE); if (!match) return; const [original, fn, pseudoValue] = match; const label = match[3] ?? ""; const pseudo = `:${fn}(${pseudoValue})`; return [ label, input.slice(original.length), `${parent}${escapeSelector(label)}${pseudo}` ]; }; return { name: `pseudo:${tag}`, match(input, ctx) { if (!(splitRE && pseudoRE && pseudoColonRE)) { splitRE = new RegExp(`(?:${ctx.generator.config.separators.join("|")})`); pseudoRE = new RegExp(`^${tag}-(?:(?:(${PseudoClassFunctionsStr})-)?(${PseudoClassesStr}))(?:(/\\w+))?(?:${ctx.generator.config.separators.join("|")})`); pseudoColonRE = new RegExp(`^${tag}-(?:(?:(${PseudoClassFunctionsStr})-)?(${PseudoClassesColonStr}))(?:(/\\w+))?(?:${ctx.generator.config.separators.filter((x2) => x2 !== "-").join("|")})`); pseudoVarRE = new RegExp(`^${tag}-(?:(${PseudoClassFunctionsStr})-)?\\[(.+)\\](?:(/\\w+))?(?:${ctx.generator.config.separators.filter((x2) => x2 !== "-").join("|")})`); } if (!input.startsWith(tag)) return; const result = matchBracket(input) || matchPseudo(input) || matchPseudoVar(input); if (!result) return; const [label, matcher, prefix, pseudoName = ""] = result; if (label !== "") warnOnce("The labeled variant is experimental and may not follow semver."); return { matcher, handle: (input2, next) => next({ ...input2, prefix: `${prefix}${combinator}${input2.prefix}`.replace(rawRE, "$1$2:"), sort: PseudoClassesKeys.indexOf(pseudoName) ?? PseudoClassesColonKeys.indexOf(pseudoName) }) }; }, multiPass: true }; } var excludedPseudo = [ "::-webkit-resizer", "::-webkit-scrollbar", "::-webkit-scrollbar-button", "::-webkit-scrollbar-corner", "::-webkit-scrollbar-thumb", "::-webkit-scrollbar-track", "::-webkit-scrollbar-track-piece", "::file-selector-button" ]; var PseudoClassesAndElementsStr = Object.entries(PseudoClasses).map(([key]) => key).sort((a, b) => b.length - a.length).join("|"); var PseudoClassesAndElementsColonStr = Object.entries(PseudoClassesColon).map(([key]) => key).sort((a, b) => b.length - a.length).join("|"); function variantPseudoClassesAndElements() { let PseudoClassesAndElementsRE; let PseudoClassesAndElementsColonRE; return { name: "pseudo", match(input, ctx) { if (!(PseudoClassesAndElementsRE && PseudoClassesAndElementsRE)) { PseudoClassesAndElementsRE = new RegExp(`^(${PseudoClassesAndElementsStr})(?:${ctx.generator.config.separators.join("|")})`); PseudoClassesAndElementsColonRE = new RegExp(`^(${PseudoClassesAndElementsColonStr})(?:${ctx.generator.config.separators.filter((x2) => x2 !== "-").join("|")})`); } const match = input.match(PseudoClassesAndElementsRE) || input.match(PseudoClassesAndElementsColonRE); if (match) { const pseudo = PseudoClasses[match[1]] || PseudoClassesColon[match[1]] || `:${match[1]}`; let index = PseudoClassesKeys.indexOf(match[1]); if (index === -1) index = PseudoClassesColonKeys.indexOf(match[1]); if (index === -1) index = void 0; return { matcher: input.slice(match[0].length), handle: (input2, next) => { const selectors = pseudo.startsWith("::") && !excludedPseudo.includes(pseudo) ? { pseudo: `${input2.pseudo}${pseudo}` } : { selector: `${input2.selector}${pseudo}` }; return next({ ...input2, ...selectors, sort: index, noMerge: true }); } }; } }, multiPass: true, autocomplete: `(${PseudoClassesAndElementsStr}|${PseudoClassesAndElementsColonStr}):` }; } function variantPseudoClassFunctions() { let PseudoClassFunctionsRE; let PseudoClassColonFunctionsRE; let PseudoClassVarFunctionRE; return { match(input, ctx) { if (!(PseudoClassFunctionsRE && PseudoClassColonFunctionsRE)) { PseudoClassFunctionsRE = new RegExp(`^(${PseudoClassFunctionsStr})-(${PseudoClassesStr})(?:${ctx.generator.config.separators.join("|")})`); PseudoClassColonFunctionsRE = new RegExp(`^(${PseudoClassFunctionsStr})-(${PseudoClassesColonStr})(?:${ctx.generator.config.separators.filter((x2) => x2 !== "-").join("|")})`); PseudoClassVarFunctionRE = new RegExp(`^(${PseudoClassFunctionsStr})-(\\[.+\\])(?:${ctx.generator.config.separators.filter((x2) => x2 !== "-").join("|")})`); } const match = input.match(PseudoClassFunctionsRE) || input.match(PseudoClassColonFunctionsRE) || input.match(PseudoClassVarFunctionRE); if (match) { const fn = match[1]; const fnVal = getBracket(match[2], "[", "]"); const pseudo = fnVal ? h.bracket(match[2]) : PseudoClasses[match[2]] || PseudoClassesColon[match[2]] || `:${match[2]}`; return { matcher: input.slice(match[0].length), selector: (s) => `${s}:${fn}(${pseudo})` }; } }, multiPass: true, autocomplete: `(${PseudoClassFunctionsStr})-(${PseudoClassesStr}|${PseudoClassesColonStr}):` }; } function variantTaggedPseudoClasses(options = {}) { const attributify = !!options?.attributifyPseudo; let firstPrefix = options?.prefix ?? ""; firstPrefix = (Array.isArray(firstPrefix) ? firstPrefix : [firstPrefix]).filter(Boolean)[0] ?? ""; const tagWithPrefix = (tag, combinator) => taggedPseudoClassMatcher(tag, attributify ? `[${firstPrefix}${tag}=""]` : `.${firstPrefix}${tag}`, combinator); return [ tagWithPrefix("group", " "), tagWithPrefix("peer", "~"), tagWithPrefix("parent", ">"), tagWithPrefix("previous", "+") ]; } var PartClassesRE = /(part-\[(.+)]:)(.+)/; var variantPartClasses = { match(input) { const match = input.match(PartClassesRE); if (match) { const part = `part(${match[2]})`; return { matcher: input.slice(match[1].length), selector: (s) => `${s}::${part}` }; } }, multiPass: true }; function variants(options) { return [ variantAria, variantDataAttribute, variantCssLayer, variantSelector, variantInternalLayer, variantNegative, variantImportant(), variantSupports, variantPrint, variantCustomMedia, variantBreakpoints(), ...variantCombinators, variantPseudoClassesAndElements(), variantPseudoClassFunctions(), ...variantTaggedPseudoClasses(options), variantPartClasses, ...variantColorsMediaOrClass(options), ...variantLanguageDirections, variantScope, variantContainerQuery, variantVariables, ...variantTaggedDataAttributes, variantTheme ]; } // node_modules/.pnpm/@unocss+preset-mini@0.58.9/node_modules/@unocss/preset-mini/dist/index.mjs var preflights = [ { layer: "preflights", getCSS(ctx) { if (ctx.theme.preflightBase) { const css = entriesToCss(Object.entries(ctx.theme.preflightBase)); const roots = toArray(ctx.theme.preflightRoot ?? ["*,::before,::after", "::backdrop"]); return roots.map((root) => `${root}{${css}}`).join(""); } } } ]; var shorthands = { position: [ "relative", "absolute", "fixed", "sticky", "static" ], globalKeyword: globalKeywords }; var presetMini = definePreset((options = {}) => { options.dark = options.dark ?? "class"; options.attributifyPseudo = options.attributifyPseudo ?? false; options.preflight = options.preflight ?? true; options.variablePrefix = options.variablePrefix ?? "un-"; return { name: "@unocss/preset-mini", theme, rules, variants: variants(options), options, prefix: options.prefix, postprocess: VarPrefixPostprocessor(options.variablePrefix), preflights: options.preflight ? normalizePreflights(preflights, options.variablePrefix) : [], extractorDefault: options.arbitraryVariants === false ? void 0 : extractorArbitraryVariants, autocomplete: { shorthands } }; }); function VarPrefixPostprocessor(prefix) { if (prefix !== "un-") { return (obj) => { obj.entries.forEach((i) => { i[0] = i[0].replace(/^--un-/, `--${prefix}`); if (typeof i[1] === "string") i[1] = i[1].replace(/var\(--un-/g, `var(--${prefix}`); }); }; } } function normalizePreflights(preflights3, variablePrefix) { if (variablePrefix !== "un-") { return preflights3.map((p) => ({ ...p, getCSS: /* @__PURE__ */ (() => async (ctx) => { const css = await p.getCSS(ctx); if (css) return css.replace(/--un-/g, `--${variablePrefix}`); })() })); } return preflights3; } // node_modules/.pnpm/@unocss+preset-wind@0.58.9/node_modules/@unocss/preset-wind/dist/index.mjs var animations = [ [/^(?:animate-)?keyframes-(.+)$/, ([, name42], { theme: theme3 }) => { const kf = theme3.animation?.keyframes?.[name42]; if (kf) { return [ `@keyframes ${name42}${kf}`, { animation: name42 } ]; } }, { autocomplete: ["animate-keyframes-$animation.keyframes", "keyframes-$animation.keyframes"] }], [/^animate-(.+)$/, ([, name42], { theme: theme3 }) => { const kf = theme3.animation?.keyframes?.[name42]; if (kf) { const duration2 = theme3.animation?.durations?.[name42] ?? "1s"; const timing = theme3.animation?.timingFns?.[name42] ?? "linear"; const count = theme3.animation?.counts?.[name42] ?? 1; const props = theme3.animation?.properties?.[name42]; return [ `@keyframes ${name42}${kf}`, { animation: `${name42} ${duration2} ${timing} ${count}`, ...props } ]; } return { animation: h.bracket.cssvar(name42) }; }, { autocomplete: "animate-$animation.keyframes" }], [/^animate-name-(.+)/, ([, d]) => ({ "animation-name": h.bracket.cssvar(d) ?? d })], // timings [/^animate-duration-(.+)$/, ([, d], { theme: theme3 }) => ({ "animation-duration": theme3.duration?.[d || "DEFAULT"] ?? h.bracket.cssvar.time(d) }), { autocomplete: ["animate-duration", "animate-duration-$duration"] }], [/^animate-delay-(.+)$/, ([, d], { theme: theme3 }) => ({ "animation-delay": theme3.duration?.[d || "DEFAULT"] ?? h.bracket.cssvar.time(d) }), { autocomplete: ["animate-delay", "animate-delay-$duration"] }], [/^animate-ease(?:-(.+))?$/, ([, d], { theme: theme3 }) => ({ "animation-timing-function": theme3.easing?.[d || "DEFAULT"] ?? h.bracket.cssvar(d) }), { autocomplete: ["animate-ease", "animate-ease-$easing"] }], // fill mode [/^animate-(fill-mode-|fill-|mode-)?(.+)$/, ([, t, d]) => ["none", "forwards", "backwards", "both", ...[t ? globalKeywords : []]].includes(d) ? { "animation-fill-mode": d } : void 0, { autocomplete: [ "animate-(fill|mode|fill-mode)", "animate-(fill|mode|fill-mode)-(none|forwards|backwards|both|inherit|initial|revert|revert-layer|unset)", "animate-(none|forwards|backwards|both|inherit|initial|revert|revert-layer|unset)" ] }], // direction [/^animate-(direction-)?(.+)$/, ([, t, d]) => ["normal", "reverse", "alternate", "alternate-reverse", ...[t ? globalKeywords : []]].includes(d) ? { "animation-direction": d } : void 0, { autocomplete: [ "animate-direction", "animate-direction-(normal|reverse|alternate|alternate-reverse|inherit|initial|revert|revert-layer|unset)", "animate-(normal|reverse|alternate|alternate-reverse|inherit|initial|revert|revert-layer|unset)" ] }], // others [/^animate-(?:iteration-count-|iteration-|count-)(.+)$/, ([, d]) => ({ "animation-iteration-count": h.bracket.cssvar(d) ?? d.replace(/\-/g, ",") }), { autocomplete: ["animate-(iteration|count|iteration-count)", "animate-(iteration|count|iteration-count)-"] }], [/^animate-(play-state-|play-|state-)?(.+)$/, ([, t, d]) => ["paused", "running", ...[t ? globalKeywords : []]].includes(d) ? { "animation-play-state": d } : void 0, { autocomplete: [ "animate-(play|state|play-state)", "animate-(play|state|play-state)-(paused|running|inherit|initial|revert|revert-layer|unset)", "animate-(paused|running|inherit|initial|revert|revert-layer|unset)" ] }], ["animate-none", { animation: "none" }], ...makeGlobalStaticRules("animate", "animation") ]; function bgGradientToValue(cssColor) { if (cssColor) return colorToString(cssColor, 0); return "rgb(255 255 255 / 0)"; } function bgGradientColorValue(mode, cssColor, color, alpha) { if (cssColor) { if (alpha != null) return colorToString(cssColor, alpha); else return colorToString(cssColor, `var(--un-${mode}-opacity, ${colorOpacityToString(cssColor)})`); } return colorToString(color, alpha); } function bgGradientColorResolver() { return ([, mode, body], { theme: theme3 }) => { const data = parseColor2(body, theme3, "backgroundColor"); if (!data) return; const { alpha, color, cssColor } = data; if (!color) return; const colorString = bgGradientColorValue(mode, cssColor, color, alpha); switch (mode) { case "from": return { "--un-gradient-from-position": "0%", "--un-gradient-from": `${colorString} var(--un-gradient-from-position)`, "--un-gradient-to-position": "100%", "--un-gradient-to": `${bgGradientToValue(cssColor)} var(--un-gradient-to-position)`, "--un-gradient-stops": "var(--un-gradient-from), var(--un-gradient-to)" }; case "via": return { "--un-gradient-via-position": "50%", "--un-gradient-to": bgGradientToValue(cssColor), "--un-gradient-stops": `var(--un-gradient-from), ${colorString} var(--un-gradient-via-position), var(--un-gradient-to)` }; case "to": return { "--un-gradient-to-position": "100%", "--un-gradient-to": `${colorString} var(--un-gradient-to-position)` }; } }; } function bgGradientPositionResolver() { return ([, mode, body]) => { return { [`--un-gradient-${mode}-position`]: `${Number(h.bracket.cssvar.percent(body)) * 100}%` }; }; } var backgroundStyles = [ // gradients [/^bg-gradient-(.+)$/, ([, d]) => ({ "--un-gradient": h.bracket(d) }), { autocomplete: ["bg-gradient", "bg-gradient-(from|to|via)", "bg-gradient-(from|to|via)-$colors", "bg-gradient-(from|to|via)-(op|opacity)", "bg-gradient-(from|to|via)-(op|opacity)-"] }], [/^(?:bg-gradient-)?stops-(\[.+\])$/, ([, s]) => ({ "--un-gradient-stops": h.bracket(s) })], [/^(?:bg-gradient-)?(from)-(.+)$/, bgGradientColorResolver()], [/^(?:bg-gradient-)?(via)-(.+)$/, bgGradientColorResolver()], [/^(?:bg-gradient-)?(to)-(.+)$/, bgGradientColorResolver()], [/^(?:bg-gradient-)?(from|via|to)-op(?:acity)?-?(.+)$/, ([, position2, opacity2]) => ({ [`--un-${position2}-opacity`]: h.bracket.percent(opacity2) })], [/^(from|via|to)-([\d\.]+)%$/, bgGradientPositionResolver()], // images [/^bg-gradient-((?:repeating-)?(?:linear|radial|conic))$/, ([, s]) => ({ "background-image": `${s}-gradient(var(--un-gradient, var(--un-gradient-stops, rgb(255 255 255 / 0))))` }), { autocomplete: ["bg-gradient-repeating", "bg-gradient-(linear|radial|conic)", "bg-gradient-repeating-(linear|radial|conic)"] }], // ignore any center position [/^bg-gradient-to-([rltb]{1,2})$/, ([, d]) => { if (d in positionMap) { return { "--un-gradient-shape": `to ${positionMap[d]}`, "--un-gradient": "var(--un-gradient-shape), var(--un-gradient-stops)", "background-image": "linear-gradient(var(--un-gradient))" }; } }, { autocomplete: `bg-gradient-to-(${Object.keys(positionMap).filter((k) => k.length <= 2 && Array.from(k).every((c) => "rltb".includes(c))).join("|")})` }], [/^(?:bg-gradient-)?shape-(.+)$/, ([, d]) => { const v = d in positionMap ? `to ${positionMap[d]}` : h.bracket(d); if (v != null) { return { "--un-gradient-shape": v, "--un-gradient": "var(--un-gradient-shape), var(--un-gradient-stops)" }; } }, { autocomplete: ["bg-gradient-shape", `bg-gradient-shape-(${Object.keys(positionMap).join("|")})`, `shape-(${Object.keys(positionMap).join("|")})`] }], ["bg-none", { "background-image": "none" }], ["box-decoration-slice", { "box-decoration-break": "slice" }], ["box-decoration-clone", { "box-decoration-break": "clone" }], ...makeGlobalStaticRules("box-decoration", "box-decoration-break"), // size ["bg-auto", { "background-size": "auto" }], ["bg-cover", { "background-size": "cover" }], ["bg-contain", { "background-size": "contain" }], // attachments ["bg-fixed", { "background-attachment": "fixed" }], ["bg-local", { "background-attachment": "local" }], ["bg-scroll", { "background-attachment": "scroll" }], // clips ["bg-clip-border", { "-webkit-background-clip": "border-box", "background-clip": "border-box" }], ["bg-clip-content", { "-webkit-background-clip": "content-box", "background-clip": "content-box" }], ["bg-clip-padding", { "-webkit-background-clip": "padding-box", "background-clip": "padding-box" }], ["bg-clip-text", { "-webkit-background-clip": "text", "background-clip": "text" }], ...globalKeywords.map((keyword2) => [`bg-clip-${keyword2}`, { "-webkit-background-clip": keyword2, "background-clip": keyword2 }]), // positions // skip 1 & 2 letters shortcut [/^bg-([-\w]{3,})$/, ([, s]) => ({ "background-position": positionMap[s] })], // repeats ["bg-repeat", { "background-repeat": "repeat" }], ["bg-no-repeat", { "background-repeat": "no-repeat" }], ["bg-repeat-x", { "background-repeat": "repeat-x" }], ["bg-repeat-y", { "background-repeat": "repeat-y" }], ["bg-repeat-round", { "background-repeat": "round" }], ["bg-repeat-space", { "background-repeat": "space" }], ...makeGlobalStaticRules("bg-repeat", "background-repeat"), // origins ["bg-origin-border", { "background-origin": "border-box" }], ["bg-origin-padding", { "background-origin": "padding-box" }], ["bg-origin-content", { "background-origin": "content-box" }], ...makeGlobalStaticRules("bg-origin", "background-origin") ]; var listStyles = { "disc": "disc", "circle": "circle", "square": "square", "decimal": "decimal", "zero-decimal": "decimal-leading-zero", "greek": "lower-greek", "roman": "lower-roman", "upper-roman": "upper-roman", "alpha": "lower-alpha", "upper-alpha": "upper-alpha", "latin": "lower-latin", "upper-latin": "upper-latin" }; var listStyle = [ // base [/^list-(.+?)(?:-(outside|inside))?$/, ([, alias, position2]) => { const style = listStyles[alias]; if (style) { if (position2) { return { "list-style-position": position2, "list-style-type": style }; } return { "list-style-type": style }; } }, { autocomplete: [`list-(${Object.keys(listStyles).join("|")})`, `list-(${Object.keys(listStyles).join("|")})-(outside|inside)`] }], // styles ["list-outside", { "list-style-position": "outside" }], ["list-inside", { "list-style-position": "inside" }], ["list-none", { "list-style-type": "none" }], // image [/^list-image-(.+)$/, ([, d]) => { if (/^\[url\(.+\)\]$/.test(d)) return { "list-style-image": h.bracket(d) }; }], ["list-image-none", { "list-style-image": "none" }], ...makeGlobalStaticRules("list", "list-style-type") ]; var accents = [ [/^accent-(.+)$/, colorResolver("accent-color", "accent", "accentColor"), { autocomplete: "accent-$colors" }], [/^accent-op(?:acity)?-?(.+)$/, ([, d]) => ({ "--un-accent-opacity": h.bracket.percent(d) }), { autocomplete: ["accent-(op|opacity)", "accent-(op|opacity)-"] }] ]; var carets = [ [/^caret-(.+)$/, colorResolver("caret-color", "caret", "textColor"), { autocomplete: "caret-$colors" }], [/^caret-op(?:acity)?-?(.+)$/, ([, d]) => ({ "--un-caret-opacity": h.bracket.percent(d) }), { autocomplete: ["caret-(op|opacity)", "caret-(op|opacity)-"] }] ]; var imageRenderings = [ ["image-render-auto", { "image-rendering": "auto" }], ["image-render-edge", { "image-rendering": "crisp-edges" }], ["image-render-pixel", [ ["-ms-interpolation-mode", "nearest-neighbor"], ["image-rendering", "-webkit-optimize-contrast"], ["image-rendering", "-moz-crisp-edges"], ["image-rendering", "-o-pixelated"], ["image-rendering", "pixelated"] ]] ]; var overscrolls = [ ["overscroll-auto", { "overscroll-behavior": "auto" }], ["overscroll-contain", { "overscroll-behavior": "contain" }], ["overscroll-none", { "overscroll-behavior": "none" }], ...makeGlobalStaticRules("overscroll", "overscroll-behavior"), ["overscroll-x-auto", { "overscroll-behavior-x": "auto" }], ["overscroll-x-contain", { "overscroll-behavior-x": "contain" }], ["overscroll-x-none", { "overscroll-behavior-x": "none" }], ...makeGlobalStaticRules("overscroll-x", "overscroll-behavior-x"), ["overscroll-y-auto", { "overscroll-behavior-y": "auto" }], ["overscroll-y-contain", { "overscroll-behavior-y": "contain" }], ["overscroll-y-none", { "overscroll-behavior-y": "none" }], ...makeGlobalStaticRules("overscroll-y", "overscroll-behavior-y") ]; var scrollBehaviors = [ ["scroll-auto", { "scroll-behavior": "auto" }], ["scroll-smooth", { "scroll-behavior": "smooth" }], ...makeGlobalStaticRules("scroll", "scroll-behavior") ]; var columns = [ [/^columns-(.+)$/, ([, v]) => ({ columns: h.bracket.global.number.auto.numberWithUnit(v) }), { autocomplete: "columns-" }], // break before ["break-before-auto", { "break-before": "auto" }], ["break-before-avoid", { "break-before": "avoid" }], ["break-before-all", { "break-before": "all" }], ["break-before-avoid-page", { "break-before": "avoid-page" }], ["break-before-page", { "break-before": "page" }], ["break-before-left", { "break-before": "left" }], ["break-before-right", { "break-before": "right" }], ["break-before-column", { "break-before": "column" }], ...makeGlobalStaticRules("break-before"), // break inside ["break-inside-auto", { "break-inside": "auto" }], ["break-inside-avoid", { "break-inside": "avoid" }], ["break-inside-avoid-page", { "break-inside": "avoid-page" }], ["break-inside-avoid-column", { "break-inside": "avoid-column" }], ...makeGlobalStaticRules("break-inside"), // break after ["break-after-auto", { "break-after": "auto" }], ["break-after-avoid", { "break-after": "avoid" }], ["break-after-all", { "break-after": "all" }], ["break-after-avoid-page", { "break-after": "avoid-page" }], ["break-after-page", { "break-after": "page" }], ["break-after-left", { "break-after": "left" }], ["break-after-right", { "break-after": "right" }], ["break-after-column", { "break-after": "column" }], ...makeGlobalStaticRules("break-after") ]; var queryMatcher = /@media \(min-width: (.+)\)/; var container = [ [ /^__container$/, (m, context) => { const { theme: theme3, variantHandlers } = context; const themePadding = theme3.container?.padding; let padding; if (isString(themePadding)) padding = themePadding; else padding = themePadding?.DEFAULT; const themeMaxWidth = theme3.container?.maxWidth; let maxWidth2; for (const v of variantHandlers) { const query = v.handle?.({}, (x2) => x2)?.parent; if (isString(query)) { const match = query.match(queryMatcher)?.[1]; if (match) { const bp = resolveBreakpoints(context) ?? []; const matchBp = bp.find((i) => i.size === match)?.point; if (!themeMaxWidth) maxWidth2 = match; else if (matchBp) maxWidth2 = themeMaxWidth?.[matchBp]; if (matchBp && !isString(themePadding)) padding = themePadding?.[matchBp] ?? padding; } } } const css = { "max-width": maxWidth2 }; if (!variantHandlers.length) css.width = "100%"; if (theme3.container?.center) { css["margin-left"] = "auto"; css["margin-right"] = "auto"; } if (themePadding) { css["padding-left"] = padding; css["padding-right"] = padding; } return css; }, { internal: true } ] ]; var containerShortcuts = [ [/^(?:(\w+)[:-])?container$/, ([, bp], context) => { let points = (resolveBreakpoints(context) ?? []).map((i) => i.point); if (bp) { if (!points.includes(bp)) return; points = points.slice(points.indexOf(bp)); } const shortcuts2 = points.map((p) => `${p}:__container`); if (!bp) shortcuts2.unshift("__container"); return shortcuts2; }] ]; var filterBase = { "--un-blur": varEmpty, "--un-brightness": varEmpty, "--un-contrast": varEmpty, "--un-drop-shadow": varEmpty, "--un-grayscale": varEmpty, "--un-hue-rotate": varEmpty, "--un-invert": varEmpty, "--un-saturate": varEmpty, "--un-sepia": varEmpty }; var filterProperty = "var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)"; var backdropFilterBase = { "--un-backdrop-blur": varEmpty, "--un-backdrop-brightness": varEmpty, "--un-backdrop-contrast": varEmpty, "--un-backdrop-grayscale": varEmpty, "--un-backdrop-hue-rotate": varEmpty, "--un-backdrop-invert": varEmpty, "--un-backdrop-opacity": varEmpty, "--un-backdrop-saturate": varEmpty, "--un-backdrop-sepia": varEmpty }; var backdropFilterProperty = "var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)"; function percentWithDefault(str) { let v = h.bracket.cssvar(str || ""); if (v != null) return v; v = str ? h.percent(str) : "1"; if (v != null && Number.parseFloat(v) <= 1) return v; } function toFilter(varName, resolver) { return ([, b, s], { theme: theme3 }) => { const value = resolver(s, theme3) ?? (s === "none" ? "0" : ""); if (value !== "") { if (b) { return { [`--un-${b}${varName}`]: `${varName}(${value})`, "-webkit-backdrop-filter": backdropFilterProperty, "backdrop-filter": backdropFilterProperty }; } else { return { [`--un-${varName}`]: `${varName}(${value})`, filter: filterProperty }; } } }; } function dropShadowResolver([, s], { theme: theme3 }) { let v = theme3.dropShadow?.[s || "DEFAULT"]; if (v != null) { const shadows = colorableShadows(v, "--un-drop-shadow-color"); return { "--un-drop-shadow": `drop-shadow(${shadows.join(") drop-shadow(")})`, "filter": filterProperty }; } v = h.bracket.cssvar(s); if (v != null) { return { "--un-drop-shadow": `drop-shadow(${v})`, "filter": filterProperty }; } } var filters = [ // filters [/^(?:(backdrop-)|filter-)?blur(?:-(.+))?$/, toFilter("blur", (s, theme3) => theme3.blur?.[s || "DEFAULT"] || h.bracket.cssvar.px(s)), { autocomplete: ["(backdrop|filter)-blur-$blur", "blur-$blur", "filter-blur"] }], [/^(?:(backdrop-)|filter-)?brightness-(.+)$/, toFilter("brightness", (s) => h.bracket.cssvar.percent(s)), { autocomplete: ["(backdrop|filter)-brightness-", "brightness-"] }], [/^(?:(backdrop-)|filter-)?contrast-(.+)$/, toFilter("contrast", (s) => h.bracket.cssvar.percent(s)), { autocomplete: ["(backdrop|filter)-contrast-", "contrast-"] }], // drop-shadow only on filter [/^(?:filter-)?drop-shadow(?:-(.+))?$/, dropShadowResolver, { autocomplete: [ "filter-drop", "filter-drop-shadow", "filter-drop-shadow-color", "drop-shadow", "drop-shadow-color", "filter-drop-shadow-$dropShadow", "drop-shadow-$dropShadow", "filter-drop-shadow-color-$colors", "drop-shadow-color-$colors", "filter-drop-shadow-color-(op|opacity)", "drop-shadow-color-(op|opacity)", "filter-drop-shadow-color-(op|opacity)-", "drop-shadow-color-(op|opacity)-" ] }], [/^(?:filter-)?drop-shadow-color-(.+)$/, colorResolver("--un-drop-shadow-color", "drop-shadow", "shadowColor")], [/^(?:filter-)?drop-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-drop-shadow-opacity": h.bracket.percent(opacity2) })], [/^(?:(backdrop-)|filter-)?grayscale(?:-(.+))?$/, toFilter("grayscale", percentWithDefault), { autocomplete: ["(backdrop|filter)-grayscale", "(backdrop|filter)-grayscale-", "grayscale-"] }], [/^(?:(backdrop-)|filter-)?hue-rotate-(.+)$/, toFilter("hue-rotate", (s) => h.bracket.cssvar.degree(s))], [/^(?:(backdrop-)|filter-)?invert(?:-(.+))?$/, toFilter("invert", percentWithDefault), { autocomplete: ["(backdrop|filter)-invert", "(backdrop|filter)-invert-", "invert-"] }], // opacity only on backdrop-filter [/^(backdrop-)op(?:acity)-(.+)$/, toFilter("opacity", (s) => h.bracket.cssvar.percent(s)), { autocomplete: ["backdrop-(op|opacity)", "backdrop-(op|opacity)-"] }], [/^(?:(backdrop-)|filter-)?saturate-(.+)$/, toFilter("saturate", (s) => h.bracket.cssvar.percent(s)), { autocomplete: ["(backdrop|filter)-saturate", "(backdrop|filter)-saturate-", "saturate-"] }], [/^(?:(backdrop-)|filter-)?sepia(?:-(.+))?$/, toFilter("sepia", percentWithDefault), { autocomplete: ["(backdrop|filter)-sepia", "(backdrop|filter)-sepia-", "sepia-"] }], // base ["filter", { filter: filterProperty }], ["backdrop-filter", { "-webkit-backdrop-filter": backdropFilterProperty, "backdrop-filter": backdropFilterProperty }], // nones ["filter-none", { filter: "none" }], ["backdrop-filter-none", { "-webkit-backdrop-filter": "none", "backdrop-filter": "none" }], ...globalKeywords.map((keyword2) => [`filter-${keyword2}`, { filter: keyword2 }]), ...globalKeywords.map((keyword2) => [`backdrop-filter-${keyword2}`, { "-webkit-backdrop-filter": keyword2, "backdrop-filter": keyword2 }]) ]; var spaces = [ [/^space-([xy])-(-?.+)$/, handlerSpace, { autocomplete: ["space-(x|y|block|inline)", "space-(x|y|block|inline)-reverse", "space-(x|y|block|inline)-$spacing"] }], [/^space-([xy])-reverse$/, ([, d]) => ({ [`--un-space-${d}-reverse`]: 1 })], [/^space-(block|inline)-(-?.+)$/, handlerSpace], [/^space-(block|inline)-reverse$/, ([, d]) => ({ [`--un-space-${d}-reverse`]: 1 })] ]; function handlerSpace([, d, s], { theme: theme3 }) { let v = theme3.spacing?.[s || "DEFAULT"] ?? h.bracket.cssvar.auto.fraction.rem(s || "1"); if (v != null) { if (v === "0") v = "0px"; const results = directionMap[d].map((item) => { const key = `margin${item}`; const value = item.endsWith("right") || item.endsWith("bottom") ? `calc(${v} * var(--un-space-${d}-reverse))` : `calc(${v} * calc(1 - var(--un-space-${d}-reverse)))`; return [key, value]; }); if (results) { return [ [`--un-space-${d}-reverse`, 0], ...results ]; } } } var textTransforms2 = [ // tailwind compat ["uppercase", { "text-transform": "uppercase" }], ["lowercase", { "text-transform": "lowercase" }], ["capitalize", { "text-transform": "capitalize" }], ["normal-case", { "text-transform": "none" }] ]; var hyphens = [ ...["manual", "auto", "none", ...globalKeywords].map((keyword2) => [`hyphens-${keyword2}`, { "-webkit-hyphens": keyword2, "-ms-hyphens": keyword2, "hyphens": keyword2 }]) ]; var writingModes = [ ["write-vertical-right", { "writing-mode": "vertical-rl" }], ["write-vertical-left", { "writing-mode": "vertical-lr" }], ["write-normal", { "writing-mode": "horizontal-tb" }], ...makeGlobalStaticRules("write", "writing-mode") ]; var writingOrientations = [ ["write-orient-mixed", { "text-orientation": "mixed" }], ["write-orient-sideways", { "text-orientation": "sideways" }], ["write-orient-upright", { "text-orientation": "upright" }], ...makeGlobalStaticRules("write-orient", "text-orientation") ]; var screenReadersAccess = [ [ "sr-only", { "position": "absolute", "width": "1px", "height": "1px", "padding": "0", "margin": "-1px", "overflow": "hidden", "clip": "rect(0,0,0,0)", "white-space": "nowrap", "border-width": 0 } ], [ "not-sr-only", { "position": "static", "width": "auto", "height": "auto", "padding": "0", "margin": "0", "overflow": "visible", "clip": "auto", "white-space": "normal" } ] ]; var isolations = [ ["isolate", { isolation: "isolate" }], ["isolate-auto", { isolation: "auto" }], ["isolation-auto", { isolation: "auto" }] ]; var objectPositions = [ // object fit ["object-cover", { "object-fit": "cover" }], ["object-contain", { "object-fit": "contain" }], ["object-fill", { "object-fit": "fill" }], ["object-scale-down", { "object-fit": "scale-down" }], ["object-none", { "object-fit": "none" }], // object position [/^object-(.+)$/, ([, d]) => { if (positionMap[d]) return { "object-position": positionMap[d] }; if (h.bracketOfPosition(d) != null) return { "object-position": h.bracketOfPosition(d).split(" ").map((e2) => h.position.fraction.auto.px.cssvar(e2) ?? e2).join(" ") }; }, { autocomplete: `object-(${Object.keys(positionMap).join("|")})` }] ]; var backgroundBlendModes = [ ["bg-blend-multiply", { "background-blend-mode": "multiply" }], ["bg-blend-screen", { "background-blend-mode": "screen" }], ["bg-blend-overlay", { "background-blend-mode": "overlay" }], ["bg-blend-darken", { "background-blend-mode": "darken" }], ["bg-blend-lighten", { "background-blend-mode": "lighten" }], ["bg-blend-color-dodge", { "background-blend-mode": "color-dodge" }], ["bg-blend-color-burn", { "background-blend-mode": "color-burn" }], ["bg-blend-hard-light", { "background-blend-mode": "hard-light" }], ["bg-blend-soft-light", { "background-blend-mode": "soft-light" }], ["bg-blend-difference", { "background-blend-mode": "difference" }], ["bg-blend-exclusion", { "background-blend-mode": "exclusion" }], ["bg-blend-hue", { "background-blend-mode": "hue" }], ["bg-blend-saturation", { "background-blend-mode": "saturation" }], ["bg-blend-color", { "background-blend-mode": "color" }], ["bg-blend-luminosity", { "background-blend-mode": "luminosity" }], ["bg-blend-normal", { "background-blend-mode": "normal" }], ...makeGlobalStaticRules("bg-blend", "background-blend") ]; var mixBlendModes = [ ["mix-blend-multiply", { "mix-blend-mode": "multiply" }], ["mix-blend-screen", { "mix-blend-mode": "screen" }], ["mix-blend-overlay", { "mix-blend-mode": "overlay" }], ["mix-blend-darken", { "mix-blend-mode": "darken" }], ["mix-blend-lighten", { "mix-blend-mode": "lighten" }], ["mix-blend-color-dodge", { "mix-blend-mode": "color-dodge" }], ["mix-blend-color-burn", { "mix-blend-mode": "color-burn" }], ["mix-blend-hard-light", { "mix-blend-mode": "hard-light" }], ["mix-blend-soft-light", { "mix-blend-mode": "soft-light" }], ["mix-blend-difference", { "mix-blend-mode": "difference" }], ["mix-blend-exclusion", { "mix-blend-mode": "exclusion" }], ["mix-blend-hue", { "mix-blend-mode": "hue" }], ["mix-blend-saturation", { "mix-blend-mode": "saturation" }], ["mix-blend-color", { "mix-blend-mode": "color" }], ["mix-blend-luminosity", { "mix-blend-mode": "luminosity" }], ["mix-blend-plus-lighter", { "mix-blend-mode": "plus-lighter" }], ["mix-blend-normal", { "mix-blend-mode": "normal" }], ...makeGlobalStaticRules("mix-blend") ]; var dynamicViewportHeight = [ ["min-h-dvh", { "min-height": "100dvh" }], ["min-h-svh", { "min-height": "100svh" }], ["min-h-lvh", { "min-height": "100lvh" }], ["h-dvh", { height: "100dvh" }], ["h-svh", { height: "100svh" }], ["h-lvh", { height: "100lvh" }], ["max-h-dvh", { "max-height": "100dvh" }], ["max-h-svh", { "max-height": "100svh" }], ["max-h-lvh", { "max-height": "100lvh" }] ]; var borderSpacingBase = { "--un-border-spacing-x": 0, "--un-border-spacing-y": 0 }; var borderSpacingProperty = "var(--un-border-spacing-x) var(--un-border-spacing-y)"; var tables = [ // displays ["inline-table", { display: "inline-table" }], ["table", { display: "table" }], ["table-caption", { display: "table-caption" }], ["table-cell", { display: "table-cell" }], ["table-column", { display: "table-column" }], ["table-column-group", { display: "table-column-group" }], ["table-footer-group", { display: "table-footer-group" }], ["table-header-group", { display: "table-header-group" }], ["table-row", { display: "table-row" }], ["table-row-group", { display: "table-row-group" }], // layouts ["border-collapse", { "border-collapse": "collapse" }], ["border-separate", { "border-collapse": "separate" }], [/^border-spacing-(.+)$/, ([, s], { theme: theme3 }) => { const v = theme3.spacing?.[s] ?? h.bracket.cssvar.global.auto.fraction.rem(s); if (v != null) { return { "--un-border-spacing-x": v, "--un-border-spacing-y": v, "border-spacing": borderSpacingProperty }; } }, { autocomplete: ["border-spacing", "border-spacing-$spacing"] }], [/^border-spacing-([xy])-(.+)$/, ([, d, s], { theme: theme3 }) => { const v = theme3.spacing?.[s] ?? h.bracket.cssvar.global.auto.fraction.rem(s); if (v != null) { return { [`--un-border-spacing-${d}`]: v, "border-spacing": borderSpacingProperty }; } }, { autocomplete: ["border-spacing-(x|y)", "border-spacing-(x|y)-$spacing"] }], ["caption-top", { "caption-side": "top" }], ["caption-bottom", { "caption-side": "bottom" }], ["table-auto", { "table-layout": "auto" }], ["table-fixed", { "table-layout": "fixed" }], ["table-empty-cells-visible", { "empty-cells": "show" }], ["table-empty-cells-hidden", { "empty-cells": "hide" }] ]; var variablesAbbrMap2 = { "bg-blend": "background-blend-mode", "bg-clip": "-webkit-background-clip", "bg-gradient": "linear-gradient", "bg-image": "background-image", "bg-origin": "background-origin", "bg-position": "background-position", "bg-repeat": "background-repeat", "bg-size": "background-size", "mix-blend": "mix-blend-mode", "object": "object-fit", "object-position": "object-position", "write": "writing-mode", "write-orient": "text-orientation" }; var cssVariables2 = [ [/^(.+?)-(\$.+)$/, ([, name42, varname]) => { const prop = variablesAbbrMap2[name42]; if (prop) return { [prop]: h.cssvar(varname) }; }] ]; var divides = [ // divides [/^divide-?([xy])$/, handlerDivide, { autocomplete: ["divide-(x|y|block|inline)", "divide-(x|y|block|inline)-reverse", "divide-(x|y|block|inline)-$lineWidth"] }], [/^divide-?([xy])-?(-?.+)$/, handlerDivide], [/^divide-?([xy])-reverse$/, ([, d]) => ({ [`--un-divide-${d}-reverse`]: 1 })], [/^divide-(block|inline)$/, handlerDivide], [/^divide-(block|inline)-(-?.+)$/, handlerDivide], [/^divide-(block|inline)-reverse$/, ([, d]) => ({ [`--un-divide-${d}-reverse`]: 1 })], // color & opacity [/^divide-(.+)$/, colorResolver("border-color", "divide", "borderColor"), { autocomplete: "divide-$colors" }], [/^divide-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-divide-opacity": h.bracket.percent(opacity2) }), { autocomplete: ["divide-(op|opacity)", "divide-(op|opacity)-"] }], // styles ...borderStyles.map((style) => [`divide-${style}`, { "border-style": style }]) ]; function handlerDivide([, d, s], { theme: theme3 }) { let v = theme3.lineWidth?.[s || "DEFAULT"] ?? h.bracket.cssvar.px(s || "1"); if (v != null) { if (v === "0") v = "0px"; const results = directionMap[d].map((item) => { const key = `border${item}-width`; const value = item.endsWith("right") || item.endsWith("bottom") ? `calc(${v} * var(--un-divide-${d}-reverse))` : `calc(${v} * calc(1 - var(--un-divide-${d}-reverse)))`; return [key, value]; }); if (results) { return [ [`--un-divide-${d}-reverse`, 0], ...results ]; } } } var lineClamps = [ [/^line-clamp-(\d+)$/, ([, v]) => ({ "overflow": "hidden", "display": "-webkit-box", "-webkit-box-orient": "vertical", "-webkit-line-clamp": v, "line-clamp": v }), { autocomplete: ["line-clamp", "line-clamp-"] }], ...["none", ...globalKeywords].map((keyword2) => [`line-clamp-${keyword2}`, { "overflow": "visible", "display": "block", "-webkit-box-orient": "horizontal", "-webkit-line-clamp": keyword2, "line-clamp": keyword2 }]) ]; var fontVariantNumericBase = { "--un-ordinal": varEmpty, "--un-slashed-zero": varEmpty, "--un-numeric-figure": varEmpty, "--un-numeric-spacing": varEmpty, "--un-numeric-fraction": varEmpty }; function toEntries(entry) { return { ...entry, "font-variant-numeric": "var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)" }; } var fontVariantNumeric = [ [/^ordinal$/, () => toEntries({ "--un-ordinal": "ordinal" }), { autocomplete: "ordinal" }], [/^slashed-zero$/, () => toEntries({ "--un-slashed-zero": "slashed-zero" }), { autocomplete: "slashed-zero" }], [/^lining-nums$/, () => toEntries({ "--un-numeric-figure": "lining-nums" }), { autocomplete: "lining-nums" }], [/^oldstyle-nums$/, () => toEntries({ "--un-numeric-figure": "oldstyle-nums" }), { autocomplete: "oldstyle-nums" }], [/^proportional-nums$/, () => toEntries({ "--un-numeric-spacing": "proportional-nums" }), { autocomplete: "proportional-nums" }], [/^tabular-nums$/, () => toEntries({ "--un-numeric-spacing": "tabular-nums" }), { autocomplete: "tabular-nums" }], [/^diagonal-fractions$/, () => toEntries({ "--un-numeric-fraction": "diagonal-fractions" }), { autocomplete: "diagonal-fractions" }], [/^stacked-fractions$/, () => toEntries({ "--un-numeric-fraction": "stacked-fractions" }), { autocomplete: "stacked-fractions" }], ["normal-nums", { "font-variant-numeric": "normal" }] ]; var touchActionBase = { "--un-pan-x": varEmpty, "--un-pan-y": varEmpty, "--un-pinch-zoom": varEmpty }; var touchActionProperty = "var(--un-pan-x) var(--un-pan-y) var(--un-pinch-zoom)"; var touchActions = [ [/^touch-pan-(x|left|right)$/, ([, d]) => ({ "--un-pan-x": `pan-${d}`, "touch-action": touchActionProperty }), { autocomplete: ["touch-pan", "touch-pan-(x|left|right|y|up|down)"] }], [/^touch-pan-(y|up|down)$/, ([, d]) => ({ "--un-pan-y": `pan-${d}`, "touch-action": touchActionProperty })], ["touch-pinch-zoom", { "--un-pinch-zoom": "pinch-zoom", "touch-action": touchActionProperty }], ["touch-auto", { "touch-action": "auto" }], ["touch-manipulation", { "touch-action": "manipulation" }], ["touch-none", { "touch-action": "none" }], ...makeGlobalStaticRules("touch", "touch-action") ]; var scrollSnapTypeBase = { "--un-scroll-snap-strictness": "proximity" }; var scrolls = [ // snap type [/^snap-(x|y)$/, ([, d]) => ({ "scroll-snap-type": `${d} var(--un-scroll-snap-strictness)` }), { autocomplete: "snap-(x|y|both)" }], [/^snap-both$/, () => ({ "scroll-snap-type": "both var(--un-scroll-snap-strictness)" })], ["snap-mandatory", { "--un-scroll-snap-strictness": "mandatory" }], ["snap-proximity", { "--un-scroll-snap-strictness": "proximity" }], ["snap-none", { "scroll-snap-type": "none" }], // snap align ["snap-start", { "scroll-snap-align": "start" }], ["snap-end", { "scroll-snap-align": "end" }], ["snap-center", { "scroll-snap-align": "center" }], ["snap-align-none", { "scroll-snap-align": "none" }], // snap stop ["snap-normal", { "scroll-snap-stop": "normal" }], ["snap-always", { "scroll-snap-stop": "always" }], // scroll margin [/^scroll-ma?()-?(-?.+)$/, directionSize("scroll-margin"), { autocomplete: [ "scroll-(m|p|ma|pa|block|inline)", "scroll-(m|p|ma|pa|block|inline)-$spacing", "scroll-(m|p|ma|pa|block|inline)-(x|y|r|l|t|b|bs|be|is|ie)", "scroll-(m|p|ma|pa|block|inline)-(x|y|r|l|t|b|bs|be|is|ie)-$spacing" ] }], [/^scroll-m-?([xy])-?(-?.+)$/, directionSize("scroll-margin")], [/^scroll-m-?([rltb])-?(-?.+)$/, directionSize("scroll-margin")], [/^scroll-m-(block|inline)-(-?.+)$/, directionSize("scroll-margin")], [/^scroll-m-?([bi][se])-?(-?.+)$/, directionSize("scroll-margin")], // scroll padding [/^scroll-pa?()-?(-?.+)$/, directionSize("scroll-padding")], [/^scroll-p-?([xy])-?(-?.+)$/, directionSize("scroll-padding")], [/^scroll-p-?([rltb])-?(-?.+)$/, directionSize("scroll-padding")], [/^scroll-p-(block|inline)-(-?.+)$/, directionSize("scroll-padding")], [/^scroll-p-?([bi][se])-?(-?.+)$/, directionSize("scroll-padding")] ]; var placeholders = [ // The prefix `$ ` is intentional. This rule is not to be matched directly from user-generated token. // See variants/placeholder. [/^\$ placeholder-(.+)$/, colorResolver("color", "placeholder", "accentColor"), { autocomplete: "placeholder-$colors" }], [/^\$ placeholder-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-placeholder-opacity": h.bracket.percent(opacity2) }), { autocomplete: ["placeholder-(op|opacity)", "placeholder-(op|opacity)-"] }] ]; var viewTransition = [ [/^view-transition-([\w_-]+)$/, ([, name42]) => { return { "view-transition-name": name42 }; }] ]; var rules2 = [ cssVariables, cssVariables2, cssProperty, container, contains, screenReadersAccess, pointerEvents, appearances, positions, insets, lineClamps, isolations, zIndexes, orders, grids, floats, margins, boxSizing, displays, aspectRatio, sizes, flex, tables, transforms, animations, cursors, touchActions, userSelects, resizes, scrolls, listStyle, appearance, columns, placements, alignments, justifies, gaps, flexGridJustifiesAlignments, spaces, divides, overflows, overscrolls, scrollBehaviors, textOverflows, whitespaces, breaks, borders, bgColors, backgroundStyles, svgUtilities, objectPositions, paddings, textAligns, textIndents, textWraps, verticalAligns, fonts, textTransforms, textTransforms2, fontStyles, fontVariantNumeric, textDecorations, fontSmoothings, tabSizes, textStrokes, textShadows, hyphens, writingModes, writingOrientations, carets, accents, opacity, backgroundBlendModes, mixBlendModes, boxShadows, outline, rings, imageRenderings, filters, transitions, willChange, contentVisibility, contents, placeholders, containerParent, viewTransition, dynamicViewportHeight, questionMark ].flat(1); var shortcuts = [ ...containerShortcuts ]; var theme2 = { ...theme, aria: { busy: 'busy="true"', checked: 'checked="true"', disabled: 'disabled="true"', expanded: 'expanded="true"', hidden: 'hidden="true"', pressed: 'pressed="true"', readonly: 'readonly="true"', required: 'required="true"', selected: 'selected="true"' }, animation: { keyframes: { "pulse": "{0%, 100% {opacity:1} 50% {opacity:.5}}", "bounce": "{0%, 100% {transform:translateY(-25%);animation-timing-function:cubic-bezier(0.8,0,1,1)} 50% {transform:translateY(0);animation-timing-function:cubic-bezier(0,0,0.2,1)}}", "spin": "{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}", "ping": "{0%{transform:scale(1);opacity:1}75%,100%{transform:scale(2);opacity:0}}", "bounce-alt": "{from,20%,53%,80%,to{animation-timing-function:cubic-bezier(0.215,0.61,0.355,1);transform:translate3d(0,0,0)}40%,43%{animation-timing-function:cubic-bezier(0.755,0.05,0.855,0.06);transform:translate3d(0,-30px,0)}70%{animation-timing-function:cubic-bezier(0.755,0.05,0.855,0.06);transform:translate3d(0,-15px,0)}90%{transform:translate3d(0,-4px,0)}}", "flash": "{from,50%,to{opacity:1}25%,75%{opacity:0}}", "pulse-alt": "{from{transform:scale3d(1,1,1)}50%{transform:scale3d(1.05,1.05,1.05)}to{transform:scale3d(1,1,1)}}", "rubber-band": "{from{transform:scale3d(1,1,1)}30%{transform:scale3d(1.25,0.75,1)}40%{transform:scale3d(0.75,1.25,1)}50%{transform:scale3d(1.15,0.85,1)}65%{transform:scale3d(0.95,1.05,1)}75%{transform:scale3d(1.05,0.95,1)}to{transform:scale3d(1,1,1)}}", "shake-x": "{from,to{transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{transform:translate3d(-10px,0,0)}20%,40%,60%,80%{transform:translate3d(10px,0,0)}}", "shake-y": "{from,to{transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{transform:translate3d(0,-10px,0)}20%,40%,60%,80%{transform:translate3d(0,10px,0)}}", "head-shake": "{0%{transform:translateX(0)}6.5%{transform:translateX(-6px) rotateY(-9deg)}18.5%{transform:translateX(5px) rotateY(7deg)}31.5%{transform:translateX(-3px) rotateY(-5deg)}43.5%{transform:translateX(2px) rotateY(3deg)}50%{transform:translateX(0)}}", "swing": "{20%{transform:rotate3d(0,0,1,15deg)}40%{transform:rotate3d(0,0,1,-10deg)}60%{transform:rotate3d(0,0,1,5deg)}80%{transform:rotate3d(0,0,1,-5deg)}to{transform:rotate3d(0,0,1,0deg)}}", "tada": "{from{transform:scale3d(1,1,1)}10%,20%{transform:scale3d(0.9,0.9,0.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}to{transform:scale3d(1,1,1)}}", "wobble": "{from{transform:translate3d(0,0,0)}15%{transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}to{transform:translate3d(0,0,0)}}", "jello": "{from,11.1%,to{transform:translate3d(0,0,0)}22.2%{transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{transform:skewX(6.25deg) skewY(6.25deg)}44.4%{transform:skewX(-3.125deg)skewY(-3.125deg)}55.5%{transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{transform:skewX(-0.78125deg) skewY(-0.78125deg)}77.7%{transform:skewX(0.390625deg) skewY(0.390625deg)}88.8%{transform:skewX(-0.1953125deg) skewY(-0.1953125deg)}}", "heart-beat": "{0%{transform:scale(1)}14%{transform:scale(1.3)}28%{transform:scale(1)}42%{transform:scale(1.3)}70%{transform:scale(1)}}", "hinge": "{0%{transform-origin:top left;animation-timing-function:ease-in-out}20%,60%{transform:rotate3d(0,0,1,80deg);transform-origin:top left;animation-timing-function:ease-in-out}40%,80%{transform:rotate3d(0,0,1,60deg);transform-origin:top left;animation-timing-function:ease-in-out}to{transform:translate3d(0,700px,0);opacity:0}}", "jack-in-the-box": "{from{opacity:0;transform-origin:center bottom;transform:scale(0.1) rotate(30deg)}50%{transform:rotate(-10deg)}70%{transform:rotate(3deg)}to{transform:scale(1)}}", "light-speed-in-left": "{from{opacity:0;transform:translate3d(-100%,0,0) skewX(-30deg)}60%{opacity:1;transform:skewX(20deg)}80%{transform:skewX(-5deg)}to{transform:translate3d(0,0,0)}}", "light-speed-in-right": "{from{opacity:0;transform:translate3d(100%,0,0) skewX(-30deg)}60%{opacity:1;transform:skewX(20deg)}80%{transform:skewX(-5deg)}to{transform:translate3d(0,0,0)}}", "light-speed-out-left": "{from{opacity:1}to{opacity:0;transform:translate3d(-100%,0,0) skewX(30deg)}}", "light-speed-out-right": "{from{opacity:1}to{opacity:0;transform:translate3d(100%,0,0) skewX(30deg)}}", "flip": "{from{transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,0) rotate3d(0,1,0,-360deg);animation-timing-function:ease-out}40%{transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);animation-timing-function:ease-out}50%{transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);animation-timing-function:ease-in}80%{transform:perspective(400px) scale3d(0.95,0.95,0.95) translate3d(0,0,0) rotate3d(0,1,0,0deg);animation-timing-function:ease-in}to{transform:perspective(400px) scale3d(1,1,1) translate3d(0,0,0) rotate3d(0,1,0,0deg);animation-timing-function:ease-in}}", "flip-in-x": "{from{transform:perspective(400px) rotate3d(1,0,0,90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotate3d(1,0,0,-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{transform:perspective(400px)}}", "flip-in-y": "{from{transform:perspective(400px) rotate3d(0,1,0,90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotate3d(0,1,0,-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{transform:perspective(400px) rotate3d(0,1,0,-5deg)}to{transform:perspective(400px)}}", "flip-out-x": "{from{transform:perspective(400px)}30%{transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}", "flip-out-y": "{from{transform:perspective(400px)}30%{transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}to{transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}", "rotate-in": "{from{transform-origin:center;transform:rotate3d(0,0,1,-200deg);opacity:0}to{transform-origin:center;transform:translate3d(0,0,0);opacity:1}}", "rotate-in-down-left": "{from{transform-origin:left bottom;transform:rotate3d(0,0,1,-45deg);opacity:0}to{transform-origin:left bottom;transform:translate3d(0,0,0);opacity:1}}", "rotate-in-down-right": "{from{transform-origin:right bottom;transform:rotate3d(0,0,1,45deg);opacity:0}to{transform-origin:right bottom;transform:translate3d(0,0,0);opacity:1}}", "rotate-in-up-left": "{from{transform-origin:left top;transform:rotate3d(0,0,1,45deg);opacity:0}to{transform-origin:left top;transform:translate3d(0,0,0);opacity:1}}", "rotate-in-up-right": "{from{transform-origin:right bottom;transform:rotate3d(0,0,1,-90deg);opacity:0}to{transform-origin:right bottom;transform:translate3d(0,0,0);opacity:1}}", "rotate-out": "{from{transform-origin:center;opacity:1}to{transform-origin:center;transform:rotate3d(0,0,1,200deg);opacity:0}}", "rotate-out-down-left": "{from{transform-origin:left bottom;opacity:1}to{transform-origin:left bottom;transform:rotate3d(0,0,1,45deg);opacity:0}}", "rotate-out-down-right": "{from{transform-origin:right bottom;opacity:1}to{transform-origin:right bottom;transform:rotate3d(0,0,1,-45deg);opacity:0}}", "rotate-out-up-left": "{from{transform-origin:left bottom;opacity:1}to{transform-origin:left bottom;transform:rotate3d(0,0,1,-45deg);opacity:0}}", "rotate-out-up-right": "{from{transform-origin:right bottom;opacity:1}to{transform-origin:left bottom;transform:rotate3d(0,0,1,90deg);opacity:0}}", "roll-in": "{from{opacity:0;transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;transform:translate3d(0,0,0)}}", "roll-out": "{from{opacity:1}to{opacity:0;transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}", "zoom-in": "{from{opacity:0;transform:scale3d(0.3,0.3,0.3)}50%{opacity:1}}", "zoom-in-down": "{from{opacity:0;transform:scale3d(0.1,0.1,0.1) translate3d(0,-1000px,0);animation-timing-function:cubic-bezier(0.55,0.055,0.675,0.19)}60%{opacity:1;transform:scale3d(0.475,0.475,0.475) translate3d(0,60px,0);animation-timing-function:cubic-bezier(0.175,0.885,0.32,1)}}", "zoom-in-left": "{from{opacity:0;transform:scale3d(0.1,0.1,0.1) translate3d(-1000px,0,0);animation-timing-function:cubic-bezier(0.55,0.055,0.675,0.19)}60%{opacity:1;transform:scale3d(0.475,0.475,0.475) translate3d(10px,0,0);animation-timing-function:cubic-bezier(0.175,0.885,0.32,1)}}", "zoom-in-right": "{from{opacity:0;transform:scale3d(0.1,0.1,0.1) translate3d(1000px,0,0);animation-timing-function:cubic-bezier(0.55,0.055,0.675,0.19)}60%{opacity:1;transform:scale3d(0.475,0.475,0.475) translate3d(-10px,0,0);animation-timing-function:cubic-bezier(0.175,0.885,0.32,1)}}", "zoom-in-up": "{from{opacity:0;transform:scale3d(0.1,0.1,0.1) translate3d(0,1000px,0);animation-timing-function:cubic-bezier(0.55,0.055,0.675,0.19)}60%{opacity:1;transform:scale3d(0.475,0.475,0.475) translate3d(0,-60px,0);animation-timing-function:cubic-bezier(0.175,0.885,0.32,1)}}", "zoom-out": "{from{opacity:1}50%{opacity:0;transform:scale3d(0.3,0.3,0.3)}to{opacity:0}}", "zoom-out-down": "{40%{opacity:1;transform:scale3d(0.475,0.475,0.475) translate3d(0,-60px,0);animation-timing-function:cubic-bezier(0.55,0.055,0.675,0.19)}to{opacity:0;transform:scale3d(0.1,0.1,0.1) translate3d(0,2000px,0);transform-origin:center bottom;animation-timing-function:cubic-bezier(0.175,0.885,0.32,1)}}", "zoom-out-left": "{40%{opacity:1;transform:scale3d(0.475,0.475,0.475) translate3d(42px,0,0)}to{opacity:0;transform:scale(0.1) translate3d(-2000px,0,0);transform-origin:left center}}", "zoom-out-right": "{40%{opacity:1;transform:scale3d(0.475,0.475,0.475) translate3d(-42px,0,0)}to{opacity:0;transform:scale(0.1) translate3d(2000px,0,0);transform-origin:right center}}", "zoom-out-up": "{40%{opacity:1;transform:scale3d(0.475,0.475,0.475) translate3d(0,60px,0);animation-timing-function:cubic-bezier(0.55,0.055,0.675,0.19)}to{opacity:0;transform:scale3d(0.1,0.1,0.1) translate3d(0,-2000px,0);transform-origin:center bottom;animation-timing-function:cubic-bezier(0.175,0.885,0.32,1)}}", "bounce-in": "{from,20%,40%,60%,80%,to{animation-timing-function:ease-in-out}0%{opacity:0;transform:scale3d(0.3,0.3,0.3)}20%{transform:scale3d(1.1,1.1,1.1)}40%{transform:scale3d(0.9,0.9,0.9)}60%{transform:scale3d(1.03,1.03,1.03);opacity:1}80%{transform:scale3d(0.97,0.97,0.97)}to{opacity:1;transform:scale3d(1,1,1)}}", "bounce-in-down": "{from,60%,75%,90%,to{animation-timing-function:cubic-bezier(0.215,0.61,0.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:translate3d(0,0,0)}}", "bounce-in-left": "{from,60%,75%,90%,to{animation-timing-function:cubic-bezier(0.215,0.61,0.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:translate3d(0,0,0)}}", "bounce-in-right": "{from,60%,75%,90%,to{animation-timing-function:cubic-bezier(0.215,0.61,0.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:translate3d(0,0,0)}}", "bounce-in-up": "{from,60%,75%,90%,to{animation-timing-function:cubic-bezier(0.215,0.61,0.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translate3d(0,0,0)}}", "bounce-out": "{20%{transform:scale3d(0.9,0.9,0.9)}50%,55%{opacity:1;transform:scale3d(1.1,1.1,1.1)}to{opacity:0;transform:scale3d(0.3,0.3,0.3)}}", "bounce-out-down": "{20%{transform:translate3d(0,10px,0)}40%,45%{opacity:1;transform:translate3d(0,-20px,0)}to{opacity:0;transform:translate3d(0,2000px,0)}}", "bounce-out-left": "{20%{opacity:1;transform:translate3d(20px,0,0)}to{opacity:0;transform:translate3d(-2000px,0,0)}}", "bounce-out-right": "{20%{opacity:1;transform:translate3d(-20px,0,0)}to{opacity:0;transform:translate3d(2000px,0,0)}}", "bounce-out-up": "{20%{transform:translate3d(0,-10px,0)}40%,45%{opacity:1;transform:translate3d(0,20px,0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}", "slide-in-down": "{from{transform:translate3d(0,-100%,0);visibility:visible}to{transform:translate3d(0,0,0)}}", "slide-in-left": "{from{transform:translate3d(-100%,0,0);visibility:visible}to{transform:translate3d(0,0,0)}}", "slide-in-right": "{from{transform:translate3d(100%,0,0);visibility:visible}to{transform:translate3d(0,0,0)}}", "slide-in-up": "{from{transform:translate3d(0,100%,0);visibility:visible}to{transform:translate3d(0,0,0)}}", "slide-out-down": "{from{transform:translate3d(0,0,0)}to{visibility:hidden;transform:translate3d(0,100%,0)}}", "slide-out-left": "{from{transform:translate3d(0,0,0)}to{visibility:hidden;transform:translate3d(-100%,0,0)}}", "slide-out-right": "{from{transform:translate3d(0,0,0)}to{visibility:hidden;transform:translate3d(100%,0,0)}}", "slide-out-up": "{from{transform:translate3d(0,0,0)}to{visibility:hidden;transform:translate3d(0,-100%,0)}}", "fade-in": "{from{opacity:0}to{opacity:1}}", "fade-in-down": "{from{opacity:0;transform:translate3d(0,-100%,0)}to{opacity:1;transform:translate3d(0,0,0)}}", "fade-in-down-big": "{from{opacity:0;transform:translate3d(0,-2000px,0)}to{opacity:1;transform:translate3d(0,0,0)}}", "fade-in-left": "{from{opacity:0;transform:translate3d(-100%,0,0)}to{opacity:1;transform:translate3d(0,0,0)}}", "fade-in-left-big": "{from{opacity:0;transform:translate3d(-2000px,0,0)}to{opacity:1;transform:translate3d(0,0,0)}}", "fade-in-right": "{from{opacity:0;transform:translate3d(100%,0,0)}to{opacity:1;transform:translate3d(0,0,0)}}", "fade-in-right-big": "{from{opacity:0;transform:translate3d(2000px,0,0)}to{opacity:1;transform:translate3d(0,0,0)}}", "fade-in-up": "{from{opacity:0;transform:translate3d(0,100%,0)}to{opacity:1;transform:translate3d(0,0,0)}}", "fade-in-up-big": "{from{opacity:0;transform:translate3d(0,2000px,0)}to{opacity:1;transform:translate3d(0,0,0)}}", "fade-in-top-left": "{from{opacity:0;transform:translate3d(-100%,-100%,0)}to{opacity:1;transform:translate3d(0,0,0)}}", "fade-in-top-right": "{from{opacity:0;transform:translate3d(100%,-100%,0)}to{opacity:1;transform:translate3d(0,0,0)}}", "fade-in-bottom-left": "{from{opacity:0;transform:translate3d(-100%,100%,0)}to{opacity:1;transform:translate3d(0,0,0)}}", "fade-in-bottom-right": "{from{opacity:0;transform:translate3d(100%,100%,0)}to{opacity:1;transform:translate3d(0,0,0)}}", "fade-out": "{from{opacity:1}to{opacity:0}}", "fade-out-down": "{from{opacity:1}to{opacity:0;transform:translate3d(0,100%,0)}}", "fade-out-down-big": "{from{opacity:1}to{opacity:0;transform:translate3d(0,2000px,0)}}", "fade-out-left": "{from{opacity:1}to{opacity:0;transform:translate3d(-100%,0,0)}}", "fade-out-left-big": "{from{opacity:1}to{opacity:0;transform:translate3d(-2000px,0,0)}}", "fade-out-right": "{from{opacity:1}to{opacity:0;transform:translate3d(100%,0,0)}}", "fade-out-right-big": "{from{opacity:1}to{opacity:0;transform:translate3d(2000px,0,0)}}", "fade-out-up": "{from{opacity:1}to{opacity:0;transform:translate3d(0,-100%,0)}}", "fade-out-up-big": "{from{opacity:1}to{opacity:0;transform:translate3d(0,-2000px,0)}}", "fade-out-top-left": "{from{opacity:1;transform:translate3d(0,0,0)}to{opacity:0;transform:translate3d(-100%,-100%,0)}}", "fade-out-top-right": "{from{opacity:1;transform:translate3d(0,0,0)}to{opacity:0;transform:translate3d(100%,-100%,0)}}", "fade-out-bottom-left": "{from{opacity:1;transform:translate3d(0,0,0)}to{opacity:0;transform:translate3d(-100%,100%,0)}}", "fade-out-bottom-right": "{from{opacity:1;transform:translate3d(0,0,0)}to{opacity:0;transform:translate3d(100%,100%,0)}}", "back-in-up": "{0%{opacity:0.7;transform:translateY(1200px) scale(0.7)}80%{opacity:0.7;transform:translateY(0px) scale(0.7)}100%{opacity:1;transform:scale(1)}}", "back-in-down": "{0%{opacity:0.7;transform:translateY(-1200px) scale(0.7)}80%{opacity:0.7;transform:translateY(0px) scale(0.7)}100%{opacity:1;transform:scale(1)}}", "back-in-right": "{0%{opacity:0.7;transform:translateX(2000px) scale(0.7)}80%{opacity:0.7;transform:translateY(0px) scale(0.7)}100%{opacity:1;transform:scale(1)}}", "back-in-left": "{0%{opacity:0.7;transform:translateX(-2000px) scale(0.7)}80%{opacity:0.7;transform:translateX(0px) scale(0.7)}100%{opacity:1;transform:scale(1)}}", "back-out-up": "{0%{opacity:1;transform:scale(1)}80%{opacity:0.7;transform:translateY(0px) scale(0.7)}100%{opacity:0.7;transform:translateY(-700px) scale(0.7)}}", "back-out-down": "{0%{opacity:1;transform:scale(1)}80%{opacity:0.7;transform:translateY(0px) scale(0.7)}100%{opacity:0.7;transform:translateY(700px) scale(0.7)}}", "back-out-right": "{0%{opacity:1;transform:scale(1)}80%{opacity:0.7;transform:translateY(0px) scale(0.7)}100%{opacity:0.7;transform:translateX(2000px) scale(0.7)}}", "back-out-left": "{0%{opacity:1;transform:scale(1)}80%{opacity:0.7;transform:translateX(-2000px) scale(0.7)}100%{opacity:0.7;transform:translateY(-700px) scale(0.7)}}" }, durations: { "pulse": "2s", "heart-beat": "1.3s", "bounce-in": "0.75s", "bounce-out": "0.75s", "flip-out-x": "0.75s", "flip-out-y": "0.75s", "hinge": "2s" }, timingFns: { "pulse": "cubic-bezier(0.4,0,.6,1)", "ping": "cubic-bezier(0,0,.2,1)", "head-shake": "ease-in-out", "heart-beat": "ease-in-out", "pulse-alt": "ease-in-out", "light-speed-in-left": "ease-out", "light-speed-in-right": "ease-out", "light-speed-out-left": "ease-in", "light-speed-out-right": "ease-in" }, properties: { "bounce-alt": { "transform-origin": "center bottom" }, "jello": { "transform-origin": "center" }, "swing": { "transform-origin": "top center" }, "flip": { "backface-visibility": "visible" }, "flip-in-x": { "backface-visibility": "visible !important" }, "flip-in-y": { "backface-visibility": "visible !important" }, "flip-out-x": { "backface-visibility": "visible !important" }, "flip-out-y": { "backface-visibility": "visible !important" }, "rotate-in": { "transform-origin": "center" }, "rotate-in-down-left": { "transform-origin": "left bottom" }, "rotate-in-down-right": { "transform-origin": "right bottom" }, "rotate-in-up-left": { "transform-origin": "left bottom" }, "rotate-in-up-right": { "transform-origin": "right bottom" }, "rotate-out": { "transform-origin": "center" }, "rotate-out-down-left": { "transform-origin": "left bottom" }, "rotate-out-down-right": { "transform-origin": "right bottom" }, "rotate-out-up-left": { "transform-origin": "left bottom" }, "rotate-out-up-right": { "transform-origin": "right bottom" }, "hinge": { "transform-origin": "top left" }, "zoom-out-down": { "transform-origin": "center bottom" }, "zoom-out-left": { "transform-origin": "left center" }, "zoom-out-right": { "transform-origin": "right center" }, "zoom-out-up": { "transform-origin": "center bottom" } }, counts: { "spin": "infinite", "ping": "infinite", "pulse": "infinite", "pulse-alt": "infinite", "bounce": "infinite", "bounce-alt": "infinite" } }, media: { portrait: "(orientation: portrait)", landscape: "(orientation: landscape)", os_dark: "(prefers-color-scheme: dark)", os_light: "(prefers-color-scheme: light)", motion_ok: "(prefers-reduced-motion: no-preference)", motion_not_ok: "(prefers-reduced-motion: reduce)", high_contrast: "(prefers-contrast: high)", low_contrast: "(prefers-contrast: low)", opacity_ok: "(prefers-reduced-transparency: no-preference)", opacity_not_ok: "(prefers-reduced-transparency: reduce)", use_data_ok: "(prefers-reduced-data: no-preference)", use_data_not_ok: "(prefers-reduced-data: reduce)", touch: "(hover: none) and (pointer: coarse)", stylus: "(hover: none) and (pointer: fine)", pointer: "(hover) and (pointer: coarse)", mouse: "(hover) and (pointer: fine)", hd_color: "(dynamic-range: high)" }, supports: { grid: "(display: grid)" }, preflightBase: { ...transformBase, ...touchActionBase, ...scrollSnapTypeBase, ...fontVariantNumericBase, ...borderSpacingBase, ...boxShadowsBase, ...ringBase, ...filterBase, ...backdropFilterBase } }; var variantCombinators2 = [ variantMatcher("svg", (input) => ({ selector: `${input.selector} svg` })) ]; var variantColorsScheme = [ variantMatcher(".dark", (input) => ({ prefix: `.dark $$ ${input.prefix}` })), variantMatcher(".light", (input) => ({ prefix: `.light $$ ${input.prefix}` })), variantParentMatcher("@dark", "@media (prefers-color-scheme: dark)"), variantParentMatcher("@light", "@media (prefers-color-scheme: light)") ]; var variantContrasts = [ variantParentMatcher("contrast-more", "@media (prefers-contrast: more)"), variantParentMatcher("contrast-less", "@media (prefers-contrast: less)") ]; var variantMotions = [ variantParentMatcher("motion-reduce", "@media (prefers-reduced-motion: reduce)"), variantParentMatcher("motion-safe", "@media (prefers-reduced-motion: no-preference)") ]; var variantOrientations = [ variantParentMatcher("landscape", "@media (orientation: landscape)"), variantParentMatcher("portrait", "@media (orientation: portrait)") ]; var variantSpaceAndDivide = (matcher) => { if (matcher.startsWith("_")) return; if (/space-([xy])-(-?.+)$/.test(matcher) || /divide-/.test(matcher)) { return { matcher, selector: (input) => { const not = ">:not([hidden])~:not([hidden])"; return input.includes(not) ? input : `${input}${not}`; } }; } }; var variantStickyHover = [ variantMatcher("@hover", (input) => ({ parent: `${input.parent ? `${input.parent} $$ ` : ""}@media (hover: hover) and (pointer: fine)`, selector: `${input.selector || ""}:hover` })) ]; var placeholderModifier = (input, { theme: theme3 }) => { const m = input.match(/^(.*)\b(placeholder-)(.+)$/); if (m) { const [, pre = "", p, body] = m; if (hasParseableColor(body, theme3, "accentColor") || hasOpacityValue(body)) { return { // Append `placeholder-$ ` (with space!) to the rule to be matched. // The `placeholder-` is added for placeholder variant processing, and // the `$ ` is added for rule matching after `placeholder-` is removed by the variant. // See rules/placeholder. matcher: `${pre}placeholder-$ ${p}${body}` }; } } }; function hasOpacityValue(body) { const match = body.match(/^op(?:acity)?-?(.+)$/); if (match && match[1] != null) return h.bracket.percent(match[1]) != null; return false; } function variants2(options) { return [ placeholderModifier, variantSpaceAndDivide, ...variants(options), ...variantContrasts, ...variantOrientations, ...variantMotions, ...variantCombinators2, ...variantColorsScheme, ...variantStickyHover ]; } function important(option) { if (option == null || option === false) return []; const wrapWithIs = (selector2) => { if (selector2.startsWith(":is(") && selector2.endsWith(")")) return selector2; if (selector2.includes("::")) return selector2.replace(/(.*)(::.*)/, ":is($1)$2"); return `:is(${selector2})`; }; return [ option === true ? (util) => { util.entries.forEach((i) => { if (i[1] != null && !String(i[1]).endsWith("!important")) i[1] += " !important"; }); } : (util) => { if (!util.selector.startsWith(option)) util.selector = `${option} ${wrapWithIs(util.selector)}`; } ]; } function postprocessors(options) { return [ ...toArray(presetMini(options).postprocess), ...important(options.important) ]; } var presetWind = definePreset((options = {}) => { options.important = options.important ?? false; return { ...presetMini(options), name: "@unocss/preset-wind", theme: theme2, rules: rules2, shortcuts, variants: variants2(options), postprocess: postprocessors(options) }; }); // node_modules/.pnpm/@unocss+preset-uno@0.58.9/node_modules/@unocss/preset-uno/dist/index.mjs function mixComponent(v1, v2, w) { return `calc(${v2} + (${v1} - ${v2}) * ${w} / 100)`; } function mixColor(color1, color2, weight) { const colors2 = [color1, color2]; const cssColors = []; for (let c = 0; c < 2; c++) { const color = typeof colors2[c] === "string" ? parseCssColor(colors2[c]) : colors2[c]; if (!color || !["rgb", "rgba"].includes(color.type)) return; cssColors.push(color); } const newComponents = []; for (let x2 = 0; x2 < 3; x2++) newComponents.push(mixComponent(cssColors[0].components[x2], cssColors[1].components[x2], weight)); return { type: "rgb", components: newComponents, alpha: mixComponent(cssColors[0].alpha ?? 1, cssColors[1].alpha ?? 1, weight) }; } function tint(color, weight) { return mixColor("#fff", color, weight); } function shade(color, weight) { return mixColor("#000", color, weight); } function shift(color, weight) { const num = Number.parseFloat(`${weight}`); if (!Number.isNaN(num)) return num > 0 ? shade(color, weight) : tint(color, -num); } var fns = { tint, shade, shift }; function variantColorMix() { let re; return { name: "mix", match(matcher, ctx) { if (!re) re = new RegExp(`^mix-(tint|shade|shift)-(-?\\d{1,3})(?:${ctx.generator.config.separators.join("|")})`); const m = matcher.match(re); if (m) { return { matcher: matcher.slice(m[0].length), body: (body) => { body.forEach((v) => { if (v[1]) { const color = parseCssColor(`${v[1]}`); if (color) { const mixed = fns[m[1]](color, m[2]); if (mixed) v[1] = colorToString(mixed); } } }); return body; } }; } } }; } var presetUno = definePreset((options = {}) => { const wind = presetWind(options); return { ...wind, name: "@unocss/preset-uno", variants: [ ...wind.variants, variantColorMix() ] }; }); // node_modules/.pnpm/@unocss+preset-attributify@0.58.9/node_modules/@unocss/preset-attributify/dist/index.mjs var variantsRE = /^(?!.*\[(?:[^:]+):(?:.+)\]$)((?:.+:)?!?)?(.*)$/; function variantAttributify(options = {}) { const prefix = options.prefix ?? "un-"; const prefixedOnly = options.prefixedOnly ?? false; const trueToNonValued = options.trueToNonValued ?? false; let variantsValueRE; return { name: "attributify", match(input, { generator }) { const match = isAttributifySelector(input); if (!match) return; let name42 = match[1]; if (name42.startsWith(prefix)) name42 = name42.slice(prefix.length); else if (prefixedOnly) return; const content = match[2]; const [, variants3 = "", body = content] = content.match(variantsRE) || []; if (body === "~" || trueToNonValued && body === "true" || !body) return `${variants3}${name42}`; if (variantsValueRE == null) { const separators = generator?.config?.separators?.join("|"); if (separators) variantsValueRE = new RegExp(`^(.*\\](?:${separators}))(\\[[^\\]]+?\\])$`); else variantsValueRE = false; } if (variantsValueRE) { const [, bodyVariant, bracketValue] = content.match(variantsValueRE) || []; if (bracketValue) return `${bodyVariant}${variants3}${name42}-${bracketValue}`; } return `${variants3}${name42}-${body}`; } }; } var elementRE$1 = /(<\w[\w:\.$-]*\s)((?:'[^>]*?'|"[^>]*?"|`[^>]*?`|\{[^>]*?\}|[^>]*?)*)/g; var valuedAttributeRE$1 = /([?]|(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:%-]+)(?:=("[^"]*|'[^']*))?/g; var splitterRE$1 = /[\s'"`;>]+/; function autocompleteExtractorAttributify(options) { return { name: "attributify", extract: ({ content, cursor }) => { const matchedElements = content.matchAll(elementRE$1); let attrs; let elPos = 0; for (const match of matchedElements) { const [, prefix, content2] = match; const currentPos2 = match.index + prefix.length; if (cursor > currentPos2 && cursor <= currentPos2 + content2.length) { elPos = currentPos2; attrs = content2; break; } } if (!attrs) return null; const matchedAttributes = attrs.matchAll(valuedAttributeRE$1); let attrsPos = 0; let attrName; let attrValues; for (const match of matchedAttributes) { const [matched, name42, rawValues] = match; const currentPos2 = elPos + match.index; if (cursor > currentPos2 && cursor <= currentPos2 + matched.length) { attrsPos = currentPos2; attrName = name42; attrValues = rawValues?.slice(1); break; } } if (!attrName) return null; if (attrName === "class" || attrName === "className" || attrName === ":class") return null; const hasPrefix = !!options?.prefix && attrName.startsWith(options.prefix); if (options?.prefixedOnly && !hasPrefix) return null; const attrNameWithoutPrefix = hasPrefix ? attrName.slice(options.prefix.length) : attrName; if (attrValues === void 0) { return { extracted: attrNameWithoutPrefix, resolveReplacement(suggestion) { const startOffset = hasPrefix ? options.prefix.length : 0; return { start: attrsPos + startOffset, end: attrsPos + attrName.length, replacement: suggestion }; } }; } const attrValuePos = attrsPos + attrName.length + 2; let matchSplit = splitterRE$1.exec(attrValues); let currentPos = 0; let value; while (matchSplit) { const [matched] = matchSplit; if (cursor > attrValuePos + currentPos && cursor <= attrValuePos + currentPos + matchSplit.index) { value = attrValues.slice(currentPos, currentPos + matchSplit.index); break; } currentPos += matchSplit.index + matched.length; matchSplit = splitterRE$1.exec(attrValues.slice(currentPos)); } if (value === void 0) value = attrValues.slice(currentPos); const [, variants3 = "", body] = value.match(variantsRE) || []; return { extracted: `${variants3}${attrNameWithoutPrefix}-${body}`, transformSuggestions(suggestions) { return suggestions.filter((v) => v.startsWith(`${variants3}${attrNameWithoutPrefix}-`)).map((v) => variants3 + v.slice(variants3.length + attrNameWithoutPrefix.length + 1)); }, resolveReplacement(suggestion) { return { start: currentPos + attrValuePos, end: currentPos + attrValuePos + value.length, replacement: variants3 + suggestion.slice(variants3.length + attrNameWithoutPrefix.length + 1) }; } }; } }; } var strippedPrefixes = [ "v-bind:", ":" ]; var splitterRE = /[\s'"`;]+/g; var elementRE = /<[^>\s]*\s((?:'.*?'|".*?"|`.*?`|\{.*?\}|=>|[^>]*?)*)/g; var valuedAttributeRE = /([?]|(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:!%-.~<]+)=?(?:["]([^"]*)["]|[']([^']*)[']|[{]([^}]*)[}])?/gms; var defaultIgnoreAttributes = ["placeholder", "fill", "opacity", "stroke-opacity"]; function extractorAttributify(options) { const ignoreAttributes = options?.ignoreAttributes ?? defaultIgnoreAttributes; const nonValuedAttribute = options?.nonValuedAttribute ?? true; const trueToNonValued = options?.trueToNonValued ?? false; return { name: "@unocss/preset-attributify/extractor", extract({ code: code2 }) { return Array.from(code2.matchAll(elementRE)).flatMap((match) => Array.from((match[1] || "").matchAll(valuedAttributeRE))).flatMap(([, name42, ...contents2]) => { const content = contents2.filter(Boolean).join(""); if (ignoreAttributes.includes(name42)) return []; for (const prefix of strippedPrefixes) { if (name42.startsWith(prefix)) { name42 = name42.slice(prefix.length); break; } } if (!content) { if (isValidSelector(name42) && nonValuedAttribute !== false) { const result = [`[${name42}=""]`]; if (trueToNonValued) result.push(`[${name42}="true"]`); return result; } return []; } if (["class", "className"].includes(name42)) { return content.split(splitterRE).filter(isValidSelector); } else if (elementRE.test(content)) { elementRE.lastIndex = 0; return this.extract({ code: content }); } else { if (options?.prefixedOnly && options.prefix && !name42.startsWith(options.prefix)) return []; return content.split(splitterRE).filter((v) => Boolean(v) && v !== ":").map((v) => `[${name42}~="${v}"]`); } }); } }; } var presetAttributify = definePreset((options = {}) => { options.strict = options.strict ?? false; options.prefix = options.prefix ?? "un-"; options.prefixedOnly = options.prefixedOnly ?? false; options.nonValuedAttribute = options.nonValuedAttribute ?? true; options.ignoreAttributes = options.ignoreAttributes ?? defaultIgnoreAttributes; const variants3 = [ variantAttributify(options) ]; const extractors = [ extractorAttributify(options) ]; const autocompleteExtractors = [ autocompleteExtractorAttributify(options) ]; return { name: "@unocss/preset-attributify", enforce: "post", variants: variants3, extractors, options, autocomplete: { extractors: autocompleteExtractors }, extractorDefault: options.strict ? false : void 0 }; }); // node_modules/.pnpm/@unocss+preset-tagify@0.58.9/node_modules/@unocss/preset-tagify/dist/index.mjs var MARKER = "__TAGIFY__"; var htmlTagRE = /<([\w\d-:]+)/g; function extractorTagify(options) { const { prefix = "", excludedTags = ["b", /^h\d+$/, "table"] } = options; return { name: "tagify", extract({ code: code2 }) { return Array.from(code2.matchAll(htmlTagRE)).filter(({ 1: match }) => { for (const exclude of excludedTags) { if (typeof exclude === "string") { if (match === exclude) return false; } else { if (exclude.test(match)) return false; } } return match.startsWith(prefix); }).map(([, matched]) => `${MARKER}${matched}`); } }; } function variantTagify(options) { const { extraProperties } = options; const prefix = `${MARKER}${options.prefix ?? ""}`; return { name: "tagify", match(input) { if (!input.startsWith(prefix)) return; const matcher = input.slice(prefix.length); const handler2 = { matcher, selector: (i) => i.slice(MARKER.length + 1) }; if (extraProperties) { if (typeof extraProperties === "function") handler2.body = (entries) => [...entries, ...Object.entries(extraProperties(matcher) ?? {})]; else handler2.body = (entries) => [...entries, ...Object.entries(extraProperties)]; } return handler2; } }; } var presetTagify = definePreset((options = {}) => { const { defaultExtractor = true } = options; const variants3 = [ variantTagify(options) ]; const extractors = [ extractorTagify(options) ]; return { name: "@unocss/preset-tagify", variants: variants3, extractors, extractorDefault: defaultExtractor ? void 0 : false }; }); // node_modules/.pnpm/@unocss+preset-icons@0.58.9/node_modules/@unocss/preset-icons/dist/shared/preset-icons.BBMLRFol.mjs var defaultIconDimensions = Object.freeze( { left: 0, top: 0, width: 16, height: 16 } ); var defaultIconTransformations = Object.freeze({ rotate: 0, vFlip: false, hFlip: false }); var defaultIconProps = Object.freeze({ ...defaultIconDimensions, ...defaultIconTransformations }); var defaultExtendedIconProps = Object.freeze({ ...defaultIconProps, body: "", hidden: false }); var defaultIconSizeCustomisations = Object.freeze({ width: null, height: null }); var defaultIconCustomisations = Object.freeze({ // Dimensions ...defaultIconSizeCustomisations, // Transformations ...defaultIconTransformations }); function mergeIconTransformations(obj1, obj2) { const result = {}; if (!obj1.hFlip !== !obj2.hFlip) { result.hFlip = true; } if (!obj1.vFlip !== !obj2.vFlip) { result.vFlip = true; } const rotate = ((obj1.rotate || 0) + (obj2.rotate || 0)) % 4; if (rotate) { result.rotate = rotate; } return result; } function mergeIconData(parent, child) { const result = mergeIconTransformations(parent, child); for (const key in defaultExtendedIconProps) { if (key in defaultIconTransformations) { if (key in parent && !(key in result)) { result[key] = defaultIconTransformations[key]; } } else if (key in child) { result[key] = child[key]; } else if (key in parent) { result[key] = parent[key]; } } return result; } function getIconsTree(data, names) { const icons2 = data.icons; const aliases = data.aliases || /* @__PURE__ */ Object.create(null); const resolved = /* @__PURE__ */ Object.create(null); function resolve(name42) { if (icons2[name42]) { return resolved[name42] = []; } if (!(name42 in resolved)) { resolved[name42] = null; const parent = aliases[name42] && aliases[name42].parent; const value = parent && resolve(parent); if (value) { resolved[name42] = [parent].concat(value); } } return resolved[name42]; } (names || Object.keys(icons2).concat(Object.keys(aliases))).forEach(resolve); return resolved; } function internalGetIconData(data, name42, tree) { const icons2 = data.icons; const aliases = data.aliases || /* @__PURE__ */ Object.create(null); let currentProps = {}; function parse44(name210) { currentProps = mergeIconData( icons2[name210] || aliases[name210], currentProps ); } parse44(name42); tree.forEach(parse44); return mergeIconData(data, currentProps); } function getIconData(data, name42) { if (data.icons[name42]) { return internalGetIconData(data, name42, []); } const tree = getIconsTree(data, [name42])[name42]; return tree ? internalGetIconData(data, name42, tree) : null; } var unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g; var unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g; function calculateSize(size, ratio, precision) { if (ratio === 1) { return size; } precision = precision || 100; if (typeof size === "number") { return Math.ceil(size * ratio * precision) / precision; } if (typeof size !== "string") { return size; } const oldParts = size.split(unitsSplit); if (oldParts === null || !oldParts.length) { return size; } const newParts = []; let code2 = oldParts.shift(); let isNumber = unitsTest.test(code2); while (true) { if (isNumber) { const num = parseFloat(code2); if (isNaN(num)) { newParts.push(code2); } else { newParts.push(Math.ceil(num * ratio * precision) / precision); } } else { newParts.push(code2); } code2 = oldParts.shift(); if (code2 === void 0) { return newParts.join(""); } isNumber = !isNumber; } } function splitSVGDefs(content, tag = "defs") { let defs = ""; const index = content.indexOf("<" + tag); while (index >= 0) { const start = content.indexOf(">", index); const end = content.indexOf("", end); if (endEnd === -1) { break; } defs += content.slice(start + 1, end).trim(); content = content.slice(0, index).trim() + content.slice(endEnd + 1); } return { defs, content }; } function mergeDefsAndContent(defs, content) { return defs ? "" + defs + "" + content : content; } function wrapSVGContent(body, start, end) { const split = splitSVGDefs(body); return mergeDefsAndContent(split.defs, start + split.content + end); } var isUnsetKeyword = (value) => value === "unset" || value === "undefined" || value === "none"; function iconToSVG(icon, customisations) { const fullIcon = { ...defaultIconProps, ...icon }; const fullCustomisations = { ...defaultIconCustomisations, ...customisations }; const box = { left: fullIcon.left, top: fullIcon.top, width: fullIcon.width, height: fullIcon.height }; let body = fullIcon.body; [fullIcon, fullCustomisations].forEach((props) => { const transformations = []; const hFlip = props.hFlip; const vFlip = props.vFlip; let rotation = props.rotate; if (hFlip) { if (vFlip) { rotation += 2; } else { transformations.push( "translate(" + (box.width + box.left).toString() + " " + (0 - box.top).toString() + ")" ); transformations.push("scale(-1 1)"); box.top = box.left = 0; } } else if (vFlip) { transformations.push( "translate(" + (0 - box.left).toString() + " " + (box.height + box.top).toString() + ")" ); transformations.push("scale(1 -1)"); box.top = box.left = 0; } let tempValue; if (rotation < 0) { rotation -= Math.floor(rotation / 4) * 4; } rotation = rotation % 4; switch (rotation) { case 1: tempValue = box.height / 2 + box.top; transformations.unshift( "rotate(90 " + tempValue.toString() + " " + tempValue.toString() + ")" ); break; case 2: transformations.unshift( "rotate(180 " + (box.width / 2 + box.left).toString() + " " + (box.height / 2 + box.top).toString() + ")" ); break; case 3: tempValue = box.width / 2 + box.left; transformations.unshift( "rotate(-90 " + tempValue.toString() + " " + tempValue.toString() + ")" ); break; } if (rotation % 2 === 1) { if (box.left !== box.top) { tempValue = box.left; box.left = box.top; box.top = tempValue; } if (box.width !== box.height) { tempValue = box.width; box.width = box.height; box.height = tempValue; } } if (transformations.length) { body = wrapSVGContent( body, '', "" ); } }); const customisationsWidth = fullCustomisations.width; const customisationsHeight = fullCustomisations.height; const boxWidth = box.width; const boxHeight = box.height; let width2; let height2; if (customisationsWidth === null) { height2 = customisationsHeight === null ? "1em" : customisationsHeight === "auto" ? boxHeight : customisationsHeight; width2 = calculateSize(height2, boxWidth / boxHeight); } else { width2 = customisationsWidth === "auto" ? boxWidth : customisationsWidth; height2 = customisationsHeight === null ? calculateSize(width2, boxHeight / boxWidth) : customisationsHeight === "auto" ? boxHeight : customisationsHeight; } const attributes = {}; const setAttr = (prop, value) => { if (!isUnsetKeyword(value)) { attributes[prop] = value.toString(); } }; setAttr("width", width2); setAttr("height", height2); const viewBox = [box.left, box.top, boxWidth, boxHeight]; attributes.viewBox = viewBox.join(" "); return { attributes, viewBox, body }; } function encodeSVGforURL(svg) { return svg.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(//g, "%3E").replace(/\s+/g, " "); } function encodeSvgForCss(svg) { let useSvg = svg.startsWith("") ? svg.replace("", "") : svg; if (!useSvg.includes(" xmlns:xlink=") && useSvg.includes(" xlink:")) { useSvg = useSvg.replace( "\\/\s])/g, "$1 $2").replace(/(["';{}><])\s*\n\s*/g, "$1").replace(/\s*\n\s*/g, " ").replace(/\s+"/g, '"').replace(/="\s+/g, '="').replace(/(\s)+\/>/g, "/>").trim(); } var svgWidthRegex = /\swidth\s*=\s*["']([\w.]+)["']/; var svgHeightRegex = /\sheight\s*=\s*["']([\w.]+)["']/; var svgTagRegex = /")); const check = (prop, regex) => { const result = regex.exec(svgNode); const isSet = result != null; const propValue = props[prop]; if (!propValue && !isUnsetKeyword(propValue)) { if (typeof scale === "number") { if (scale > 0) { props[prop] = `${scale}em`; } } else if (result) { props[prop] = result[1]; } } return isSet; }; return [check("width", svgWidthRegex), check("height", svgHeightRegex)]; } async function mergeIconProps(svg, collection, icon, options, propsProvider, afterCustomizations) { const { scale, addXmlNs = false } = options ?? {}; const { additionalProps = {}, iconCustomizer } = options?.customizations ?? {}; const props = await propsProvider?.() ?? {}; await iconCustomizer?.(collection, icon, props); Object.keys(additionalProps).forEach((p) => { const v = additionalProps[p]; if (v !== void 0 && v !== null) props[p] = v; }); afterCustomizations?.(props); const [widthOnSvg, heightOnSvg] = configureSvgSize(svg, props, scale); if (addXmlNs) { if (!svg.includes("xmlns=") && !props["xmlns"]) { props["xmlns"] = "http://www.w3.org/2000/svg"; } if (!svg.includes("xmlns:xlink=") && svg.includes("xlink:") && !props["xmlns:xlink"]) { props["xmlns:xlink"] = "http://www.w3.org/1999/xlink"; } } const propsToAdd = Object.keys(props).map( (p) => p === "width" && widthOnSvg || p === "height" && heightOnSvg ? null : `${p}="${props[p]}"` ).filter((p) => p != null); if (propsToAdd.length) { svg = svg.replace(svgTagRegex, ` { const v = props[p]; if (v !== void 0 && v !== null) usedProps[p] = v; }); if (typeof props.width !== "undefined" && props.width !== null) { usedProps.width = props.width; } if (typeof props.height !== "undefined" && props.height !== null) { usedProps.height = props.height; } } return svg; } async function getCustomIcon(custom, collection, icon, options) { let result; try { if (typeof custom === "function") { result = await custom(icon); } else { const inline = custom[icon]; result = typeof inline === "function" ? await inline() : inline; } } catch (err) { console.warn( `Failed to load custom icon "${icon}" in "${collection}":`, err ); return; } if (result) { const cleanupIdx = result.indexOf(" 0) result = result.slice(cleanupIdx); const { transform } = options?.customizations ?? {}; result = typeof transform === "function" ? await transform(result, collection, icon) : result; if (!result.startsWith(" `${body}`, collection, id, options, () => { return { ...restAttributes }; }, (props) => { const check = (prop, defaultValue) => { const propValue = props[prop]; let value; if (!isUnsetKeyword(propValue)) { if (propValue) { return; } if (typeof scale === "number") { if (scale) { value = `${scale}em`; } } else { value = defaultValue; } } if (!value) { delete props[prop]; } else { props[prop] = value; } }; check("width", width2); check("height", height2); } ); } } } var loadIcon = async (collection, icon, options) => { const custom = options?.customCollections?.[collection]; if (custom) { if (typeof custom === "function") { let result; try { result = await custom(icon); } catch (err) { console.warn( `Failed to load custom icon "${icon}" in "${collection}":`, err ); return; } if (result) { if (typeof result === "string") { return await getCustomIcon( () => result, collection, icon, options ); } if ("icons" in result) { const ids = [ icon, icon.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), icon.replace(/([a-z])(\d+)/g, "$1-$2") ]; return await searchForIcon( result, collection, ids, options ); } } } else { return await getCustomIcon(custom, collection, icon, options); } } }; function getDefaultExportFromCjs(x2) { return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2; } var collections = [ "academicons", "akar-icons", "ant-design", "arcticons", "basil", "bi", "bitcoin-icons", "bpmn", "brandico", "bx", "bxl", "bxs", "bytesize", "carbon", "cbi", "charm", "ci", "cib", "cif", "cil", "circle-flags", "circum", "clarity", "codicon", "covid", "cryptocurrency-color", "cryptocurrency", "dashicons", "devicon-line", "devicon-original", "devicon-plain", "devicon", "ei", "el", "emblemicons", "emojione-monotone", "emojione-v1", "emojione", "entypo-social", "entypo", "eos-icons", "ep", "et", "eva", "f7", "fa-brands", "fa-regular", "fa-solid", "fa", "fa6-brands", "fa6-regular", "fa6-solid", "fad", "fe", "feather", "file-icons", "flag", "flagpack", "flat-color-icons", "flat-ui", "flowbite", "fluent-emoji-flat", "fluent-emoji-high-contrast", "fluent-emoji", "fluent-mdl2", "fluent", "fontelico", "fontisto", "formkit", "foundation", "fxemoji", "gala", "game-icons", "geo", "gg", "gis", "gravity-ui", "gridicons", "grommet-icons", "guidance", "healthicons", "heroicons-outline", "heroicons-solid", "heroicons", "humbleicons", "ic", "icomoon-free", "icon-park-outline", "icon-park-solid", "icon-park-twotone", "icon-park", "iconamoon", "iconoir", "icons8", "il", "ion", "iwwa", "jam", "la", "lets-icons", "line-md", "logos", "ls", "lucide", "mage", "majesticons", "maki", "map", "material-symbols-light", "material-symbols", "mdi-light", "mdi", "medical-icon", "memory", "meteocons", "mi", "mingcute", "mono-icons", "mynaui", "nimbus", "nonicons", "noto-v1", "noto", "octicon", "oi", "ooui", "openmoji", "oui", "pajamas", "pepicons-pencil", "pepicons-pop", "pepicons-print", "pepicons", "ph", "pixelarticons", "prime", "ps", "quill", "radix-icons", "raphael", "ri", "si-glyph", "simple-icons", "simple-line-icons", "skill-icons", "solar", "streamline-emojis", "streamline", "subway", "svg-spinners", "system-uicons", "tabler", "tdesign", "teenyicons", "topcoat", "twemoji", "typcn", "uil", "uim", "uis", "uit", "uiw", "unjs", "vaadin", "vs", "vscode-icons", "websymbol", "whh", "wi", "wpf", "zmdi", "zondicons" ]; var icons = getDefaultExportFromCjs(collections); var COLLECTION_NAME_PARTS_MAX = 3; function createPresetIcons(lookupIconLoader) { return definePreset((options = {}) => { const { scale = 1, mode = "auto", prefix = "i-", warn = false, collections: customCollections, extraProperties = {}, customizations = {}, autoInstall = false, collectionsNodeResolvePath, layer = "icons", unit } = options; const flags = getEnvFlags(); const loaderOptions = { addXmlNs: true, scale, customCollections, autoInstall, cwd: collectionsNodeResolvePath, // avoid warn from @iconify/loader: we'll warn below if not found warn: void 0, customizations: { ...customizations, additionalProps: { ...extraProperties }, trimCustomSvg: true, async iconCustomizer(collection, icon, props) { await customizations.iconCustomizer?.(collection, icon, props); if (unit) { if (!props.width) props.width = `${scale}${unit}`; if (!props.height) props.height = `${scale}${unit}`; } } } }; let iconLoader; return { name: "@unocss/preset-icons", enforce: "pre", options, layers: { icons: -30 }, rules: [[ /^([a-z0-9:_-]+)(?:\?(mask|bg|auto))?$/, async ([full, body, _mode = mode]) => { let collection = ""; let name42 = ""; let svg; iconLoader = iconLoader || await lookupIconLoader(options); const usedProps = {}; if (body.includes(":")) { [collection, name42] = body.split(":"); svg = await iconLoader(collection, name42, { ...loaderOptions, usedProps }); } else { const parts = body.split(/-/g); for (let i = COLLECTION_NAME_PARTS_MAX; i >= 1; i--) { collection = parts.slice(0, i).join("-"); name42 = parts.slice(i).join("-"); svg = await iconLoader(collection, name42, { ...loaderOptions, usedProps }); if (svg) break; } } if (!svg) { if (warn && !flags.isESLint) warnOnce(`failed to load icon "${full}"`); return; } const url = `url("data:image/svg+xml;utf8,${encodeSvgForCss(svg)}")`; if (_mode === "auto") _mode = svg.includes("currentColor") ? "mask" : "bg"; if (_mode === "mask") { return { "--un-icon": url, "-webkit-mask": "var(--un-icon) no-repeat", "mask": "var(--un-icon) no-repeat", "-webkit-mask-size": "100% 100%", "mask-size": "100% 100%", "background-color": "currentColor", // for Safari https://github.com/elk-zone/elk/pull/264 "color": "inherit", ...usedProps }; } else { return { "background": `${url} no-repeat`, "background-size": "100% 100%", "background-color": "transparent", ...usedProps }; } }, { layer, prefix } ]] }; }); } function combineLoaders(loaders) { return async (...args) => { for (const loader of loaders) { if (!loader) continue; const result = await loader(...args); if (result) return result; } }; } function createCDNFetchLoader(fetcher, cdnBase) { const cache = /* @__PURE__ */ new Map(); function fetchCollection(name42) { if (!icons.includes(name42)) return void 0; if (!cache.has(name42)) cache.set(name42, fetcher(`${cdnBase}@iconify-json/${name42}/icons.json`)); return cache.get(name42); } return async (collection, icon, options) => { let result = await loadIcon(collection, icon, options); if (result) return result; const iconSet = await fetchCollection(collection); if (iconSet) { const ids = [ icon, icon.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), icon.replace(/([a-z])(\d+)/g, "$1-$2") ]; result = await searchForIcon(iconSet, collection, ids, options); } return result; }; } function getEnvFlags() { const isNode = typeof process !== "undefined" && process.stdout && !process.versions.deno; const isVSCode = isNode && !!process.env.VSCODE_CWD; const isESLint = isNode && !!process.env.ESLINT; return { isNode, isVSCode, isESLint }; } // node_modules/.pnpm/@unocss+preset-icons@0.58.9/node_modules/@unocss/preset-icons/dist/shared/preset-icons.BAlQvmXS.mjs function createCDNLoader(cdnBase) { return createCDNFetchLoader($fetch, cdnBase); } // node_modules/.pnpm/@unocss+preset-icons@0.58.9/node_modules/@unocss/preset-icons/dist/index.mjs async function createNodeLoader() { try { return await import("./node-loader-GEK6CJ6Q.js").then((i) => i?.loadNodeIcon); } catch { } try { return require_node_loader().loadNodeIcon; } catch { } } var presetIcons = createPresetIcons(async (options) => { const { cdn } = options; const loaders = []; const { isNode, isVSCode, isESLint } = getEnvFlags(); if (isNode && !isVSCode && !isESLint) { const nodeLoader = await createNodeLoader(); if (nodeLoader !== void 0) loaders.push(nodeLoader); } if (cdn) loaders.push(createCDNLoader(cdn)); loaders.push(loadIcon); return combineLoaders(loaders); }); // node_modules/.pnpm/@unocss+preset-web-fonts@0.58.9/node_modules/@unocss/preset-web-fonts/dist/index.mjs var LAYER_IMPORTS2 = "imports"; function createBunnyFontsProvider(name42, host) { return { name: name42, getImportUrl(fonts2) { const fontFamilies = fonts2.map((font) => { const { name: name210, weights, italic } = font; const formattedName = name210.toLowerCase().replace(/\s/g, "-"); if (!weights?.length) return `${formattedName}${italic ? ":i" : ""}`; let weightsAsString = weights.map((weight) => weight.toString()); const weightsHaveItalic = weightsAsString.some((weight) => weight.endsWith("i")); if (!weightsHaveItalic && italic) weightsAsString = weightsAsString.map((weight) => weight += "i"); return `${formattedName}:${weightsAsString.join(",")}`; }); return `${host}/css?family=${fontFamilies.join("|")}&display=swap`; } }; } var BunnyFontsProvider = createBunnyFontsProvider( "bunny", "https://fonts.bunny.net" ); function createGoogleCompatibleProvider(name42, host) { return { name: name42, getImportUrl(fonts2) { const sort = (weights) => { const firstW = weights.map((w) => w[0]); const lastW = weights.map((w) => w[1]); return `${firstW.join(";")};${lastW.join(";")}`; }; const strings = fonts2.map((i) => { let name210 = i.name.replace(/\s+/g, "+"); if (i.weights?.length) { name210 += i.italic ? `:ital,wght@${sort(i.weights.map((w) => [`0,${w}`, `1,${w}`]))}` : `:wght@${i.weights.join(";")}`; } return `family=${name210}`; }).join("&"); return `${host}/css2?${strings}&display=swap`; } }; } var GoogleFontsProvider = createGoogleCompatibleProvider("google", "https://fonts.googleapis.com"); var FontshareProvider = createFontshareProvider("fontshare", "https://api.fontshare.com"); function createFontshareProvider(name42, host) { return { name: name42, getImportUrl(fonts2) { const strings = fonts2.map((f) => { let name210 = f.name.replace(/\s+/g, "-").toLocaleLowerCase(); if (f.weights?.length) name210 += `@${f.weights.flatMap((w) => f.italic ? Number(w) + 1 : w).sort().join()}`; else name210 += `@${f.italic ? 2 : 1}`; return `f[]=${name210}`; }).join("&"); return `${host}/v2/css?${strings}&display=swap`; } }; } var NoneProvider = { name: "none", getPreflight() { return ""; }, getFontName(font) { return font.name; } }; var builtinProviders = { google: GoogleFontsProvider, bunny: BunnyFontsProvider, fontshare: FontshareProvider, none: NoneProvider }; function resolveProvider(provider) { if (typeof provider === "string") return builtinProviders[provider]; return provider; } function normalizedFontMeta(meta, defaultProvider) { if (typeof meta !== "string") { meta.provider = resolveProvider(meta.provider || defaultProvider); if (meta.weights) meta.weights = [...new Set(meta.weights.sort((a, b) => a.toString().localeCompare(b.toString(), "en", { numeric: true })))]; return meta; } const [name42, weights = ""] = meta.split(":"); return { name: name42, weights: [...new Set(weights.split(/[,;]\s*/).filter(Boolean).sort((a, b) => a.localeCompare(b, "en", { numeric: true })))], provider: resolveProvider(defaultProvider) }; } function createWebFontPreset(fetcher) { return (options = {}) => { const { provider: defaultProvider = "google", extendTheme = true, inlineImports = true, themeKey = "fontFamily", customFetch = fetcher } = options; const fontObject = Object.fromEntries( Object.entries(options.fonts || {}).map(([name42, meta]) => [name42, toArray(meta).map((m) => normalizedFontMeta(m, defaultProvider))]) ); const fonts2 = Object.values(fontObject).flatMap((i) => i); const importCache = {}; async function importUrl(url) { if (inlineImports) { if (!importCache[url]) { importCache[url] = customFetch(url).catch((e2) => { console.error("Failed to fetch web fonts"); console.error(e2); if (typeof process !== "undefined" && process.env.CI) throw e2; }); } return await importCache[url]; } else { return `@import url('${url}');`; } } const enabledProviders = new Set(fonts2.map((i) => i.provider)); const preset = { name: "@unocss/preset-web-fonts", preflights: [ { async getCSS() { const preflights2 = []; for (const provider of enabledProviders) { const fontsForProvider = fonts2.filter((i) => i.provider.name === provider.name); if (provider.getImportUrl) { const url = provider.getImportUrl(fontsForProvider); if (url) preflights2.push(await importUrl(url)); } preflights2.push(provider.getPreflight?.(fontsForProvider)); } return preflights2.filter(Boolean).join("\n"); }, layer: inlineImports ? void 0 : LAYER_IMPORTS2 } ] }; if (extendTheme) { preset.extendTheme = (theme3) => { if (!theme3[themeKey]) theme3[themeKey] = {}; const obj = Object.fromEntries( Object.entries(fontObject).map(([name42, fonts22]) => [name42, fonts22.map((f) => f.provider.getFontName?.(f) ?? `"${f.name}"`)]) ); for (const key of Object.keys(obj)) { if (typeof theme3[themeKey][key] === "string") theme3[themeKey][key] = obj[key].map((i) => `${i},`).join("") + theme3[themeKey][key]; else theme3[themeKey][key] = obj[key].join(","); } }; } return preset; }; } var userAgentWoff2 = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"; var defaultFetch = async (url) => (await import("./dist-TZAVYMEB.js")).$fetch(url, { headers: { "User-Agent": userAgentWoff2 }, retry: 3 }); var presetWebFonts = definePreset(createWebFontPreset(defaultFetch)); // node_modules/.pnpm/@unocss+preset-typography@0.58.9/node_modules/@unocss/preset-typography/dist/index.mjs function DEFAULT(theme3) { return { "h1,h2,h3,h4,h5,h6": { "color": "var(--un-prose-headings)", "font-weight": "600", "line-height": 1.25 }, "a": { "color": "var(--un-prose-links)", "text-decoration": "underline", "font-weight": "500" }, "a code": { color: "var(--un-prose-links)" }, "p,ul,ol,pre": { "margin": "1em 0", "line-height": 1.75 }, "blockquote": { "margin": "1em 0", "padding-left": "1em", "font-style": "italic", "border-left": ".25em solid var(--un-prose-borders)" }, // taking 16px as a base, we scale h1, h2, h3, and h4 like // 16 (base) > 18 (h4) > 22 (h3) > 28 (h2) > 36 (h1) "h1": { "margin": "1rem 0", // h1 is always at the top of the page, so only margin 1 * root font size "font-size": "2.25em" }, "h2": { "margin": "1.75em 0 .5em", "font-size": "1.75em" }, "h3": { "margin": "1.5em 0 .5em", "font-size": "1.375em" }, "h4": { "margin": "1em 0", "font-size": "1.125em" }, "img,video": { "max-width": "100%" }, "figure,picture": { margin: "1em 0" }, "figcaption": { "color": "var(--un-prose-captions)", "font-size": ".875em" }, "code": { "color": "var(--un-prose-code)", "font-size": ".875em", "font-weight": 600, "font-family": theme3.fontFamily?.mono }, ":not(pre) > code::before,:not(pre) > code::after": { content: '"`"' }, "pre": { "padding": "1.25rem 1.5rem", "overflow-x": "auto", "border-radius": ".375rem" }, "pre,code": { "white-space": "pre", "word-spacing": "normal", "word-break": "normal", "word-wrap": "normal", "-moz-tab-size": 4, "-o-tab-size": 4, "tab-size": 4, "-webkit-hyphens": "none", "-moz-hyphens": "none", "hyphens": "none", "background": "transparent" }, "pre code": { "font-weight": "inherit" }, "ol,ul": { "padding-left": "1.25em" }, "ol": { "list-style-type": "decimal" }, 'ol[type="A"]': { "list-style-type": "upper-alpha" }, 'ol[type="a"]': { "list-style-type": "lower-alpha" }, 'ol[type="A" s]': { "list-style-type": "upper-alpha" }, 'ol[type="a" s]': { "list-style-type": "lower-alpha" }, 'ol[type="I"]': { "list-style-type": "upper-roman" }, 'ol[type="i"]': { "list-style-type": "lower-roman" }, 'ol[type="I" s]': { "list-style-type": "upper-roman" }, 'ol[type="i" s]': { "list-style-type": "lower-roman" }, 'ol[type="1"]': { "list-style-type": "decimal" }, "ul": { "list-style-type": "disc" }, "ol > li::marker,ul > li::marker,summary::marker": { color: "var(--un-prose-lists)" }, "hr": { margin: "2em 0", border: "1px solid var(--un-prose-hr)" }, "table": { "display": "block", "margin": "1em 0", "border-collapse": "collapse", "overflow-x": "auto" }, "tr:nth-child(2n)": { background: "var(--un-prose-bg-soft)" }, "td,th": { border: "1px solid var(--un-prose-borders)", padding: ".625em 1em" }, "abbr": { cursor: "help" }, "kbd": { "color": "var(--un-prose-code)", "border": "1px solid", "padding": ".25rem .5rem", "font-size": ".875em", "border-radius": ".25rem" }, "details": { margin: "1em 0", padding: "1.25rem 1.5rem", background: "var(--un-prose-bg-soft)" }, "summary": { "cursor": "pointer", "font-weight": "600" } }; } function getCSS(options) { let css = ""; const { escapedSelector, selectorName, preflights: preflights2, compatibility } = options; const disableNotUtility = compatibility?.noColonNot || compatibility?.noColonWhere; for (const selector2 in preflights2) { const cssDeclarationBlock = preflights2[selector2]; const notProseSelector = `:not(:where(.not-${selectorName},.not-${selectorName} *))`; const pseudoCSSMatchArray = selector2.split(",").map((s) => { const match = s.match(/::?(?:[\(\)\:\-\d\w]+)$/g); if (match) { const matchStr = match[0]; s = s.replace(matchStr, ""); return escapedSelector.map((e2) => disableNotUtility ? `${e2} ${s}${matchStr}` : `${e2} :where(${s})${notProseSelector}${matchStr}`).join(","); } return null; }).filter((v) => v); if (pseudoCSSMatchArray.length) { css += pseudoCSSMatchArray.join(","); } else { css += escapedSelector.map((e2) => disableNotUtility ? selector2.split(",").map((s) => `${e2} ${s}`).join(",") : `${e2} :where(${selector2})${notProseSelector}`).join(","); } css += "{"; for (const k in cssDeclarationBlock) { const v = cssDeclarationBlock[k]; css += `${k}:${v};`; } css += "}"; } return css; } function getPreflights(context, options) { const { escapedSelectors, selectorName, cssExtend, compatibility } = options; let escapedSelector = Array.from(escapedSelectors); if (!escapedSelector[escapedSelector.length - 1].startsWith(".") && !compatibility?.noColonIs) escapedSelector = [`:is(${escapedSelector[escapedSelector.length - 1]},.${selectorName})`]; if (cssExtend) return getCSS({ escapedSelector, selectorName, preflights: mergeDeep(DEFAULT(context.theme), cssExtend), compatibility }); return getCSS({ escapedSelector, selectorName, preflights: DEFAULT(context.theme), compatibility }); } var presetTypography = definePreset((options) => { if (options?.className) { console.warn('[unocss:preset-typography] "className" is deprecated. Use "selectorName" instead.'); } const escapedSelectors = /* @__PURE__ */ new Set(); const selectorName = options?.selectorName || options?.className || "prose"; const selectorNameRE = new RegExp(`^${selectorName}$`); const colorsRE = new RegExp(`^${selectorName}-([-\\w]+)$`); const invertRE = new RegExp(`^${selectorName}-invert$`); const compatibility = options?.compatibility; return { name: "@unocss/preset-typography", enforce: "post", layers: { typography: -20 }, rules: [ [ selectorNameRE, (_, { rawSelector }) => { escapedSelectors.add(toEscapedSelector(rawSelector)); return { "color": "var(--un-prose-body)", "max-width": "65ch" }; }, { layer: "typography" } ], [ colorsRE, ([, color], { theme: theme3 }) => { const baseColor = theme3.colors?.[color]; if (baseColor == null) return; const colorObject = typeof baseColor === "object" ? baseColor : {}; return { "--un-prose-body": colorObject[700] ?? baseColor, "--un-prose-headings": colorObject[900] ?? baseColor, "--un-prose-links": colorObject[900] ?? baseColor, "--un-prose-lists": colorObject[400] ?? baseColor, "--un-prose-hr": colorObject[200] ?? baseColor, "--un-prose-captions": colorObject[500] ?? baseColor, "--un-prose-code": colorObject[900] ?? baseColor, "--un-prose-borders": colorObject[200] ?? baseColor, "--un-prose-bg-soft": colorObject[100] ?? baseColor, // invert colors (dark mode) "--un-prose-invert-body": colorObject[200] ?? baseColor, "--un-prose-invert-headings": colorObject[100] ?? baseColor, "--un-prose-invert-links": colorObject[100] ?? baseColor, "--un-prose-invert-lists": colorObject[500] ?? baseColor, "--un-prose-invert-hr": colorObject[700] ?? baseColor, "--un-prose-invert-captions": colorObject[400] ?? baseColor, "--un-prose-invert-code": colorObject[100] ?? baseColor, "--un-prose-invert-borders": colorObject[700] ?? baseColor, "--un-prose-invert-bg-soft": colorObject[800] ?? baseColor }; }, { layer: "typography" } ], [ invertRE, () => { return { "--un-prose-body": "var(--un-prose-invert-body)", "--un-prose-headings": "var(--un-prose-invert-headings)", "--un-prose-links": "var(--un-prose-invert-links)", "--un-prose-lists": "var(--un-prose-invert-lists)", "--un-prose-hr": "var(--un-prose-invert-hr)", "--un-prose-captions": "var(--un-prose-invert-captions)", "--un-prose-code": "var(--un-prose-invert-code)", "--un-prose-borders": "var(--un-prose-invert-borders)", "--un-prose-bg-soft": "var(--un-prose-invert-bg-soft)" }; }, { layer: "typography" } ] ], preflights: [ { layer: "typography", getCSS: (context) => { if (escapedSelectors.size > 0) { const cssExtend = typeof options?.cssExtend === "function" ? options.cssExtend(context.theme) : options?.cssExtend; return getPreflights(context, { escapedSelectors, selectorName, cssExtend, compatibility }); } } } ] }; }); // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/tokenizer/types.js var EOF = 0; var Ident = 1; var Function = 2; var AtKeyword = 3; var Hash = 4; var String2 = 5; var BadString = 6; var Url = 7; var BadUrl = 8; var Delim = 9; var Number2 = 10; var Percentage = 11; var Dimension = 12; var WhiteSpace = 13; var CDO = 14; var CDC = 15; var Colon = 16; var Semicolon = 17; var Comma = 18; var LeftSquareBracket = 19; var RightSquareBracket = 20; var LeftParenthesis = 21; var RightParenthesis = 22; var LeftCurlyBracket = 23; var RightCurlyBracket = 24; var Comment = 25; // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/tokenizer/char-code-definitions.js var EOF2 = 0; function isDigit(code2) { return code2 >= 48 && code2 <= 57; } function isHexDigit(code2) { return isDigit(code2) || // 0 .. 9 code2 >= 65 && code2 <= 70 || // A .. F code2 >= 97 && code2 <= 102; } function isUppercaseLetter(code2) { return code2 >= 65 && code2 <= 90; } function isLowercaseLetter(code2) { return code2 >= 97 && code2 <= 122; } function isLetter(code2) { return isUppercaseLetter(code2) || isLowercaseLetter(code2); } function isNonAscii(code2) { return code2 >= 128; } function isNameStart(code2) { return isLetter(code2) || isNonAscii(code2) || code2 === 95; } function isName(code2) { return isNameStart(code2) || isDigit(code2) || code2 === 45; } function isNonPrintable(code2) { return code2 >= 0 && code2 <= 8 || code2 === 11 || code2 >= 14 && code2 <= 31 || code2 === 127; } function isNewline(code2) { return code2 === 10 || code2 === 13 || code2 === 12; } function isWhiteSpace(code2) { return isNewline(code2) || code2 === 32 || code2 === 9; } function isValidEscape(first, second) { if (first !== 92) { return false; } if (isNewline(second) || second === EOF2) { return false; } return true; } function isIdentifierStart(first, second, third) { if (first === 45) { return isNameStart(second) || second === 45 || isValidEscape(second, third); } if (isNameStart(first)) { return true; } if (first === 92) { return isValidEscape(first, second); } return false; } function isNumberStart(first, second, third) { if (first === 43 || first === 45) { if (isDigit(second)) { return 2; } return second === 46 && isDigit(third) ? 3 : 0; } if (first === 46) { return isDigit(second) ? 2 : 0; } if (isDigit(first)) { return 1; } return 0; } function isBOM(code2) { if (code2 === 65279) { return 1; } if (code2 === 65534) { return 1; } return 0; } var CATEGORY = new Array(128); var EofCategory = 128; var WhiteSpaceCategory = 130; var DigitCategory = 131; var NameStartCategory = 132; var NonPrintableCategory = 133; for (let i = 0; i < CATEGORY.length; i++) { CATEGORY[i] = isWhiteSpace(i) && WhiteSpaceCategory || isDigit(i) && DigitCategory || isNameStart(i) && NameStartCategory || isNonPrintable(i) && NonPrintableCategory || i || EofCategory; } function charCodeCategory(code2) { return code2 < 128 ? CATEGORY[code2] : NameStartCategory; } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/tokenizer/utils.js function getCharCode(source, offset) { return offset < source.length ? source.charCodeAt(offset) : 0; } function getNewlineLength(source, offset, code2) { if (code2 === 13 && getCharCode(source, offset + 1) === 10) { return 2; } return 1; } function cmpChar(testStr, offset, referenceCode) { let code2 = testStr.charCodeAt(offset); if (isUppercaseLetter(code2)) { code2 = code2 | 32; } return code2 === referenceCode; } function cmpStr(testStr, start, end, referenceStr) { if (end - start !== referenceStr.length) { return false; } if (start < 0 || end > testStr.length) { return false; } for (let i = start; i < end; i++) { const referenceCode = referenceStr.charCodeAt(i - start); let testCode = testStr.charCodeAt(i); if (isUppercaseLetter(testCode)) { testCode = testCode | 32; } if (testCode !== referenceCode) { return false; } } return true; } function findWhiteSpaceStart(source, offset) { for (; offset >= 0; offset--) { if (!isWhiteSpace(source.charCodeAt(offset))) { break; } } return offset + 1; } function findWhiteSpaceEnd(source, offset) { for (; offset < source.length; offset++) { if (!isWhiteSpace(source.charCodeAt(offset))) { break; } } return offset; } function findDecimalNumberEnd(source, offset) { for (; offset < source.length; offset++) { if (!isDigit(source.charCodeAt(offset))) { break; } } return offset; } function consumeEscaped(source, offset) { offset += 2; if (isHexDigit(getCharCode(source, offset - 1))) { for (const maxOffset = Math.min(source.length, offset + 5); offset < maxOffset; offset++) { if (!isHexDigit(getCharCode(source, offset))) { break; } } const code2 = getCharCode(source, offset); if (isWhiteSpace(code2)) { offset += getNewlineLength(source, offset, code2); } } return offset; } function consumeName(source, offset) { for (; offset < source.length; offset++) { const code2 = source.charCodeAt(offset); if (isName(code2)) { continue; } if (isValidEscape(code2, getCharCode(source, offset + 1))) { offset = consumeEscaped(source, offset) - 1; continue; } break; } return offset; } function consumeNumber(source, offset) { let code2 = source.charCodeAt(offset); if (code2 === 43 || code2 === 45) { code2 = source.charCodeAt(offset += 1); } if (isDigit(code2)) { offset = findDecimalNumberEnd(source, offset + 1); code2 = source.charCodeAt(offset); } if (code2 === 46 && isDigit(source.charCodeAt(offset + 1))) { offset += 2; offset = findDecimalNumberEnd(source, offset); } if (cmpChar( source, offset, 101 /* e */ )) { let sign = 0; code2 = source.charCodeAt(offset + 1); if (code2 === 45 || code2 === 43) { sign = 1; code2 = source.charCodeAt(offset + 2); } if (isDigit(code2)) { offset = findDecimalNumberEnd(source, offset + 1 + sign + 1); } } return offset; } function consumeBadUrlRemnants(source, offset) { for (; offset < source.length; offset++) { const code2 = source.charCodeAt(offset); if (code2 === 41) { offset++; break; } if (isValidEscape(code2, getCharCode(source, offset + 1))) { offset = consumeEscaped(source, offset); } } return offset; } function decodeEscaped(escaped) { if (escaped.length === 1 && !isHexDigit(escaped.charCodeAt(0))) { return escaped[0]; } let code2 = parseInt(escaped, 16); if (code2 === 0 || // If this number is zero, code2 >= 55296 && code2 <= 57343 || // or is for a surrogate, code2 > 1114111) { code2 = 65533; } return String.fromCodePoint(code2); } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/tokenizer/names.js var names_default = [ "EOF-token", "ident-token", "function-token", "at-keyword-token", "hash-token", "string-token", "bad-string-token", "url-token", "bad-url-token", "delim-token", "number-token", "percentage-token", "dimension-token", "whitespace-token", "CDO-token", "CDC-token", "colon-token", "semicolon-token", "comma-token", "[-token", "]-token", "(-token", ")-token", "{-token", "}-token" ]; // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/tokenizer/adopt-buffer.js var MIN_SIZE = 16 * 1024; function adoptBuffer(buffer = null, size) { if (buffer === null || buffer.length < size) { return new Uint32Array(Math.max(size + 1024, MIN_SIZE)); } return buffer; } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/tokenizer/OffsetToLocation.js var N = 10; var F = 12; var R = 13; function computeLinesAndColumns(host) { const source = host.source; const sourceLength = source.length; const startOffset = source.length > 0 ? isBOM(source.charCodeAt(0)) : 0; const lines = adoptBuffer(host.lines, sourceLength); const columns2 = adoptBuffer(host.columns, sourceLength); let line = host.startLine; let column = host.startColumn; for (let i = startOffset; i < sourceLength; i++) { const code2 = source.charCodeAt(i); lines[i] = line; columns2[i] = column++; if (code2 === N || code2 === R || code2 === F) { if (code2 === R && i + 1 < sourceLength && source.charCodeAt(i + 1) === N) { i++; lines[i] = line; columns2[i] = column; } line++; column = 1; } } lines[sourceLength] = line; columns2[sourceLength] = column; host.lines = lines; host.columns = columns2; host.computed = true; } var OffsetToLocation = class { constructor() { this.lines = null; this.columns = null; this.computed = false; } setSource(source, startOffset = 0, startLine = 1, startColumn = 1) { this.source = source; this.startOffset = startOffset; this.startLine = startLine; this.startColumn = startColumn; this.computed = false; } getLocation(offset, filename) { if (!this.computed) { computeLinesAndColumns(this); } return { source: filename, offset: this.startOffset + offset, line: this.lines[offset], column: this.columns[offset] }; } getLocationRange(start, end, filename) { if (!this.computed) { computeLinesAndColumns(this); } return { source: filename, start: { offset: this.startOffset + start, line: this.lines[start], column: this.columns[start] }, end: { offset: this.startOffset + end, line: this.lines[end], column: this.columns[end] } }; } }; // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/tokenizer/TokenStream.js var OFFSET_MASK = 16777215; var TYPE_SHIFT = 24; var balancePair = /* @__PURE__ */ new Map([ [Function, RightParenthesis], [LeftParenthesis, RightParenthesis], [LeftSquareBracket, RightSquareBracket], [LeftCurlyBracket, RightCurlyBracket] ]); var TokenStream = class { constructor(source, tokenize3) { this.setSource(source, tokenize3); } reset() { this.eof = false; this.tokenIndex = -1; this.tokenType = 0; this.tokenStart = this.firstCharOffset; this.tokenEnd = this.firstCharOffset; } setSource(source = "", tokenize3 = () => { }) { source = String(source || ""); const sourceLength = source.length; const offsetAndType = adoptBuffer(this.offsetAndType, source.length + 1); const balance = adoptBuffer(this.balance, source.length + 1); let tokenCount = 0; let balanceCloseType = 0; let balanceStart = 0; let firstCharOffset = -1; this.offsetAndType = null; this.balance = null; tokenize3(source, (type, start, end) => { switch (type) { default: balance[tokenCount] = sourceLength; break; case balanceCloseType: { let balancePrev = balanceStart & OFFSET_MASK; balanceStart = balance[balancePrev]; balanceCloseType = balanceStart >> TYPE_SHIFT; balance[tokenCount] = balancePrev; balance[balancePrev++] = tokenCount; for (; balancePrev < tokenCount; balancePrev++) { if (balance[balancePrev] === sourceLength) { balance[balancePrev] = tokenCount; } } break; } case LeftParenthesis: case Function: case LeftSquareBracket: case LeftCurlyBracket: balance[tokenCount] = balanceStart; balanceCloseType = balancePair.get(type); balanceStart = balanceCloseType << TYPE_SHIFT | tokenCount; break; } offsetAndType[tokenCount++] = type << TYPE_SHIFT | end; if (firstCharOffset === -1) { firstCharOffset = start; } }); offsetAndType[tokenCount] = EOF << TYPE_SHIFT | sourceLength; balance[tokenCount] = sourceLength; balance[sourceLength] = sourceLength; while (balanceStart !== 0) { const balancePrev = balanceStart & OFFSET_MASK; balanceStart = balance[balancePrev]; balance[balancePrev] = sourceLength; } this.source = source; this.firstCharOffset = firstCharOffset === -1 ? 0 : firstCharOffset; this.tokenCount = tokenCount; this.offsetAndType = offsetAndType; this.balance = balance; this.reset(); this.next(); } lookupType(offset) { offset += this.tokenIndex; if (offset < this.tokenCount) { return this.offsetAndType[offset] >> TYPE_SHIFT; } return EOF; } lookupOffset(offset) { offset += this.tokenIndex; if (offset < this.tokenCount) { return this.offsetAndType[offset - 1] & OFFSET_MASK; } return this.source.length; } lookupValue(offset, referenceStr) { offset += this.tokenIndex; if (offset < this.tokenCount) { return cmpStr( this.source, this.offsetAndType[offset - 1] & OFFSET_MASK, this.offsetAndType[offset] & OFFSET_MASK, referenceStr ); } return false; } getTokenStart(tokenIndex) { if (tokenIndex === this.tokenIndex) { return this.tokenStart; } if (tokenIndex > 0) { return tokenIndex < this.tokenCount ? this.offsetAndType[tokenIndex - 1] & OFFSET_MASK : this.offsetAndType[this.tokenCount] & OFFSET_MASK; } return this.firstCharOffset; } substrToCursor(start) { return this.source.substring(start, this.tokenStart); } isBalanceEdge(pos) { return this.balance[this.tokenIndex] < pos; } isDelim(code2, offset) { if (offset) { return this.lookupType(offset) === Delim && this.source.charCodeAt(this.lookupOffset(offset)) === code2; } return this.tokenType === Delim && this.source.charCodeAt(this.tokenStart) === code2; } skip(tokenCount) { let next = this.tokenIndex + tokenCount; if (next < this.tokenCount) { this.tokenIndex = next; this.tokenStart = this.offsetAndType[next - 1] & OFFSET_MASK; next = this.offsetAndType[next]; this.tokenType = next >> TYPE_SHIFT; this.tokenEnd = next & OFFSET_MASK; } else { this.tokenIndex = this.tokenCount; this.next(); } } next() { let next = this.tokenIndex + 1; if (next < this.tokenCount) { this.tokenIndex = next; this.tokenStart = this.tokenEnd; next = this.offsetAndType[next]; this.tokenType = next >> TYPE_SHIFT; this.tokenEnd = next & OFFSET_MASK; } else { this.eof = true; this.tokenIndex = this.tokenCount; this.tokenType = EOF; this.tokenStart = this.tokenEnd = this.source.length; } } skipSC() { while (this.tokenType === WhiteSpace || this.tokenType === Comment) { this.next(); } } skipUntilBalanced(startToken, stopConsume) { let cursor = startToken; let balanceEnd; let offset; loop: for (; cursor < this.tokenCount; cursor++) { balanceEnd = this.balance[cursor]; if (balanceEnd < startToken) { break loop; } offset = cursor > 0 ? this.offsetAndType[cursor - 1] & OFFSET_MASK : this.firstCharOffset; switch (stopConsume(this.source.charCodeAt(offset))) { case 1: break loop; case 2: cursor++; break loop; default: if (this.balance[balanceEnd] === cursor) { cursor = balanceEnd; } } } this.skip(cursor - this.tokenIndex); } forEachToken(fn) { for (let i = 0, offset = this.firstCharOffset; i < this.tokenCount; i++) { const start = offset; const item = this.offsetAndType[i]; const end = item & OFFSET_MASK; const type = item >> TYPE_SHIFT; offset = end; fn(type, start, end, i); } } dump() { const tokens = new Array(this.tokenCount); this.forEachToken((type, start, end, index) => { tokens[index] = { idx: index, type: names_default[type], chunk: this.source.substring(start, end), balance: this.balance[index] }; }); return tokens; } }; // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/tokenizer/index.js function tokenize(source, onToken) { function getCharCode2(offset2) { return offset2 < sourceLength ? source.charCodeAt(offset2) : 0; } function consumeNumericToken() { offset = consumeNumber(source, offset); if (isIdentifierStart(getCharCode2(offset), getCharCode2(offset + 1), getCharCode2(offset + 2))) { type = Dimension; offset = consumeName(source, offset); return; } if (getCharCode2(offset) === 37) { type = Percentage; offset++; return; } type = Number2; } function consumeIdentLikeToken() { const nameStartOffset = offset; offset = consumeName(source, offset); if (cmpStr(source, nameStartOffset, offset, "url") && getCharCode2(offset) === 40) { offset = findWhiteSpaceEnd(source, offset + 1); if (getCharCode2(offset) === 34 || getCharCode2(offset) === 39) { type = Function; offset = nameStartOffset + 4; return; } consumeUrlToken(); return; } if (getCharCode2(offset) === 40) { type = Function; offset++; return; } type = Ident; } function consumeStringToken(endingCodePoint) { if (!endingCodePoint) { endingCodePoint = getCharCode2(offset++); } type = String2; for (; offset < source.length; offset++) { const code2 = source.charCodeAt(offset); switch (charCodeCategory(code2)) { case endingCodePoint: offset++; return; case WhiteSpaceCategory: if (isNewline(code2)) { offset += getNewlineLength(source, offset, code2); type = BadString; return; } break; case 92: if (offset === source.length - 1) { break; } const nextCode = getCharCode2(offset + 1); if (isNewline(nextCode)) { offset += getNewlineLength(source, offset + 1, nextCode); } else if (isValidEscape(code2, nextCode)) { offset = consumeEscaped(source, offset) - 1; } break; } } } function consumeUrlToken() { type = Url; offset = findWhiteSpaceEnd(source, offset); for (; offset < source.length; offset++) { const code2 = source.charCodeAt(offset); switch (charCodeCategory(code2)) { case 41: offset++; return; case WhiteSpaceCategory: offset = findWhiteSpaceEnd(source, offset); if (getCharCode2(offset) === 41 || offset >= source.length) { if (offset < source.length) { offset++; } return; } offset = consumeBadUrlRemnants(source, offset); type = BadUrl; return; case 34: case 39: case 40: case NonPrintableCategory: offset = consumeBadUrlRemnants(source, offset); type = BadUrl; return; case 92: if (isValidEscape(code2, getCharCode2(offset + 1))) { offset = consumeEscaped(source, offset) - 1; break; } offset = consumeBadUrlRemnants(source, offset); type = BadUrl; return; } } } source = String(source || ""); const sourceLength = source.length; let start = isBOM(getCharCode2(0)); let offset = start; let type; while (offset < sourceLength) { const code2 = source.charCodeAt(offset); switch (charCodeCategory(code2)) { case WhiteSpaceCategory: type = WhiteSpace; offset = findWhiteSpaceEnd(source, offset + 1); break; case 34: consumeStringToken(); break; case 35: if (isName(getCharCode2(offset + 1)) || isValidEscape(getCharCode2(offset + 1), getCharCode2(offset + 2))) { type = Hash; offset = consumeName(source, offset + 1); } else { type = Delim; offset++; } break; case 39: consumeStringToken(); break; case 40: type = LeftParenthesis; offset++; break; case 41: type = RightParenthesis; offset++; break; case 43: if (isNumberStart(code2, getCharCode2(offset + 1), getCharCode2(offset + 2))) { consumeNumericToken(); } else { type = Delim; offset++; } break; case 44: type = Comma; offset++; break; case 45: if (isNumberStart(code2, getCharCode2(offset + 1), getCharCode2(offset + 2))) { consumeNumericToken(); } else { if (getCharCode2(offset + 1) === 45 && getCharCode2(offset + 2) === 62) { type = CDC; offset = offset + 3; } else { if (isIdentifierStart(code2, getCharCode2(offset + 1), getCharCode2(offset + 2))) { consumeIdentLikeToken(); } else { type = Delim; offset++; } } } break; case 46: if (isNumberStart(code2, getCharCode2(offset + 1), getCharCode2(offset + 2))) { consumeNumericToken(); } else { type = Delim; offset++; } break; case 47: if (getCharCode2(offset + 1) === 42) { type = Comment; offset = source.indexOf("*/", offset + 2); offset = offset === -1 ? source.length : offset + 2; } else { type = Delim; offset++; } break; case 58: type = Colon; offset++; break; case 59: type = Semicolon; offset++; break; case 60: if (getCharCode2(offset + 1) === 33 && getCharCode2(offset + 2) === 45 && getCharCode2(offset + 3) === 45) { type = CDO; offset = offset + 4; } else { type = Delim; offset++; } break; case 64: if (isIdentifierStart(getCharCode2(offset + 1), getCharCode2(offset + 2), getCharCode2(offset + 3))) { type = AtKeyword; offset = consumeName(source, offset + 1); } else { type = Delim; offset++; } break; case 91: type = LeftSquareBracket; offset++; break; case 92: if (isValidEscape(code2, getCharCode2(offset + 1))) { consumeIdentLikeToken(); } else { type = Delim; offset++; } break; case 93: type = RightSquareBracket; offset++; break; case 123: type = LeftCurlyBracket; offset++; break; case 125: type = RightCurlyBracket; offset++; break; case DigitCategory: consumeNumericToken(); break; case NameStartCategory: consumeIdentLikeToken(); break; default: type = Delim; offset++; } onToken(type, start, start = offset); } } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/utils/List.js var releasedCursors = null; var List = class _List { static createItem(data) { return { prev: null, next: null, data }; } constructor() { this.head = null; this.tail = null; this.cursor = null; } createItem(data) { return _List.createItem(data); } // cursor helpers allocateCursor(prev, next) { let cursor; if (releasedCursors !== null) { cursor = releasedCursors; releasedCursors = releasedCursors.cursor; cursor.prev = prev; cursor.next = next; cursor.cursor = this.cursor; } else { cursor = { prev, next, cursor: this.cursor }; } this.cursor = cursor; return cursor; } releaseCursor() { const { cursor } = this; this.cursor = cursor.cursor; cursor.prev = null; cursor.next = null; cursor.cursor = releasedCursors; releasedCursors = cursor; } updateCursors(prevOld, prevNew, nextOld, nextNew) { let { cursor } = this; while (cursor !== null) { if (cursor.prev === prevOld) { cursor.prev = prevNew; } if (cursor.next === nextOld) { cursor.next = nextNew; } cursor = cursor.cursor; } } *[Symbol.iterator]() { for (let cursor = this.head; cursor !== null; cursor = cursor.next) { yield cursor.data; } } // getters get size() { let size = 0; for (let cursor = this.head; cursor !== null; cursor = cursor.next) { size++; } return size; } get isEmpty() { return this.head === null; } get first() { return this.head && this.head.data; } get last() { return this.tail && this.tail.data; } // convertors fromArray(array) { let cursor = null; this.head = null; for (let data of array) { const item = _List.createItem(data); if (cursor !== null) { cursor.next = item; } else { this.head = item; } item.prev = cursor; cursor = item; } this.tail = cursor; return this; } toArray() { return [...this]; } toJSON() { return [...this]; } // array-like methods forEach(fn, thisArg = this) { const cursor = this.allocateCursor(null, this.head); while (cursor.next !== null) { const item = cursor.next; cursor.next = item.next; fn.call(thisArg, item.data, item, this); } this.releaseCursor(); } forEachRight(fn, thisArg = this) { const cursor = this.allocateCursor(this.tail, null); while (cursor.prev !== null) { const item = cursor.prev; cursor.prev = item.prev; fn.call(thisArg, item.data, item, this); } this.releaseCursor(); } reduce(fn, initialValue, thisArg = this) { let cursor = this.allocateCursor(null, this.head); let acc = initialValue; let item; while (cursor.next !== null) { item = cursor.next; cursor.next = item.next; acc = fn.call(thisArg, acc, item.data, item, this); } this.releaseCursor(); return acc; } reduceRight(fn, initialValue, thisArg = this) { let cursor = this.allocateCursor(this.tail, null); let acc = initialValue; let item; while (cursor.prev !== null) { item = cursor.prev; cursor.prev = item.prev; acc = fn.call(thisArg, acc, item.data, item, this); } this.releaseCursor(); return acc; } some(fn, thisArg = this) { for (let cursor = this.head; cursor !== null; cursor = cursor.next) { if (fn.call(thisArg, cursor.data, cursor, this)) { return true; } } return false; } map(fn, thisArg = this) { const result = new _List(); for (let cursor = this.head; cursor !== null; cursor = cursor.next) { result.appendData(fn.call(thisArg, cursor.data, cursor, this)); } return result; } filter(fn, thisArg = this) { const result = new _List(); for (let cursor = this.head; cursor !== null; cursor = cursor.next) { if (fn.call(thisArg, cursor.data, cursor, this)) { result.appendData(cursor.data); } } return result; } nextUntil(start, fn, thisArg = this) { if (start === null) { return; } const cursor = this.allocateCursor(null, start); while (cursor.next !== null) { const item = cursor.next; cursor.next = item.next; if (fn.call(thisArg, item.data, item, this)) { break; } } this.releaseCursor(); } prevUntil(start, fn, thisArg = this) { if (start === null) { return; } const cursor = this.allocateCursor(start, null); while (cursor.prev !== null) { const item = cursor.prev; cursor.prev = item.prev; if (fn.call(thisArg, item.data, item, this)) { break; } } this.releaseCursor(); } // mutation clear() { this.head = null; this.tail = null; } copy() { const result = new _List(); for (let data of this) { result.appendData(data); } return result; } prepend(item) { this.updateCursors(null, item, this.head, item); if (this.head !== null) { this.head.prev = item; item.next = this.head; } else { this.tail = item; } this.head = item; return this; } prependData(data) { return this.prepend(_List.createItem(data)); } append(item) { return this.insert(item); } appendData(data) { return this.insert(_List.createItem(data)); } insert(item, before = null) { if (before !== null) { this.updateCursors(before.prev, item, before, item); if (before.prev === null) { if (this.head !== before) { throw new Error("before doesn't belong to list"); } this.head = item; before.prev = item; item.next = before; this.updateCursors(null, item); } else { before.prev.next = item; item.prev = before.prev; before.prev = item; item.next = before; } } else { this.updateCursors(this.tail, item, null, item); if (this.tail !== null) { this.tail.next = item; item.prev = this.tail; } else { this.head = item; } this.tail = item; } return this; } insertData(data, before) { return this.insert(_List.createItem(data), before); } remove(item) { this.updateCursors(item, item.prev, item, item.next); if (item.prev !== null) { item.prev.next = item.next; } else { if (this.head !== item) { throw new Error("item doesn't belong to list"); } this.head = item.next; } if (item.next !== null) { item.next.prev = item.prev; } else { if (this.tail !== item) { throw new Error("item doesn't belong to list"); } this.tail = item.prev; } item.prev = null; item.next = null; return item; } push(data) { this.insert(_List.createItem(data)); } pop() { return this.tail !== null ? this.remove(this.tail) : null; } unshift(data) { this.prepend(_List.createItem(data)); } shift() { return this.head !== null ? this.remove(this.head) : null; } prependList(list) { return this.insertList(list, this.head); } appendList(list) { return this.insertList(list); } insertList(list, before) { if (list.head === null) { return this; } if (before !== void 0 && before !== null) { this.updateCursors(before.prev, list.tail, before, list.head); if (before.prev !== null) { before.prev.next = list.head; list.head.prev = before.prev; } else { this.head = list.head; } before.prev = list.tail; list.tail.next = before; } else { this.updateCursors(this.tail, list.tail, null, list.head); if (this.tail !== null) { this.tail.next = list.head; list.head.prev = this.tail; } else { this.head = list.head; } this.tail = list.tail; } list.head = null; list.tail = null; return this; } replace(oldItem, newItemOrList) { if ("head" in newItemOrList) { this.insertList(newItemOrList, oldItem); } else { this.insert(newItemOrList, oldItem); } this.remove(oldItem); } }; // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/utils/create-custom-error.js function createCustomError(name42, message) { const error = Object.create(SyntaxError.prototype); const errorStack = new Error(); return Object.assign(error, { name: name42, message, get stack() { return (errorStack.stack || "").replace(/^(.+\n){1,3}/, `${name42}: ${message} `); } }); } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/parser/SyntaxError.js var MAX_LINE_LENGTH = 100; var OFFSET_CORRECTION = 60; var TAB_REPLACEMENT = " "; function sourceFragment({ source, line, column }, extraLines) { function processLines(start, end) { return lines.slice(start, end).map( (line2, idx) => String(start + idx + 1).padStart(maxNumLength) + " |" + line2 ).join("\n"); } const lines = source.split(/\r\n?|\n|\f/); const startLine = Math.max(1, line - extraLines) - 1; const endLine = Math.min(line + extraLines, lines.length + 1); const maxNumLength = Math.max(4, String(endLine).length) + 1; let cutLeft = 0; column += (TAB_REPLACEMENT.length - 1) * (lines[line - 1].substr(0, column - 1).match(/\t/g) || []).length; if (column > MAX_LINE_LENGTH) { cutLeft = column - OFFSET_CORRECTION + 3; column = OFFSET_CORRECTION - 2; } for (let i = startLine; i <= endLine; i++) { if (i >= 0 && i < lines.length) { lines[i] = lines[i].replace(/\t/g, TAB_REPLACEMENT); lines[i] = (cutLeft > 0 && lines[i].length > cutLeft ? "…" : "") + lines[i].substr(cutLeft, MAX_LINE_LENGTH - 2) + (lines[i].length > cutLeft + MAX_LINE_LENGTH - 1 ? "…" : ""); } } return [ processLines(startLine, line), new Array(column + maxNumLength + 2).join("-") + "^", processLines(line, endLine) ].filter(Boolean).join("\n"); } function SyntaxError2(message, source, offset, line, column) { const error = Object.assign(createCustomError("SyntaxError", message), { source, offset, line, column, sourceFragment(extraLines) { return sourceFragment({ source, line, column }, isNaN(extraLines) ? 0 : extraLines); }, get formattedMessage() { return `Parse error: ${message} ` + sourceFragment({ source, line, column }, 2); } }); return error; } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/parser/sequence.js function readSequence(recognizer) { const children = this.createList(); let space = false; const context = { recognizer }; while (!this.eof) { switch (this.tokenType) { case Comment: this.next(); continue; case WhiteSpace: space = true; this.next(); continue; } let child = recognizer.getNode.call(this, context); if (child === void 0) { break; } if (space) { if (recognizer.onWhiteSpace) { recognizer.onWhiteSpace.call(this, child, children, context); } space = false; } children.push(child); } if (space && recognizer.onWhiteSpace) { recognizer.onWhiteSpace.call(this, null, children, context); } return children; } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/parser/create.js var NOOP = () => { }; var EXCLAMATIONMARK = 33; var NUMBERSIGN = 35; var SEMICOLON = 59; var LEFTCURLYBRACKET = 123; var NULL = 0; function createParseContext(name42) { return function() { return this[name42](); }; } function fetchParseValues(dict) { const result = /* @__PURE__ */ Object.create(null); for (const name42 in dict) { const item = dict[name42]; const fn = item.parse || item; if (fn) { result[name42] = fn; } } return result; } function processConfig(config) { const parseConfig = { context: /* @__PURE__ */ Object.create(null), scope: Object.assign(/* @__PURE__ */ Object.create(null), config.scope), atrule: fetchParseValues(config.atrule), pseudo: fetchParseValues(config.pseudo), node: fetchParseValues(config.node) }; for (const name42 in config.parseContext) { switch (typeof config.parseContext[name42]) { case "function": parseConfig.context[name42] = config.parseContext[name42]; break; case "string": parseConfig.context[name42] = createParseContext(config.parseContext[name42]); break; } } return { config: parseConfig, ...parseConfig, ...parseConfig.node }; } function createParser(config) { let source = ""; let filename = ""; let needPositions = false; let onParseError = NOOP; let onParseErrorThrow = false; const locationMap = new OffsetToLocation(); const parser = Object.assign(new TokenStream(), processConfig(config || {}), { parseAtrulePrelude: true, parseRulePrelude: true, parseValue: true, parseCustomProperty: false, readSequence, consumeUntilBalanceEnd: () => 0, consumeUntilLeftCurlyBracket(code2) { return code2 === LEFTCURLYBRACKET ? 1 : 0; }, consumeUntilLeftCurlyBracketOrSemicolon(code2) { return code2 === LEFTCURLYBRACKET || code2 === SEMICOLON ? 1 : 0; }, consumeUntilExclamationMarkOrSemicolon(code2) { return code2 === EXCLAMATIONMARK || code2 === SEMICOLON ? 1 : 0; }, consumeUntilSemicolonIncluded(code2) { return code2 === SEMICOLON ? 2 : 0; }, createList() { return new List(); }, createSingleNodeList(node) { return new List().appendData(node); }, getFirstListNode(list) { return list && list.first; }, getLastListNode(list) { return list && list.last; }, parseWithFallback(consumer, fallback) { const startToken = this.tokenIndex; try { return consumer.call(this); } catch (e2) { if (onParseErrorThrow) { throw e2; } const fallbackNode = fallback.call(this, startToken); onParseErrorThrow = true; onParseError(e2, fallbackNode); onParseErrorThrow = false; return fallbackNode; } }, lookupNonWSType(offset) { let type; do { type = this.lookupType(offset++); if (type !== WhiteSpace) { return type; } } while (type !== NULL); return NULL; }, charCodeAt(offset) { return offset >= 0 && offset < source.length ? source.charCodeAt(offset) : 0; }, substring(offsetStart, offsetEnd) { return source.substring(offsetStart, offsetEnd); }, substrToCursor(start) { return this.source.substring(start, this.tokenStart); }, cmpChar(offset, charCode) { return cmpChar(source, offset, charCode); }, cmpStr(offsetStart, offsetEnd, str) { return cmpStr(source, offsetStart, offsetEnd, str); }, consume(tokenType2) { const start = this.tokenStart; this.eat(tokenType2); return this.substrToCursor(start); }, consumeFunctionName() { const name42 = source.substring(this.tokenStart, this.tokenEnd - 1); this.eat(Function); return name42; }, consumeNumber(type) { const number3 = source.substring(this.tokenStart, consumeNumber(source, this.tokenStart)); this.eat(type); return number3; }, eat(tokenType2) { if (this.tokenType !== tokenType2) { const tokenName = names_default[tokenType2].slice(0, -6).replace(/-/g, " ").replace(/^./, (m) => m.toUpperCase()); let message = `${/[[\](){}]/.test(tokenName) ? `"${tokenName}"` : tokenName} is expected`; let offset = this.tokenStart; switch (tokenType2) { case Ident: if (this.tokenType === Function || this.tokenType === Url) { offset = this.tokenEnd - 1; message = "Identifier is expected but function found"; } else { message = "Identifier is expected"; } break; case Hash: if (this.isDelim(NUMBERSIGN)) { this.next(); offset++; message = "Name is expected"; } break; case Percentage: if (this.tokenType === Number2) { offset = this.tokenEnd; message = "Percent sign is expected"; } break; } this.error(message, offset); } this.next(); }, eatIdent(name42) { if (this.tokenType !== Ident || this.lookupValue(0, name42) === false) { this.error(`Identifier "${name42}" is expected`); } this.next(); }, eatDelim(code2) { if (!this.isDelim(code2)) { this.error(`Delim "${String.fromCharCode(code2)}" is expected`); } this.next(); }, getLocation(start, end) { if (needPositions) { return locationMap.getLocationRange( start, end, filename ); } return null; }, getLocationFromList(list) { if (needPositions) { const head = this.getFirstListNode(list); const tail = this.getLastListNode(list); return locationMap.getLocationRange( head !== null ? head.loc.start.offset - locationMap.startOffset : this.tokenStart, tail !== null ? tail.loc.end.offset - locationMap.startOffset : this.tokenStart, filename ); } return null; }, error(message, offset) { const location = typeof offset !== "undefined" && offset < source.length ? locationMap.getLocation(offset) : this.eof ? locationMap.getLocation(findWhiteSpaceStart(source, source.length - 1)) : locationMap.getLocation(this.tokenStart); throw new SyntaxError2( message || "Unexpected input", source, location.offset, location.line, location.column ); } }); const parse44 = function(source_, options) { source = source_; options = options || {}; parser.setSource(source, tokenize); locationMap.setSource( source, options.offset, options.line, options.column ); filename = options.filename || ""; needPositions = Boolean(options.positions); onParseError = typeof options.onParseError === "function" ? options.onParseError : NOOP; onParseErrorThrow = false; parser.parseAtrulePrelude = "parseAtrulePrelude" in options ? Boolean(options.parseAtrulePrelude) : true; parser.parseRulePrelude = "parseRulePrelude" in options ? Boolean(options.parseRulePrelude) : true; parser.parseValue = "parseValue" in options ? Boolean(options.parseValue) : true; parser.parseCustomProperty = "parseCustomProperty" in options ? Boolean(options.parseCustomProperty) : false; const { context = "default", onComment } = options; if (context in parser.context === false) { throw new Error("Unknown context `" + context + "`"); } if (typeof onComment === "function") { parser.forEachToken((type, start, end) => { if (type === Comment) { const loc = parser.getLocation(start, end); const value = cmpStr(source, end - 2, end, "*/") ? source.slice(start + 2, end - 2) : source.slice(start + 2, end); onComment(value, loc); } }); } const ast = parser.context[context].call(parser, options); if (!parser.eof) { parser.error(); } return ast; }; return Object.assign(parse44, { SyntaxError: SyntaxError2, config: parser.config }); } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/generator/sourceMap.js var import_source_map_generator = __toESM(require_source_map_generator(), 1); var trackNodes = /* @__PURE__ */ new Set(["Atrule", "Selector", "Declaration"]); function generateSourceMap(handlers) { const map = new import_source_map_generator.SourceMapGenerator(); const generated = { line: 1, column: 0 }; const original = { line: 0, // should be zero to add first mapping column: 0 }; const activatedGenerated = { line: 1, column: 0 }; const activatedMapping = { generated: activatedGenerated }; let line = 1; let column = 0; let sourceMappingActive = false; const origHandlersNode = handlers.node; handlers.node = function(node) { if (node.loc && node.loc.start && trackNodes.has(node.type)) { const nodeLine = node.loc.start.line; const nodeColumn = node.loc.start.column - 1; if (original.line !== nodeLine || original.column !== nodeColumn) { original.line = nodeLine; original.column = nodeColumn; generated.line = line; generated.column = column; if (sourceMappingActive) { sourceMappingActive = false; if (generated.line !== activatedGenerated.line || generated.column !== activatedGenerated.column) { map.addMapping(activatedMapping); } } sourceMappingActive = true; map.addMapping({ source: node.loc.source, original, generated }); } } origHandlersNode.call(this, node); if (sourceMappingActive && trackNodes.has(node.type)) { activatedGenerated.line = line; activatedGenerated.column = column; } }; const origHandlersEmit = handlers.emit; handlers.emit = function(value, type, auto2) { for (let i = 0; i < value.length; i++) { if (value.charCodeAt(i) === 10) { line++; column = 0; } else { column++; } } origHandlersEmit(value, type, auto2); }; const origHandlersResult = handlers.result; handlers.result = function() { if (sourceMappingActive) { map.addMapping(activatedMapping); } return { css: origHandlersResult(), map }; }; return handlers; } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/generator/token-before.js var token_before_exports = {}; __export(token_before_exports, { safe: () => safe, spec: () => spec }); var PLUSSIGN = 43; var HYPHENMINUS = 45; var code = (type, value) => { if (type === Delim) { type = value; } if (typeof type === "string") { const charCode = type.charCodeAt(0); return charCode > 127 ? 32768 : charCode << 8; } return type; }; var specPairs = [ [Ident, Ident], [Ident, Function], [Ident, Url], [Ident, BadUrl], [Ident, "-"], [Ident, Number2], [Ident, Percentage], [Ident, Dimension], [Ident, CDC], [Ident, LeftParenthesis], [AtKeyword, Ident], [AtKeyword, Function], [AtKeyword, Url], [AtKeyword, BadUrl], [AtKeyword, "-"], [AtKeyword, Number2], [AtKeyword, Percentage], [AtKeyword, Dimension], [AtKeyword, CDC], [Hash, Ident], [Hash, Function], [Hash, Url], [Hash, BadUrl], [Hash, "-"], [Hash, Number2], [Hash, Percentage], [Hash, Dimension], [Hash, CDC], [Dimension, Ident], [Dimension, Function], [Dimension, Url], [Dimension, BadUrl], [Dimension, "-"], [Dimension, Number2], [Dimension, Percentage], [Dimension, Dimension], [Dimension, CDC], ["#", Ident], ["#", Function], ["#", Url], ["#", BadUrl], ["#", "-"], ["#", Number2], ["#", Percentage], ["#", Dimension], ["#", CDC], // https://github.com/w3c/csswg-drafts/pull/6874 ["-", Ident], ["-", Function], ["-", Url], ["-", BadUrl], ["-", "-"], ["-", Number2], ["-", Percentage], ["-", Dimension], ["-", CDC], // https://github.com/w3c/csswg-drafts/pull/6874 [Number2, Ident], [Number2, Function], [Number2, Url], [Number2, BadUrl], [Number2, Number2], [Number2, Percentage], [Number2, Dimension], [Number2, "%"], [Number2, CDC], // https://github.com/w3c/csswg-drafts/pull/6874 ["@", Ident], ["@", Function], ["@", Url], ["@", BadUrl], ["@", "-"], ["@", CDC], // https://github.com/w3c/csswg-drafts/pull/6874 [".", Number2], [".", Percentage], [".", Dimension], ["+", Number2], ["+", Percentage], ["+", Dimension], ["/", "*"] ]; var safePairs = specPairs.concat([ [Ident, Hash], [Dimension, Hash], [Hash, Hash], [AtKeyword, LeftParenthesis], [AtKeyword, String2], [AtKeyword, Colon], [Percentage, Percentage], [Percentage, Dimension], [Percentage, Function], [Percentage, "-"], [RightParenthesis, Ident], [RightParenthesis, Function], [RightParenthesis, Percentage], [RightParenthesis, Dimension], [RightParenthesis, Hash], [RightParenthesis, "-"] ]); function createMap(pairs) { const isWhiteSpaceRequired = new Set( pairs.map(([prev, next]) => code(prev) << 16 | code(next)) ); return function(prevCode, type, value) { const nextCode = code(type, value); const nextCharCode = value.charCodeAt(0); const emitWs = nextCharCode === HYPHENMINUS && type !== Ident && type !== Function && type !== CDC || nextCharCode === PLUSSIGN ? isWhiteSpaceRequired.has(prevCode << 16 | nextCharCode << 8) : isWhiteSpaceRequired.has(prevCode << 16 | nextCode); if (emitWs) { this.emit(" ", WhiteSpace, true); } return nextCode; }; } var spec = createMap(specPairs); var safe = createMap(safePairs); // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/generator/create.js var REVERSESOLIDUS = 92; function processChildren(node, delimeter) { if (typeof delimeter === "function") { let prev = null; node.children.forEach((node2) => { if (prev !== null) { delimeter.call(this, prev); } this.node(node2); prev = node2; }); return; } node.children.forEach(this.node, this); } function processChunk(chunk) { tokenize(chunk, (type, start, end) => { this.token(type, chunk.slice(start, end)); }); } function createGenerator2(config) { const types = /* @__PURE__ */ new Map(); for (let name42 in config.node) { const item = config.node[name42]; const fn = item.generate || item; if (typeof fn === "function") { types.set(name42, item.generate || item); } } return function(node, options) { let buffer = ""; let prevCode = 0; let handlers = { node(node2) { if (types.has(node2.type)) { types.get(node2.type).call(publicApi, node2); } else { throw new Error("Unknown node type: " + node2.type); } }, tokenBefore: safe, token(type, value) { prevCode = this.tokenBefore(prevCode, type, value); this.emit(value, type, false); if (type === Delim && value.charCodeAt(0) === REVERSESOLIDUS) { this.emit("\n", WhiteSpace, true); } }, emit(value) { buffer += value; }, result() { return buffer; } }; if (options) { if (typeof options.decorator === "function") { handlers = options.decorator(handlers); } if (options.sourceMap) { handlers = generateSourceMap(handlers); } if (options.mode in token_before_exports) { handlers.tokenBefore = token_before_exports[options.mode]; } } const publicApi = { node: (node2) => handlers.node(node2), children: processChildren, token: (type, value) => handlers.token(type, value), tokenize: processChunk }; handlers.node(node); return handlers.result(); }; } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/convertor/create.js function createConvertor(walk3) { return { fromPlainObject(ast) { walk3(ast, { enter(node) { if (node.children && node.children instanceof List === false) { node.children = new List().fromArray(node.children); } } }); return ast; }, toPlainObject(ast) { walk3(ast, { leave(node) { if (node.children && node.children instanceof List) { node.children = node.children.toArray(); } } }); return ast; } }; } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/walker/create.js var { hasOwnProperty: hasOwnProperty2 } = Object.prototype; var noop2 = function() { }; function ensureFunction(value) { return typeof value === "function" ? value : noop2; } function invokeForType(fn, type) { return function(node, item, list) { if (node.type === type) { fn.call(this, node, item, list); } }; } function getWalkersFromStructure(name42, nodeType) { const structure42 = nodeType.structure; const walkers = []; for (const key in structure42) { if (hasOwnProperty2.call(structure42, key) === false) { continue; } let fieldTypes = structure42[key]; const walker = { name: key, type: false, nullable: false }; if (!Array.isArray(fieldTypes)) { fieldTypes = [fieldTypes]; } for (const fieldType of fieldTypes) { if (fieldType === null) { walker.nullable = true; } else if (typeof fieldType === "string") { walker.type = "node"; } else if (Array.isArray(fieldType)) { walker.type = "list"; } } if (walker.type) { walkers.push(walker); } } if (walkers.length) { return { context: nodeType.walkContext, fields: walkers }; } return null; } function getTypesFromConfig(config) { const types = {}; for (const name42 in config.node) { if (hasOwnProperty2.call(config.node, name42)) { const nodeType = config.node[name42]; if (!nodeType.structure) { throw new Error("Missed `structure` field in `" + name42 + "` node type definition"); } types[name42] = getWalkersFromStructure(name42, nodeType); } } return types; } function createTypeIterator(config, reverse) { const fields = config.fields.slice(); const contextName = config.context; const useContext = typeof contextName === "string"; if (reverse) { fields.reverse(); } return function(node, context, walk3, walkReducer) { let prevContextValue; if (useContext) { prevContextValue = context[contextName]; context[contextName] = node; } for (const field of fields) { const ref = node[field.name]; if (!field.nullable || ref) { if (field.type === "list") { const breakWalk = reverse ? ref.reduceRight(walkReducer, false) : ref.reduce(walkReducer, false); if (breakWalk) { return true; } } else if (walk3(ref)) { return true; } } } if (useContext) { context[contextName] = prevContextValue; } }; } function createFastTraveralMap({ StyleSheet, Atrule, Rule, Block, DeclarationList }) { return { Atrule: { StyleSheet, Atrule, Rule, Block }, Rule: { StyleSheet, Atrule, Rule, Block }, Declaration: { StyleSheet, Atrule, Rule, Block, DeclarationList } }; } function createWalker(config) { const types = getTypesFromConfig(config); const iteratorsNatural = {}; const iteratorsReverse = {}; const breakWalk = Symbol("break-walk"); const skipNode = Symbol("skip-node"); for (const name42 in types) { if (hasOwnProperty2.call(types, name42) && types[name42] !== null) { iteratorsNatural[name42] = createTypeIterator(types[name42], false); iteratorsReverse[name42] = createTypeIterator(types[name42], true); } } const fastTraversalIteratorsNatural = createFastTraveralMap(iteratorsNatural); const fastTraversalIteratorsReverse = createFastTraveralMap(iteratorsReverse); const walk3 = function(root, options) { function walkNode(node, item, list) { const enterRet = enter.call(context, node, item, list); if (enterRet === breakWalk) { return true; } if (enterRet === skipNode) { return false; } if (iterators.hasOwnProperty(node.type)) { if (iterators[node.type](node, context, walkNode, walkReducer)) { return true; } } if (leave.call(context, node, item, list) === breakWalk) { return true; } return false; } let enter = noop2; let leave = noop2; let iterators = iteratorsNatural; let walkReducer = (ret, data, item, list) => ret || walkNode(data, item, list); const context = { break: breakWalk, skip: skipNode, root, stylesheet: null, atrule: null, atrulePrelude: null, rule: null, selector: null, block: null, declaration: null, function: null }; if (typeof options === "function") { enter = options; } else if (options) { enter = ensureFunction(options.enter); leave = ensureFunction(options.leave); if (options.reverse) { iterators = iteratorsReverse; } if (options.visit) { if (fastTraversalIteratorsNatural.hasOwnProperty(options.visit)) { iterators = options.reverse ? fastTraversalIteratorsReverse[options.visit] : fastTraversalIteratorsNatural[options.visit]; } else if (!types.hasOwnProperty(options.visit)) { throw new Error("Bad value `" + options.visit + "` for `visit` option (should be: " + Object.keys(types).sort().join(", ") + ")"); } enter = invokeForType(enter, options.visit); leave = invokeForType(leave, options.visit); } } if (enter === noop2 && leave === noop2) { throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function"); } walkNode(root); }; walk3.break = breakWalk; walk3.skip = skipNode; walk3.find = function(ast, fn) { let found = null; walk3(ast, function(node, item, list) { if (fn.call(this, node, item, list)) { found = node; return breakWalk; } }); return found; }; walk3.findLast = function(ast, fn) { let found = null; walk3(ast, { reverse: true, enter(node, item, list) { if (fn.call(this, node, item, list)) { found = node; return breakWalk; } } }); return found; }; walk3.findAll = function(ast, fn) { const found = []; walk3(ast, function(node, item, list) { if (fn.call(this, node, item, list)) { found.push(node); } }); return found; }; return walk3; } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/definition-syntax/generate.js function noop3(value) { return value; } function generateMultiplier(multiplier) { const { min, max, comma } = multiplier; if (min === 0 && max === 0) { return comma ? "#?" : "*"; } if (min === 0 && max === 1) { return "?"; } if (min === 1 && max === 0) { return comma ? "#" : "+"; } if (min === 1 && max === 1) { return ""; } return (comma ? "#" : "") + (min === max ? "{" + min + "}" : "{" + min + "," + (max !== 0 ? max : "") + "}"); } function generateTypeOpts(node) { switch (node.type) { case "Range": return " [" + (node.min === null ? "-∞" : node.min) + "," + (node.max === null ? "∞" : node.max) + "]"; default: throw new Error("Unknown node type `" + node.type + "`"); } } function generateSequence(node, decorate, forceBraces, compact) { const combinator = node.combinator === " " || compact ? node.combinator : " " + node.combinator + " "; const result = node.terms.map((term) => internalGenerate(term, decorate, forceBraces, compact)).join(combinator); if (node.explicit || forceBraces) { return (compact || result[0] === "," ? "[" : "[ ") + result + (compact ? "]" : " ]"); } return result; } function internalGenerate(node, decorate, forceBraces, compact) { let result; switch (node.type) { case "Group": result = generateSequence(node, decorate, forceBraces, compact) + (node.disallowEmpty ? "!" : ""); break; case "Multiplier": return internalGenerate(node.term, decorate, forceBraces, compact) + decorate(generateMultiplier(node), node); case "Type": result = "<" + node.name + (node.opts ? decorate(generateTypeOpts(node.opts), node.opts) : "") + ">"; break; case "Property": result = "<'" + node.name + "'>"; break; case "Keyword": result = node.name; break; case "AtKeyword": result = "@" + node.name; break; case "Function": result = node.name + "("; break; case "String": case "Token": result = node.value; break; case "Comma": result = ","; break; default: throw new Error("Unknown node type `" + node.type + "`"); } return decorate(result, node); } function generate(node, options) { let decorate = noop3; let forceBraces = false; let compact = false; if (typeof options === "function") { decorate = options; } else if (options) { forceBraces = Boolean(options.forceBraces); compact = Boolean(options.compact); if (typeof options.decorate === "function") { decorate = options.decorate; } } return internalGenerate(node, decorate, forceBraces, compact); } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/lexer/error.js var defaultLoc = { offset: 0, line: 1, column: 1 }; function locateMismatch(matchResult, node) { const tokens = matchResult.tokens; const longestMatch = matchResult.longestMatch; const mismatchNode = longestMatch < tokens.length ? tokens[longestMatch].node || null : null; const badNode = mismatchNode !== node ? mismatchNode : null; let mismatchOffset = 0; let mismatchLength = 0; let entries = 0; let css = ""; let start; let end; for (let i = 0; i < tokens.length; i++) { const token = tokens[i].value; if (i === longestMatch) { mismatchLength = token.length; mismatchOffset = css.length; } if (badNode !== null && tokens[i].node === badNode) { if (i <= longestMatch) { entries++; } else { entries = 0; } } css += token; } if (longestMatch === tokens.length || entries > 1) { start = fromLoc(badNode || node, "end") || buildLoc(defaultLoc, css); end = buildLoc(start); } else { start = fromLoc(badNode, "start") || buildLoc(fromLoc(node, "start") || defaultLoc, css.slice(0, mismatchOffset)); end = fromLoc(badNode, "end") || buildLoc(start, css.substr(mismatchOffset, mismatchLength)); } return { css, mismatchOffset, mismatchLength, start, end }; } function fromLoc(node, point) { const value = node && node.loc && node.loc[point]; if (value) { return "line" in value ? buildLoc(value) : value; } return null; } function buildLoc({ offset, line, column }, extra) { const loc = { offset, line, column }; if (extra) { const lines = extra.split(/\n|\r\n?|\f/); loc.offset += extra.length; loc.line += lines.length - 1; loc.column = lines.length === 1 ? loc.column + extra.length : lines.pop().length + 1; } return loc; } var SyntaxReferenceError = function(type, referenceName) { const error = createCustomError( "SyntaxReferenceError", type + (referenceName ? " `" + referenceName + "`" : "") ); error.reference = referenceName; return error; }; var SyntaxMatchError = function(message, syntax, node, matchResult) { const error = createCustomError("SyntaxMatchError", message); const { css, mismatchOffset, mismatchLength, start, end } = locateMismatch(matchResult, node); error.rawMessage = message; error.syntax = syntax ? generate(syntax) : ""; error.css = css; error.mismatchOffset = mismatchOffset; error.mismatchLength = mismatchLength; error.message = message + "\n syntax: " + error.syntax + "\n value: " + (css || "") + "\n --------" + new Array(error.mismatchOffset + 1).join("-") + "^"; Object.assign(error, start); error.loc = { source: node && node.loc && node.loc.source || "", start, end }; return error; }; // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/utils/names.js var keywords = /* @__PURE__ */ new Map(); var properties2 = /* @__PURE__ */ new Map(); var HYPHENMINUS2 = 45; var keyword = getKeywordDescriptor; var property = getPropertyDescriptor; function isCustomProperty(str, offset) { offset = offset || 0; return str.length - offset >= 2 && str.charCodeAt(offset) === HYPHENMINUS2 && str.charCodeAt(offset + 1) === HYPHENMINUS2; } function getVendorPrefix(str, offset) { offset = offset || 0; if (str.length - offset >= 3) { if (str.charCodeAt(offset) === HYPHENMINUS2 && str.charCodeAt(offset + 1) !== HYPHENMINUS2) { const secondDashIndex = str.indexOf("-", offset + 2); if (secondDashIndex !== -1) { return str.substring(offset, secondDashIndex + 1); } } } return ""; } function getKeywordDescriptor(keyword2) { if (keywords.has(keyword2)) { return keywords.get(keyword2); } const name42 = keyword2.toLowerCase(); let descriptor = keywords.get(name42); if (descriptor === void 0) { const custom = isCustomProperty(name42, 0); const vendor = !custom ? getVendorPrefix(name42, 0) : ""; descriptor = Object.freeze({ basename: name42.substr(vendor.length), name: name42, prefix: vendor, vendor, custom }); } keywords.set(keyword2, descriptor); return descriptor; } function getPropertyDescriptor(property2) { if (properties2.has(property2)) { return properties2.get(property2); } let name42 = property2; let hack = property2[0]; if (hack === "/") { hack = property2[1] === "/" ? "//" : "/"; } else if (hack !== "_" && hack !== "*" && hack !== "$" && hack !== "#" && hack !== "+" && hack !== "&") { hack = ""; } const custom = isCustomProperty(name42, hack.length); if (!custom) { name42 = name42.toLowerCase(); if (properties2.has(name42)) { const descriptor2 = properties2.get(name42); properties2.set(property2, descriptor2); return descriptor2; } } const vendor = !custom ? getVendorPrefix(name42, hack.length) : ""; const prefix = name42.substr(0, hack.length + vendor.length); const descriptor = Object.freeze({ basename: name42.substr(prefix.length), name: name42.substr(hack.length), hack, vendor, prefix, custom }); properties2.set(property2, descriptor); return descriptor; } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/lexer/generic-const.js var cssWideKeywords = [ "initial", "inherit", "unset", "revert", "revert-layer" ]; // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/lexer/generic-an-plus-b.js var PLUSSIGN2 = 43; var HYPHENMINUS3 = 45; var N2 = 110; var DISALLOW_SIGN = true; var ALLOW_SIGN = false; function isDelim(token, code2) { return token !== null && token.type === Delim && token.value.charCodeAt(0) === code2; } function skipSC(token, offset, getNextToken) { while (token !== null && (token.type === WhiteSpace || token.type === Comment)) { token = getNextToken(++offset); } return offset; } function checkInteger(token, valueOffset, disallowSign, offset) { if (!token) { return 0; } const code2 = token.value.charCodeAt(valueOffset); if (code2 === PLUSSIGN2 || code2 === HYPHENMINUS3) { if (disallowSign) { return 0; } valueOffset++; } for (; valueOffset < token.value.length; valueOffset++) { if (!isDigit(token.value.charCodeAt(valueOffset))) { return 0; } } return offset + 1; } function consumeB(token, offset_, getNextToken) { let sign = false; let offset = skipSC(token, offset_, getNextToken); token = getNextToken(offset); if (token === null) { return offset_; } if (token.type !== Number2) { if (isDelim(token, PLUSSIGN2) || isDelim(token, HYPHENMINUS3)) { sign = true; offset = skipSC(getNextToken(++offset), offset, getNextToken); token = getNextToken(offset); if (token === null || token.type !== Number2) { return 0; } } else { return offset_; } } if (!sign) { const code2 = token.value.charCodeAt(0); if (code2 !== PLUSSIGN2 && code2 !== HYPHENMINUS3) { return 0; } } return checkInteger(token, sign ? 0 : 1, sign, offset); } function anPlusB(token, getNextToken) { let offset = 0; if (!token) { return 0; } if (token.type === Number2) { return checkInteger(token, 0, ALLOW_SIGN, offset); } else if (token.type === Ident && token.value.charCodeAt(0) === HYPHENMINUS3) { if (!cmpChar(token.value, 1, N2)) { return 0; } switch (token.value.length) { case 2: return consumeB(getNextToken(++offset), offset, getNextToken); case 3: if (token.value.charCodeAt(2) !== HYPHENMINUS3) { return 0; } offset = skipSC(getNextToken(++offset), offset, getNextToken); token = getNextToken(offset); return checkInteger(token, 0, DISALLOW_SIGN, offset); default: if (token.value.charCodeAt(2) !== HYPHENMINUS3) { return 0; } return checkInteger(token, 3, DISALLOW_SIGN, offset); } } else if (token.type === Ident || isDelim(token, PLUSSIGN2) && getNextToken(offset + 1).type === Ident) { if (token.type !== Ident) { token = getNextToken(++offset); } if (token === null || !cmpChar(token.value, 0, N2)) { return 0; } switch (token.value.length) { case 1: return consumeB(getNextToken(++offset), offset, getNextToken); case 2: if (token.value.charCodeAt(1) !== HYPHENMINUS3) { return 0; } offset = skipSC(getNextToken(++offset), offset, getNextToken); token = getNextToken(offset); return checkInteger(token, 0, DISALLOW_SIGN, offset); default: if (token.value.charCodeAt(1) !== HYPHENMINUS3) { return 0; } return checkInteger(token, 2, DISALLOW_SIGN, offset); } } else if (token.type === Dimension) { let code2 = token.value.charCodeAt(0); let sign = code2 === PLUSSIGN2 || code2 === HYPHENMINUS3 ? 1 : 0; let i = sign; for (; i < token.value.length; i++) { if (!isDigit(token.value.charCodeAt(i))) { break; } } if (i === sign) { return 0; } if (!cmpChar(token.value, i, N2)) { return 0; } if (i + 1 === token.value.length) { return consumeB(getNextToken(++offset), offset, getNextToken); } else { if (token.value.charCodeAt(i + 1) !== HYPHENMINUS3) { return 0; } if (i + 2 === token.value.length) { offset = skipSC(getNextToken(++offset), offset, getNextToken); token = getNextToken(offset); return checkInteger(token, 0, DISALLOW_SIGN, offset); } else { return checkInteger(token, i + 2, DISALLOW_SIGN, offset); } } } return 0; } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/lexer/generic-urange.js var PLUSSIGN3 = 43; var HYPHENMINUS4 = 45; var QUESTIONMARK = 63; var U = 117; function isDelim2(token, code2) { return token !== null && token.type === Delim && token.value.charCodeAt(0) === code2; } function startsWith(token, code2) { return token.value.charCodeAt(0) === code2; } function hexSequence(token, offset, allowDash) { let hexlen = 0; for (let pos = offset; pos < token.value.length; pos++) { const code2 = token.value.charCodeAt(pos); if (code2 === HYPHENMINUS4 && allowDash && hexlen !== 0) { hexSequence(token, offset + hexlen + 1, false); return 6; } if (!isHexDigit(code2)) { return 0; } if (++hexlen > 6) { return 0; } ; } return hexlen; } function withQuestionMarkSequence(consumed, length2, getNextToken) { if (!consumed) { return 0; } while (isDelim2(getNextToken(length2), QUESTIONMARK)) { if (++consumed > 6) { return 0; } length2++; } return length2; } function urange(token, getNextToken) { let length2 = 0; if (token === null || token.type !== Ident || !cmpChar(token.value, 0, U)) { return 0; } token = getNextToken(++length2); if (token === null) { return 0; } if (isDelim2(token, PLUSSIGN3)) { token = getNextToken(++length2); if (token === null) { return 0; } if (token.type === Ident) { return withQuestionMarkSequence(hexSequence(token, 0, true), ++length2, getNextToken); } if (isDelim2(token, QUESTIONMARK)) { return withQuestionMarkSequence(1, ++length2, getNextToken); } return 0; } if (token.type === Number2) { const consumedHexLength = hexSequence(token, 1, true); if (consumedHexLength === 0) { return 0; } token = getNextToken(++length2); if (token === null) { return length2; } if (token.type === Dimension || token.type === Number2) { if (!startsWith(token, HYPHENMINUS4) || !hexSequence(token, 1, false)) { return 0; } return length2 + 1; } return withQuestionMarkSequence(consumedHexLength, length2, getNextToken); } if (token.type === Dimension) { return withQuestionMarkSequence(hexSequence(token, 1, true), ++length2, getNextToken); } return 0; } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/lexer/generic.js var calcFunctionNames = ["calc(", "-moz-calc(", "-webkit-calc("]; var balancePair2 = /* @__PURE__ */ new Map([ [Function, RightParenthesis], [LeftParenthesis, RightParenthesis], [LeftSquareBracket, RightSquareBracket], [LeftCurlyBracket, RightCurlyBracket] ]); function charCodeAt(str, index) { return index < str.length ? str.charCodeAt(index) : 0; } function eqStr(actual, expected) { return cmpStr(actual, 0, actual.length, expected); } function eqStrAny(actual, expected) { for (let i = 0; i < expected.length; i++) { if (eqStr(actual, expected[i])) { return true; } } return false; } function isPostfixIeHack(str, offset) { if (offset !== str.length - 2) { return false; } return charCodeAt(str, offset) === 92 && // U+005C REVERSE SOLIDUS (\) isDigit(charCodeAt(str, offset + 1)); } function outOfRange(opts, value, numEnd) { if (opts && opts.type === "Range") { const num = Number( numEnd !== void 0 && numEnd !== value.length ? value.substr(0, numEnd) : value ); if (isNaN(num)) { return true; } if (opts.min !== null && num < opts.min && typeof opts.min !== "string") { return true; } if (opts.max !== null && num > opts.max && typeof opts.max !== "string") { return true; } } return false; } function consumeFunction(token, getNextToken) { let balanceCloseType = 0; let balanceStash = []; let length2 = 0; scan: do { switch (token.type) { case RightCurlyBracket: case RightParenthesis: case RightSquareBracket: if (token.type !== balanceCloseType) { break scan; } balanceCloseType = balanceStash.pop(); if (balanceStash.length === 0) { length2++; break scan; } break; case Function: case LeftParenthesis: case LeftSquareBracket: case LeftCurlyBracket: balanceStash.push(balanceCloseType); balanceCloseType = balancePair2.get(token.type); break; } length2++; } while (token = getNextToken(length2)); return length2; } function calc(next) { return function(token, getNextToken, opts) { if (token === null) { return 0; } if (token.type === Function && eqStrAny(token.value, calcFunctionNames)) { return consumeFunction(token, getNextToken); } return next(token, getNextToken, opts); }; } function tokenType(expectedTokenType) { return function(token) { if (token === null || token.type !== expectedTokenType) { return 0; } return 1; }; } function customIdent(token) { if (token === null || token.type !== Ident) { return 0; } const name42 = token.value.toLowerCase(); if (eqStrAny(name42, cssWideKeywords)) { return 0; } if (eqStr(name42, "default")) { return 0; } return 1; } function customPropertyName(token) { if (token === null || token.type !== Ident) { return 0; } if (charCodeAt(token.value, 0) !== 45 || charCodeAt(token.value, 1) !== 45) { return 0; } return 1; } function hexColor(token) { if (token === null || token.type !== Hash) { return 0; } const length2 = token.value.length; if (length2 !== 4 && length2 !== 5 && length2 !== 7 && length2 !== 9) { return 0; } for (let i = 1; i < length2; i++) { if (!isHexDigit(charCodeAt(token.value, i))) { return 0; } } return 1; } function idSelector(token) { if (token === null || token.type !== Hash) { return 0; } if (!isIdentifierStart(charCodeAt(token.value, 1), charCodeAt(token.value, 2), charCodeAt(token.value, 3))) { return 0; } return 1; } function declarationValue(token, getNextToken) { if (!token) { return 0; } let balanceCloseType = 0; let balanceStash = []; let length2 = 0; scan: do { switch (token.type) { case BadString: case BadUrl: break scan; case RightCurlyBracket: case RightParenthesis: case RightSquareBracket: if (token.type !== balanceCloseType) { break scan; } balanceCloseType = balanceStash.pop(); break; case Semicolon: if (balanceCloseType === 0) { break scan; } break; case Delim: if (balanceCloseType === 0 && token.value === "!") { break scan; } break; case Function: case LeftParenthesis: case LeftSquareBracket: case LeftCurlyBracket: balanceStash.push(balanceCloseType); balanceCloseType = balancePair2.get(token.type); break; } length2++; } while (token = getNextToken(length2)); return length2; } function anyValue(token, getNextToken) { if (!token) { return 0; } let balanceCloseType = 0; let balanceStash = []; let length2 = 0; scan: do { switch (token.type) { case BadString: case BadUrl: break scan; case RightCurlyBracket: case RightParenthesis: case RightSquareBracket: if (token.type !== balanceCloseType) { break scan; } balanceCloseType = balanceStash.pop(); break; case Function: case LeftParenthesis: case LeftSquareBracket: case LeftCurlyBracket: balanceStash.push(balanceCloseType); balanceCloseType = balancePair2.get(token.type); break; } length2++; } while (token = getNextToken(length2)); return length2; } function dimension(type) { if (type) { type = new Set(type); } return function(token, getNextToken, opts) { if (token === null || token.type !== Dimension) { return 0; } const numberEnd = consumeNumber(token.value, 0); if (type !== null) { const reverseSolidusOffset = token.value.indexOf("\\", numberEnd); const unit = reverseSolidusOffset === -1 || !isPostfixIeHack(token.value, reverseSolidusOffset) ? token.value.substr(numberEnd) : token.value.substring(numberEnd, reverseSolidusOffset); if (type.has(unit.toLowerCase()) === false) { return 0; } } if (outOfRange(opts, token.value, numberEnd)) { return 0; } return 1; }; } function percentage(token, getNextToken, opts) { if (token === null || token.type !== Percentage) { return 0; } if (outOfRange(opts, token.value, token.value.length - 1)) { return 0; } return 1; } function zero(next) { if (typeof next !== "function") { next = function() { return 0; }; } return function(token, getNextToken, opts) { if (token !== null && token.type === Number2) { if (Number(token.value) === 0) { return 1; } } return next(token, getNextToken, opts); }; } function number2(token, getNextToken, opts) { if (token === null) { return 0; } const numberEnd = consumeNumber(token.value, 0); const isNumber = numberEnd === token.value.length; if (!isNumber && !isPostfixIeHack(token.value, numberEnd)) { return 0; } if (outOfRange(opts, token.value, numberEnd)) { return 0; } return 1; } function integer(token, getNextToken, opts) { if (token === null || token.type !== Number2) { return 0; } let i = charCodeAt(token.value, 0) === 43 || // U+002B PLUS SIGN (+) charCodeAt(token.value, 0) === 45 ? 1 : 0; for (; i < token.value.length; i++) { if (!isDigit(charCodeAt(token.value, i))) { return 0; } } if (outOfRange(opts, token.value, i)) { return 0; } return 1; } var tokenTypes = { "ident-token": tokenType(Ident), "function-token": tokenType(Function), "at-keyword-token": tokenType(AtKeyword), "hash-token": tokenType(Hash), "string-token": tokenType(String2), "bad-string-token": tokenType(BadString), "url-token": tokenType(Url), "bad-url-token": tokenType(BadUrl), "delim-token": tokenType(Delim), "number-token": tokenType(Number2), "percentage-token": tokenType(Percentage), "dimension-token": tokenType(Dimension), "whitespace-token": tokenType(WhiteSpace), "CDO-token": tokenType(CDO), "CDC-token": tokenType(CDC), "colon-token": tokenType(Colon), "semicolon-token": tokenType(Semicolon), "comma-token": tokenType(Comma), "[-token": tokenType(LeftSquareBracket), "]-token": tokenType(RightSquareBracket), "(-token": tokenType(LeftParenthesis), ")-token": tokenType(RightParenthesis), "{-token": tokenType(LeftCurlyBracket), "}-token": tokenType(RightCurlyBracket) }; var productionTypes = { // token type aliases "string": tokenType(String2), "ident": tokenType(Ident), // percentage "percentage": calc(percentage), // numeric "zero": zero(), "number": calc(number2), "integer": calc(integer), // complex types "custom-ident": customIdent, "custom-property-name": customPropertyName, "hex-color": hexColor, "id-selector": idSelector, // element( ) "an-plus-b": anPlusB, "urange": urange, "declaration-value": declarationValue, "any-value": anyValue }; function createDemensionTypes(units) { const { angle: angle2, decibel: decibel2, frequency: frequency2, flex: flex3, length: length2, resolution: resolution2, semitones: semitones2, time: time3 } = units || {}; return { "dimension": calc(dimension(null)), "angle": calc(dimension(angle2)), "decibel": calc(dimension(decibel2)), "frequency": calc(dimension(frequency2)), "flex": calc(dimension(flex3)), "length": calc(zero(dimension(length2))), "resolution": calc(dimension(resolution2)), "semitones": calc(dimension(semitones2)), "time": calc(dimension(time3)) }; } function createGenericTypes(units) { return { ...tokenTypes, ...productionTypes, ...createDemensionTypes(units) }; } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/lexer/units.js var units_exports = {}; __export(units_exports, { angle: () => angle, decibel: () => decibel, flex: () => flex2, frequency: () => frequency, length: () => length, resolution: () => resolution, semitones: () => semitones, time: () => time2 }); var length = [ // absolute length units https://www.w3.org/TR/css-values-3/#lengths "cm", "mm", "q", "in", "pt", "pc", "px", // font-relative length units https://drafts.csswg.org/css-values-4/#font-relative-lengths "em", "rem", "ex", "rex", "cap", "rcap", "ch", "rch", "ic", "ric", "lh", "rlh", // viewport-percentage lengths https://drafts.csswg.org/css-values-4/#viewport-relative-lengths "vw", "svw", "lvw", "dvw", "vh", "svh", "lvh", "dvh", "vi", "svi", "lvi", "dvi", "vb", "svb", "lvb", "dvb", "vmin", "svmin", "lvmin", "dvmin", "vmax", "svmax", "lvmax", "dvmax", // container relative lengths https://drafts.csswg.org/css-contain-3/#container-lengths "cqw", "cqh", "cqi", "cqb", "cqmin", "cqmax" ]; var angle = ["deg", "grad", "rad", "turn"]; var time2 = ["s", "ms"]; var frequency = ["hz", "khz"]; var resolution = ["dpi", "dpcm", "dppx", "x"]; var flex2 = ["fr"]; var decibel = ["db"]; var semitones = ["st"]; // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/definition-syntax/SyntaxError.js function SyntaxError3(message, input, offset) { return Object.assign(createCustomError("SyntaxError", message), { input, offset, rawMessage: message, message: message + "\n " + input + "\n--" + new Array((offset || input.length) + 1).join("-") + "^" }); } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/definition-syntax/tokenizer.js var TAB = 9; var N3 = 10; var F2 = 12; var R2 = 13; var SPACE = 32; var Tokenizer = class { constructor(str) { this.str = str; this.pos = 0; } charCodeAt(pos) { return pos < this.str.length ? this.str.charCodeAt(pos) : 0; } charCode() { return this.charCodeAt(this.pos); } nextCharCode() { return this.charCodeAt(this.pos + 1); } nextNonWsCode(pos) { return this.charCodeAt(this.findWsEnd(pos)); } findWsEnd(pos) { for (; pos < this.str.length; pos++) { const code2 = this.str.charCodeAt(pos); if (code2 !== R2 && code2 !== N3 && code2 !== F2 && code2 !== SPACE && code2 !== TAB) { break; } } return pos; } substringToPos(end) { return this.str.substring(this.pos, this.pos = end); } eat(code2) { if (this.charCode() !== code2) { this.error("Expect `" + String.fromCharCode(code2) + "`"); } this.pos++; } peek() { return this.pos < this.str.length ? this.str.charAt(this.pos++) : ""; } error(message) { throw new SyntaxError3(message, this.str, this.pos); } }; // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/definition-syntax/parse.js var TAB2 = 9; var N4 = 10; var F3 = 12; var R3 = 13; var SPACE2 = 32; var EXCLAMATIONMARK2 = 33; var NUMBERSIGN2 = 35; var AMPERSAND = 38; var APOSTROPHE = 39; var LEFTPARENTHESIS = 40; var RIGHTPARENTHESIS = 41; var ASTERISK = 42; var PLUSSIGN4 = 43; var COMMA = 44; var HYPERMINUS = 45; var LESSTHANSIGN = 60; var GREATERTHANSIGN = 62; var QUESTIONMARK2 = 63; var COMMERCIALAT = 64; var LEFTSQUAREBRACKET = 91; var RIGHTSQUAREBRACKET = 93; var LEFTCURLYBRACKET2 = 123; var VERTICALLINE = 124; var RIGHTCURLYBRACKET = 125; var INFINITY = 8734; var NAME_CHAR = new Uint8Array(128).map( (_, idx) => /[a-zA-Z0-9\-]/.test(String.fromCharCode(idx)) ? 1 : 0 ); var COMBINATOR_PRECEDENCE = { " ": 1, "&&": 2, "||": 3, "|": 4 }; function scanSpaces(tokenizer) { return tokenizer.substringToPos( tokenizer.findWsEnd(tokenizer.pos) ); } function scanWord(tokenizer) { let end = tokenizer.pos; for (; end < tokenizer.str.length; end++) { const code2 = tokenizer.str.charCodeAt(end); if (code2 >= 128 || NAME_CHAR[code2] === 0) { break; } } if (tokenizer.pos === end) { tokenizer.error("Expect a keyword"); } return tokenizer.substringToPos(end); } function scanNumber(tokenizer) { let end = tokenizer.pos; for (; end < tokenizer.str.length; end++) { const code2 = tokenizer.str.charCodeAt(end); if (code2 < 48 || code2 > 57) { break; } } if (tokenizer.pos === end) { tokenizer.error("Expect a number"); } return tokenizer.substringToPos(end); } function scanString(tokenizer) { const end = tokenizer.str.indexOf("'", tokenizer.pos + 1); if (end === -1) { tokenizer.pos = tokenizer.str.length; tokenizer.error("Expect an apostrophe"); } return tokenizer.substringToPos(end + 1); } function readMultiplierRange(tokenizer) { let min = null; let max = null; tokenizer.eat(LEFTCURLYBRACKET2); min = scanNumber(tokenizer); if (tokenizer.charCode() === COMMA) { tokenizer.pos++; if (tokenizer.charCode() !== RIGHTCURLYBRACKET) { max = scanNumber(tokenizer); } } else { max = min; } tokenizer.eat(RIGHTCURLYBRACKET); return { min: Number(min), max: max ? Number(max) : 0 }; } function readMultiplier(tokenizer) { let range = null; let comma = false; switch (tokenizer.charCode()) { case ASTERISK: tokenizer.pos++; range = { min: 0, max: 0 }; break; case PLUSSIGN4: tokenizer.pos++; range = { min: 1, max: 0 }; break; case QUESTIONMARK2: tokenizer.pos++; range = { min: 0, max: 1 }; break; case NUMBERSIGN2: tokenizer.pos++; comma = true; if (tokenizer.charCode() === LEFTCURLYBRACKET2) { range = readMultiplierRange(tokenizer); } else if (tokenizer.charCode() === QUESTIONMARK2) { tokenizer.pos++; range = { min: 0, max: 0 }; } else { range = { min: 1, max: 0 }; } break; case LEFTCURLYBRACKET2: range = readMultiplierRange(tokenizer); break; default: return null; } return { type: "Multiplier", comma, min: range.min, max: range.max, term: null }; } function maybeMultiplied(tokenizer, node) { const multiplier = readMultiplier(tokenizer); if (multiplier !== null) { multiplier.term = node; if (tokenizer.charCode() === NUMBERSIGN2 && tokenizer.charCodeAt(tokenizer.pos - 1) === PLUSSIGN4) { return maybeMultiplied(tokenizer, multiplier); } return multiplier; } return node; } function maybeToken(tokenizer) { const ch = tokenizer.peek(); if (ch === "") { return null; } return { type: "Token", value: ch }; } function readProperty(tokenizer) { let name42; tokenizer.eat(LESSTHANSIGN); tokenizer.eat(APOSTROPHE); name42 = scanWord(tokenizer); tokenizer.eat(APOSTROPHE); tokenizer.eat(GREATERTHANSIGN); return maybeMultiplied(tokenizer, { type: "Property", name: name42 }); } function readTypeRange(tokenizer) { let min = null; let max = null; let sign = 1; tokenizer.eat(LEFTSQUAREBRACKET); if (tokenizer.charCode() === HYPERMINUS) { tokenizer.peek(); sign = -1; } if (sign == -1 && tokenizer.charCode() === INFINITY) { tokenizer.peek(); } else { min = sign * Number(scanNumber(tokenizer)); if (NAME_CHAR[tokenizer.charCode()] !== 0) { min += scanWord(tokenizer); } } scanSpaces(tokenizer); tokenizer.eat(COMMA); scanSpaces(tokenizer); if (tokenizer.charCode() === INFINITY) { tokenizer.peek(); } else { sign = 1; if (tokenizer.charCode() === HYPERMINUS) { tokenizer.peek(); sign = -1; } max = sign * Number(scanNumber(tokenizer)); if (NAME_CHAR[tokenizer.charCode()] !== 0) { max += scanWord(tokenizer); } } tokenizer.eat(RIGHTSQUAREBRACKET); return { type: "Range", min, max }; } function readType(tokenizer) { let name42; let opts = null; tokenizer.eat(LESSTHANSIGN); name42 = scanWord(tokenizer); if (tokenizer.charCode() === LEFTPARENTHESIS && tokenizer.nextCharCode() === RIGHTPARENTHESIS) { tokenizer.pos += 2; name42 += "()"; } if (tokenizer.charCodeAt(tokenizer.findWsEnd(tokenizer.pos)) === LEFTSQUAREBRACKET) { scanSpaces(tokenizer); opts = readTypeRange(tokenizer); } tokenizer.eat(GREATERTHANSIGN); return maybeMultiplied(tokenizer, { type: "Type", name: name42, opts }); } function readKeywordOrFunction(tokenizer) { const name42 = scanWord(tokenizer); if (tokenizer.charCode() === LEFTPARENTHESIS) { tokenizer.pos++; return { type: "Function", name: name42 }; } return maybeMultiplied(tokenizer, { type: "Keyword", name: name42 }); } function regroupTerms(terms, combinators) { function createGroup(terms2, combinator2) { return { type: "Group", terms: terms2, combinator: combinator2, disallowEmpty: false, explicit: false }; } let combinator; combinators = Object.keys(combinators).sort((a, b) => COMBINATOR_PRECEDENCE[a] - COMBINATOR_PRECEDENCE[b]); while (combinators.length > 0) { combinator = combinators.shift(); let i = 0; let subgroupStart = 0; for (; i < terms.length; i++) { const term = terms[i]; if (term.type === "Combinator") { if (term.value === combinator) { if (subgroupStart === -1) { subgroupStart = i - 1; } terms.splice(i, 1); i--; } else { if (subgroupStart !== -1 && i - subgroupStart > 1) { terms.splice( subgroupStart, i - subgroupStart, createGroup(terms.slice(subgroupStart, i), combinator) ); i = subgroupStart + 1; } subgroupStart = -1; } } } if (subgroupStart !== -1 && combinators.length) { terms.splice( subgroupStart, i - subgroupStart, createGroup(terms.slice(subgroupStart, i), combinator) ); } } return combinator; } function readImplicitGroup(tokenizer) { const terms = []; const combinators = {}; let token; let prevToken = null; let prevTokenPos = tokenizer.pos; while (token = peek(tokenizer)) { if (token.type !== "Spaces") { if (token.type === "Combinator") { if (prevToken === null || prevToken.type === "Combinator") { tokenizer.pos = prevTokenPos; tokenizer.error("Unexpected combinator"); } combinators[token.value] = true; } else if (prevToken !== null && prevToken.type !== "Combinator") { combinators[" "] = true; terms.push({ type: "Combinator", value: " " }); } terms.push(token); prevToken = token; prevTokenPos = tokenizer.pos; } } if (prevToken !== null && prevToken.type === "Combinator") { tokenizer.pos -= prevTokenPos; tokenizer.error("Unexpected combinator"); } return { type: "Group", terms, combinator: regroupTerms(terms, combinators) || " ", disallowEmpty: false, explicit: false }; } function readGroup(tokenizer) { let result; tokenizer.eat(LEFTSQUAREBRACKET); result = readImplicitGroup(tokenizer); tokenizer.eat(RIGHTSQUAREBRACKET); result.explicit = true; if (tokenizer.charCode() === EXCLAMATIONMARK2) { tokenizer.pos++; result.disallowEmpty = true; } return result; } function peek(tokenizer) { let code2 = tokenizer.charCode(); if (code2 < 128 && NAME_CHAR[code2] === 1) { return readKeywordOrFunction(tokenizer); } switch (code2) { case RIGHTSQUAREBRACKET: break; case LEFTSQUAREBRACKET: return maybeMultiplied(tokenizer, readGroup(tokenizer)); case LESSTHANSIGN: return tokenizer.nextCharCode() === APOSTROPHE ? readProperty(tokenizer) : readType(tokenizer); case VERTICALLINE: return { type: "Combinator", value: tokenizer.substringToPos( tokenizer.pos + (tokenizer.nextCharCode() === VERTICALLINE ? 2 : 1) ) }; case AMPERSAND: tokenizer.pos++; tokenizer.eat(AMPERSAND); return { type: "Combinator", value: "&&" }; case COMMA: tokenizer.pos++; return { type: "Comma" }; case APOSTROPHE: return maybeMultiplied(tokenizer, { type: "String", value: scanString(tokenizer) }); case SPACE2: case TAB2: case N4: case R3: case F3: return { type: "Spaces", value: scanSpaces(tokenizer) }; case COMMERCIALAT: code2 = tokenizer.nextCharCode(); if (code2 < 128 && NAME_CHAR[code2] === 1) { tokenizer.pos++; return { type: "AtKeyword", name: scanWord(tokenizer) }; } return maybeToken(tokenizer); case ASTERISK: case PLUSSIGN4: case QUESTIONMARK2: case NUMBERSIGN2: case EXCLAMATIONMARK2: break; case LEFTCURLYBRACKET2: code2 = tokenizer.nextCharCode(); if (code2 < 48 || code2 > 57) { return maybeToken(tokenizer); } break; default: return maybeToken(tokenizer); } } function parse(source) { const tokenizer = new Tokenizer(source); const result = readImplicitGroup(tokenizer); if (tokenizer.pos !== source.length) { tokenizer.error("Unexpected input"); } if (result.terms.length === 1 && result.terms[0].type === "Group") { return result.terms[0]; } return result; } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/definition-syntax/walk.js var noop4 = function() { }; function ensureFunction2(value) { return typeof value === "function" ? value : noop4; } function walk(node, options, context) { function walk3(node2) { enter.call(context, node2); switch (node2.type) { case "Group": node2.terms.forEach(walk3); break; case "Multiplier": walk3(node2.term); break; case "Type": case "Property": case "Keyword": case "AtKeyword": case "Function": case "String": case "Token": case "Comma": break; default: throw new Error("Unknown type: " + node2.type); } leave.call(context, node2); } let enter = noop4; let leave = noop4; if (typeof options === "function") { enter = options; } else if (options) { enter = ensureFunction2(options.enter); leave = ensureFunction2(options.leave); } if (enter === noop4 && leave === noop4) { throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function"); } walk3(node, context); } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/lexer/prepare-tokens.js var astToTokens = { decorator(handlers) { const tokens = []; let curNode = null; return { ...handlers, node(node) { const tmp = curNode; curNode = node; handlers.node.call(this, node); curNode = tmp; }, emit(value, type, auto2) { tokens.push({ type, value, node: auto2 ? null : curNode }); }, result() { return tokens; } }; } }; function stringToTokens(str) { const tokens = []; tokenize( str, (type, start, end) => tokens.push({ type, value: str.slice(start, end), node: null }) ); return tokens; } function prepare_tokens_default(value, syntax) { if (typeof value === "string") { return stringToTokens(value); } return syntax.generate(value, astToTokens); } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/lexer/match-graph.js var MATCH = { type: "Match" }; var MISMATCH = { type: "Mismatch" }; var DISALLOW_EMPTY = { type: "DisallowEmpty" }; var LEFTPARENTHESIS2 = 40; var RIGHTPARENTHESIS2 = 41; function createCondition(match, thenBranch, elseBranch) { if (thenBranch === MATCH && elseBranch === MISMATCH) { return match; } if (match === MATCH && thenBranch === MATCH && elseBranch === MATCH) { return match; } if (match.type === "If" && match.else === MISMATCH && thenBranch === MATCH) { thenBranch = match.then; match = match.match; } return { type: "If", match, then: thenBranch, else: elseBranch }; } function isFunctionType(name42) { return name42.length > 2 && name42.charCodeAt(name42.length - 2) === LEFTPARENTHESIS2 && name42.charCodeAt(name42.length - 1) === RIGHTPARENTHESIS2; } function isEnumCapatible(term) { return term.type === "Keyword" || term.type === "AtKeyword" || term.type === "Function" || term.type === "Type" && isFunctionType(term.name); } function buildGroupMatchGraph(combinator, terms, atLeastOneTermMatched) { switch (combinator) { case " ": { let result = MATCH; for (let i = terms.length - 1; i >= 0; i--) { const term = terms[i]; result = createCondition( term, result, MISMATCH ); } ; return result; } case "|": { let result = MISMATCH; let map = null; for (let i = terms.length - 1; i >= 0; i--) { let term = terms[i]; if (isEnumCapatible(term)) { if (map === null && i > 0 && isEnumCapatible(terms[i - 1])) { map = /* @__PURE__ */ Object.create(null); result = createCondition( { type: "Enum", map }, MATCH, result ); } if (map !== null) { const key = (isFunctionType(term.name) ? term.name.slice(0, -1) : term.name).toLowerCase(); if (key in map === false) { map[key] = term; continue; } } } map = null; result = createCondition( term, MATCH, result ); } ; return result; } case "&&": { if (terms.length > 5) { return { type: "MatchOnce", terms, all: true }; } let result = MISMATCH; for (let i = terms.length - 1; i >= 0; i--) { const term = terms[i]; let thenClause; if (terms.length > 1) { thenClause = buildGroupMatchGraph( combinator, terms.filter(function(newGroupTerm) { return newGroupTerm !== term; }), false ); } else { thenClause = MATCH; } result = createCondition( term, thenClause, result ); } ; return result; } case "||": { if (terms.length > 5) { return { type: "MatchOnce", terms, all: false }; } let result = atLeastOneTermMatched ? MATCH : MISMATCH; for (let i = terms.length - 1; i >= 0; i--) { const term = terms[i]; let thenClause; if (terms.length > 1) { thenClause = buildGroupMatchGraph( combinator, terms.filter(function(newGroupTerm) { return newGroupTerm !== term; }), true ); } else { thenClause = MATCH; } result = createCondition( term, thenClause, result ); } ; return result; } } } function buildMultiplierMatchGraph(node) { let result = MATCH; let matchTerm = buildMatchGraphInternal(node.term); if (node.max === 0) { matchTerm = createCondition( matchTerm, DISALLOW_EMPTY, MISMATCH ); result = createCondition( matchTerm, null, // will be a loop MISMATCH ); result.then = createCondition( MATCH, MATCH, result // make a loop ); if (node.comma) { result.then.else = createCondition( { type: "Comma", syntax: node }, result, MISMATCH ); } } else { for (let i = node.min || 1; i <= node.max; i++) { if (node.comma && result !== MATCH) { result = createCondition( { type: "Comma", syntax: node }, result, MISMATCH ); } result = createCondition( matchTerm, createCondition( MATCH, MATCH, result ), MISMATCH ); } } if (node.min === 0) { result = createCondition( MATCH, MATCH, result ); } else { for (let i = 0; i < node.min - 1; i++) { if (node.comma && result !== MATCH) { result = createCondition( { type: "Comma", syntax: node }, result, MISMATCH ); } result = createCondition( matchTerm, result, MISMATCH ); } } return result; } function buildMatchGraphInternal(node) { if (typeof node === "function") { return { type: "Generic", fn: node }; } switch (node.type) { case "Group": { let result = buildGroupMatchGraph( node.combinator, node.terms.map(buildMatchGraphInternal), false ); if (node.disallowEmpty) { result = createCondition( result, DISALLOW_EMPTY, MISMATCH ); } return result; } case "Multiplier": return buildMultiplierMatchGraph(node); case "Type": case "Property": return { type: node.type, name: node.name, syntax: node }; case "Keyword": return { type: node.type, name: node.name.toLowerCase(), syntax: node }; case "AtKeyword": return { type: node.type, name: "@" + node.name.toLowerCase(), syntax: node }; case "Function": return { type: node.type, name: node.name.toLowerCase() + "(", syntax: node }; case "String": if (node.value.length === 3) { return { type: "Token", value: node.value.charAt(1), syntax: node }; } return { type: node.type, value: node.value.substr(1, node.value.length - 2).replace(/\\'/g, "'"), syntax: node }; case "Token": return { type: node.type, value: node.value, syntax: node }; case "Comma": return { type: node.type, syntax: node }; default: throw new Error("Unknown node type:", node.type); } } function buildMatchGraph(syntaxTree, ref) { if (typeof syntaxTree === "string") { syntaxTree = parse(syntaxTree); } return { type: "MatchGraph", match: buildMatchGraphInternal(syntaxTree), syntax: ref || null, source: syntaxTree }; } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/lexer/match.js var { hasOwnProperty: hasOwnProperty3 } = Object.prototype; var STUB = 0; var TOKEN = 1; var OPEN_SYNTAX = 2; var CLOSE_SYNTAX = 3; var EXIT_REASON_MATCH = "Match"; var EXIT_REASON_MISMATCH = "Mismatch"; var EXIT_REASON_ITERATION_LIMIT = "Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)"; var ITERATION_LIMIT = 15e3; var totalIterationCount = 0; function reverseList(list) { let prev = null; let next = null; let item = list; while (item !== null) { next = item.prev; item.prev = prev; prev = item; item = next; } return prev; } function areStringsEqualCaseInsensitive(testStr, referenceStr) { if (testStr.length !== referenceStr.length) { return false; } for (let i = 0; i < testStr.length; i++) { const referenceCode = referenceStr.charCodeAt(i); let testCode = testStr.charCodeAt(i); if (testCode >= 65 && testCode <= 90) { testCode = testCode | 32; } if (testCode !== referenceCode) { return false; } } return true; } function isContextEdgeDelim(token) { if (token.type !== Delim) { return false; } return token.value !== "?"; } function isCommaContextStart(token) { if (token === null) { return true; } return token.type === Comma || token.type === Function || token.type === LeftParenthesis || token.type === LeftSquareBracket || token.type === LeftCurlyBracket || isContextEdgeDelim(token); } function isCommaContextEnd(token) { if (token === null) { return true; } return token.type === RightParenthesis || token.type === RightSquareBracket || token.type === RightCurlyBracket || token.type === Delim && token.value === "/"; } function internalMatch(tokens, state, syntaxes) { function moveToNextToken() { do { tokenIndex++; token = tokenIndex < tokens.length ? tokens[tokenIndex] : null; } while (token !== null && (token.type === WhiteSpace || token.type === Comment)); } function getNextToken(offset) { const nextIndex = tokenIndex + offset; return nextIndex < tokens.length ? tokens[nextIndex] : null; } function stateSnapshotFromSyntax(nextState, prev) { return { nextState, matchStack, syntaxStack, thenStack, tokenIndex, prev }; } function pushThenStack(nextState) { thenStack = { nextState, matchStack, syntaxStack, prev: thenStack }; } function pushElseStack(nextState) { elseStack = stateSnapshotFromSyntax(nextState, elseStack); } function addTokenToMatch() { matchStack = { type: TOKEN, syntax: state.syntax, token, prev: matchStack }; moveToNextToken(); syntaxStash = null; if (tokenIndex > longestMatch) { longestMatch = tokenIndex; } } function openSyntax() { syntaxStack = { syntax: state.syntax, opts: state.syntax.opts || syntaxStack !== null && syntaxStack.opts || null, prev: syntaxStack }; matchStack = { type: OPEN_SYNTAX, syntax: state.syntax, token: matchStack.token, prev: matchStack }; } function closeSyntax() { if (matchStack.type === OPEN_SYNTAX) { matchStack = matchStack.prev; } else { matchStack = { type: CLOSE_SYNTAX, syntax: syntaxStack.syntax, token: matchStack.token, prev: matchStack }; } syntaxStack = syntaxStack.prev; } let syntaxStack = null; let thenStack = null; let elseStack = null; let syntaxStash = null; let iterationCount = 0; let exitReason = null; let token = null; let tokenIndex = -1; let longestMatch = 0; let matchStack = { type: STUB, syntax: null, token: null, prev: null }; moveToNextToken(); while (exitReason === null && ++iterationCount < ITERATION_LIMIT) { switch (state.type) { case "Match": if (thenStack === null) { if (token !== null) { if (tokenIndex !== tokens.length - 1 || token.value !== "\\0" && token.value !== "\\9") { state = MISMATCH; break; } } exitReason = EXIT_REASON_MATCH; break; } state = thenStack.nextState; if (state === DISALLOW_EMPTY) { if (thenStack.matchStack === matchStack) { state = MISMATCH; break; } else { state = MATCH; } } while (thenStack.syntaxStack !== syntaxStack) { closeSyntax(); } thenStack = thenStack.prev; break; case "Mismatch": if (syntaxStash !== null && syntaxStash !== false) { if (elseStack === null || tokenIndex > elseStack.tokenIndex) { elseStack = syntaxStash; syntaxStash = false; } } else if (elseStack === null) { exitReason = EXIT_REASON_MISMATCH; break; } state = elseStack.nextState; thenStack = elseStack.thenStack; syntaxStack = elseStack.syntaxStack; matchStack = elseStack.matchStack; tokenIndex = elseStack.tokenIndex; token = tokenIndex < tokens.length ? tokens[tokenIndex] : null; elseStack = elseStack.prev; break; case "MatchGraph": state = state.match; break; case "If": if (state.else !== MISMATCH) { pushElseStack(state.else); } if (state.then !== MATCH) { pushThenStack(state.then); } state = state.match; break; case "MatchOnce": state = { type: "MatchOnceBuffer", syntax: state, index: 0, mask: 0 }; break; case "MatchOnceBuffer": { const terms = state.syntax.terms; if (state.index === terms.length) { if (state.mask === 0 || state.syntax.all) { state = MISMATCH; break; } state = MATCH; break; } if (state.mask === (1 << terms.length) - 1) { state = MATCH; break; } for (; state.index < terms.length; state.index++) { const matchFlag = 1 << state.index; if ((state.mask & matchFlag) === 0) { pushElseStack(state); pushThenStack({ type: "AddMatchOnce", syntax: state.syntax, mask: state.mask | matchFlag }); state = terms[state.index++]; break; } } break; } case "AddMatchOnce": state = { type: "MatchOnceBuffer", syntax: state.syntax, index: 0, mask: state.mask }; break; case "Enum": if (token !== null) { let name42 = token.value.toLowerCase(); if (name42.indexOf("\\") !== -1) { name42 = name42.replace(/\\[09].*$/, ""); } if (hasOwnProperty3.call(state.map, name42)) { state = state.map[name42]; break; } } state = MISMATCH; break; case "Generic": { const opts = syntaxStack !== null ? syntaxStack.opts : null; const lastTokenIndex2 = tokenIndex + Math.floor(state.fn(token, getNextToken, opts)); if (!isNaN(lastTokenIndex2) && lastTokenIndex2 > tokenIndex) { while (tokenIndex < lastTokenIndex2) { addTokenToMatch(); } state = MATCH; } else { state = MISMATCH; } break; } case "Type": case "Property": { const syntaxDict = state.type === "Type" ? "types" : "properties"; const dictSyntax = hasOwnProperty3.call(syntaxes, syntaxDict) ? syntaxes[syntaxDict][state.name] : null; if (!dictSyntax || !dictSyntax.match) { throw new Error( "Bad syntax reference: " + (state.type === "Type" ? "<" + state.name + ">" : "<'" + state.name + "'>") ); } if (syntaxStash !== false && token !== null && state.type === "Type") { const lowPriorityMatching = ( // https://drafts.csswg.org/css-values-4/#custom-idents // When parsing positionally-ambiguous keywords in a property value, a production // can only claim the keyword if no other unfulfilled production can claim it. state.name === "custom-ident" && token.type === Ident || // https://drafts.csswg.org/css-values-4/#lengths // ... if a `0` could be parsed as either a or a in a property (such as line-height), // it must parse as a state.name === "length" && token.value === "0" ); if (lowPriorityMatching) { if (syntaxStash === null) { syntaxStash = stateSnapshotFromSyntax(state, elseStack); } state = MISMATCH; break; } } openSyntax(); state = dictSyntax.match; break; } case "Keyword": { const name42 = state.name; if (token !== null) { let keywordName = token.value; if (keywordName.indexOf("\\") !== -1) { keywordName = keywordName.replace(/\\[09].*$/, ""); } if (areStringsEqualCaseInsensitive(keywordName, name42)) { addTokenToMatch(); state = MATCH; break; } } state = MISMATCH; break; } case "AtKeyword": case "Function": if (token !== null && areStringsEqualCaseInsensitive(token.value, state.name)) { addTokenToMatch(); state = MATCH; break; } state = MISMATCH; break; case "Token": if (token !== null && token.value === state.value) { addTokenToMatch(); state = MATCH; break; } state = MISMATCH; break; case "Comma": if (token !== null && token.type === Comma) { if (isCommaContextStart(matchStack.token)) { state = MISMATCH; } else { addTokenToMatch(); state = isCommaContextEnd(token) ? MISMATCH : MATCH; } } else { state = isCommaContextStart(matchStack.token) || isCommaContextEnd(token) ? MATCH : MISMATCH; } break; case "String": let string = ""; let lastTokenIndex = tokenIndex; for (; lastTokenIndex < tokens.length && string.length < state.value.length; lastTokenIndex++) { string += tokens[lastTokenIndex].value; } if (areStringsEqualCaseInsensitive(string, state.value)) { while (tokenIndex < lastTokenIndex) { addTokenToMatch(); } state = MATCH; } else { state = MISMATCH; } break; default: throw new Error("Unknown node type: " + state.type); } } totalIterationCount += iterationCount; switch (exitReason) { case null: console.warn("[csstree-match] BREAK after " + ITERATION_LIMIT + " iterations"); exitReason = EXIT_REASON_ITERATION_LIMIT; matchStack = null; break; case EXIT_REASON_MATCH: while (syntaxStack !== null) { closeSyntax(); } break; default: matchStack = null; } return { tokens, reason: exitReason, iterations: iterationCount, match: matchStack, longestMatch }; } function matchAsTree(tokens, matchGraph, syntaxes) { const matchResult = internalMatch(tokens, matchGraph, syntaxes || {}); if (matchResult.match === null) { return matchResult; } let item = matchResult.match; let host = matchResult.match = { syntax: matchGraph.syntax || null, match: [] }; const hostStack = [host]; item = reverseList(item).prev; while (item !== null) { switch (item.type) { case OPEN_SYNTAX: host.match.push(host = { syntax: item.syntax, match: [] }); hostStack.push(host); break; case CLOSE_SYNTAX: hostStack.pop(); host = hostStack[hostStack.length - 1]; break; default: host.match.push({ syntax: item.syntax || null, token: item.token.value, node: item.token.node }); } item = item.prev; } return matchResult; } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/lexer/trace.js var trace_exports = {}; __export(trace_exports, { getTrace: () => getTrace, isKeyword: () => isKeyword, isProperty: () => isProperty, isType: () => isType }); function getTrace(node) { function shouldPutToTrace(syntax) { if (syntax === null) { return false; } return syntax.type === "Type" || syntax.type === "Property" || syntax.type === "Keyword"; } function hasMatch(matchNode) { if (Array.isArray(matchNode.match)) { for (let i = 0; i < matchNode.match.length; i++) { if (hasMatch(matchNode.match[i])) { if (shouldPutToTrace(matchNode.syntax)) { result.unshift(matchNode.syntax); } return true; } } } else if (matchNode.node === node) { result = shouldPutToTrace(matchNode.syntax) ? [matchNode.syntax] : []; return true; } return false; } let result = null; if (this.matched !== null) { hasMatch(this.matched); } return result; } function isType(node, type) { return testNode(this, node, (match) => match.type === "Type" && match.name === type); } function isProperty(node, property2) { return testNode(this, node, (match) => match.type === "Property" && match.name === property2); } function isKeyword(node) { return testNode(this, node, (match) => match.type === "Keyword"); } function testNode(match, node, fn) { const trace = getTrace.call(match, node); if (trace === null) { return false; } return trace.some(fn); } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/lexer/search.js function getFirstMatchNode(matchNode) { if ("node" in matchNode) { return matchNode.node; } return getFirstMatchNode(matchNode.match[0]); } function getLastMatchNode(matchNode) { if ("node" in matchNode) { return matchNode.node; } return getLastMatchNode(matchNode.match[matchNode.match.length - 1]); } function matchFragments(lexer2, ast, match, type, name42) { function findFragments(matchNode) { if (matchNode.syntax !== null && matchNode.syntax.type === type && matchNode.syntax.name === name42) { const start = getFirstMatchNode(matchNode); const end = getLastMatchNode(matchNode); lexer2.syntax.walk(ast, function(node, item, list) { if (node === start) { const nodes = new List(); do { nodes.appendData(item.data); if (item.data === end) { break; } item = item.next; } while (item !== null); fragments.push({ parent: list, nodes }); } }); } if (Array.isArray(matchNode.match)) { matchNode.match.forEach(findFragments); } } const fragments = []; if (match.matched !== null) { findFragments(match.matched); } return fragments; } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/lexer/structure.js var { hasOwnProperty: hasOwnProperty4 } = Object.prototype; function isValidNumber(value) { return typeof value === "number" && isFinite(value) && Math.floor(value) === value && value >= 0; } function isValidLocation(loc) { return Boolean(loc) && isValidNumber(loc.offset) && isValidNumber(loc.line) && isValidNumber(loc.column); } function createNodeStructureChecker(type, fields) { return function checkNode(node, warn) { if (!node || node.constructor !== Object) { return warn(node, "Type of node should be an Object"); } for (let key in node) { let valid = true; if (hasOwnProperty4.call(node, key) === false) { continue; } if (key === "type") { if (node.type !== type) { warn(node, "Wrong node type `" + node.type + "`, expected `" + type + "`"); } } else if (key === "loc") { if (node.loc === null) { continue; } else if (node.loc && node.loc.constructor === Object) { if (typeof node.loc.source !== "string") { key += ".source"; } else if (!isValidLocation(node.loc.start)) { key += ".start"; } else if (!isValidLocation(node.loc.end)) { key += ".end"; } else { continue; } } valid = false; } else if (fields.hasOwnProperty(key)) { valid = false; for (let i = 0; !valid && i < fields[key].length; i++) { const fieldType = fields[key][i]; switch (fieldType) { case String: valid = typeof node[key] === "string"; break; case Boolean: valid = typeof node[key] === "boolean"; break; case null: valid = node[key] === null; break; default: if (typeof fieldType === "string") { valid = node[key] && node[key].type === fieldType; } else if (Array.isArray(fieldType)) { valid = node[key] instanceof List; } } } } else { warn(node, "Unknown field `" + key + "` for " + type + " node type"); } if (!valid) { warn(node, "Bad value for `" + type + "." + key + "`"); } } for (const key in fields) { if (hasOwnProperty4.call(fields, key) && hasOwnProperty4.call(node, key) === false) { warn(node, "Field `" + type + "." + key + "` is missed"); } } }; } function processStructure(name42, nodeType) { const structure42 = nodeType.structure; const fields = { type: String, loc: true }; const docs = { type: '"' + name42 + '"' }; for (const key in structure42) { if (hasOwnProperty4.call(structure42, key) === false) { continue; } const docsTypes = []; const fieldTypes = fields[key] = Array.isArray(structure42[key]) ? structure42[key].slice() : [structure42[key]]; for (let i = 0; i < fieldTypes.length; i++) { const fieldType = fieldTypes[i]; if (fieldType === String || fieldType === Boolean) { docsTypes.push(fieldType.name); } else if (fieldType === null) { docsTypes.push("null"); } else if (typeof fieldType === "string") { docsTypes.push("<" + fieldType + ">"); } else if (Array.isArray(fieldType)) { docsTypes.push("List"); } else { throw new Error("Wrong value `" + fieldType + "` in `" + name42 + "." + key + "` structure definition"); } } docs[key] = docsTypes.join(" | "); } return { docs, check: createNodeStructureChecker(name42, fields) }; } function getStructureFromConfig(config) { const structure42 = {}; if (config.node) { for (const name42 in config.node) { if (hasOwnProperty4.call(config.node, name42)) { const nodeType = config.node[name42]; if (nodeType.structure) { structure42[name42] = processStructure(name42, nodeType); } else { throw new Error("Missed `structure` field in `" + name42 + "` node type definition"); } } } } return structure42; } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/lexer/Lexer.js var cssWideKeywordsSyntax = buildMatchGraph(cssWideKeywords.join(" | ")); function dumpMapSyntax(map, compact, syntaxAsAst) { const result = {}; for (const name42 in map) { if (map[name42].syntax) { result[name42] = syntaxAsAst ? map[name42].syntax : generate(map[name42].syntax, { compact }); } } return result; } function dumpAtruleMapSyntax(map, compact, syntaxAsAst) { const result = {}; for (const [name42, atrule] of Object.entries(map)) { result[name42] = { prelude: atrule.prelude && (syntaxAsAst ? atrule.prelude.syntax : generate(atrule.prelude.syntax, { compact })), descriptors: atrule.descriptors && dumpMapSyntax(atrule.descriptors, compact, syntaxAsAst) }; } return result; } function valueHasVar(tokens) { for (let i = 0; i < tokens.length; i++) { if (tokens[i].value.toLowerCase() === "var(") { return true; } } return false; } function buildMatchResult(matched, error, iterations) { return { matched, iterations, error, ...trace_exports }; } function matchSyntax(lexer2, syntax, value, useCssWideKeywords) { const tokens = prepare_tokens_default(value, lexer2.syntax); let result; if (valueHasVar(tokens)) { return buildMatchResult(null, new Error("Matching for a tree with var() is not supported")); } if (useCssWideKeywords) { result = matchAsTree(tokens, lexer2.cssWideKeywordsSyntax, lexer2); } if (!useCssWideKeywords || !result.match) { result = matchAsTree(tokens, syntax.match, lexer2); if (!result.match) { return buildMatchResult( null, new SyntaxMatchError(result.reason, syntax.syntax, value, result), result.iterations ); } } return buildMatchResult(result.match, null, result.iterations); } var Lexer = class { constructor(config, syntax, structure42) { this.cssWideKeywordsSyntax = cssWideKeywordsSyntax; this.syntax = syntax; this.generic = false; this.units = { ...units_exports }; this.atrules = /* @__PURE__ */ Object.create(null); this.properties = /* @__PURE__ */ Object.create(null); this.types = /* @__PURE__ */ Object.create(null); this.structure = structure42 || getStructureFromConfig(config); if (config) { if (config.units) { for (const group of Object.keys(units_exports)) { if (Array.isArray(config.units[group])) { this.units[group] = config.units[group]; } } } if (config.types) { for (const name42 in config.types) { this.addType_(name42, config.types[name42]); } } if (config.generic) { this.generic = true; for (const [name42, value] of Object.entries(createGenericTypes(this.units))) { this.addType_(name42, value); } } if (config.atrules) { for (const name42 in config.atrules) { this.addAtrule_(name42, config.atrules[name42]); } } if (config.properties) { for (const name42 in config.properties) { this.addProperty_(name42, config.properties[name42]); } } } } checkStructure(ast) { function collectWarning(node, message) { warns.push({ node, message }); } const structure42 = this.structure; const warns = []; this.syntax.walk(ast, function(node) { if (structure42.hasOwnProperty(node.type)) { structure42[node.type].check(node, collectWarning); } else { collectWarning(node, "Unknown node type `" + node.type + "`"); } }); return warns.length ? warns : false; } createDescriptor(syntax, type, name42, parent = null) { const ref = { type, name: name42 }; const descriptor = { type, name: name42, parent, serializable: typeof syntax === "string" || syntax && typeof syntax.type === "string", syntax: null, match: null }; if (typeof syntax === "function") { descriptor.match = buildMatchGraph(syntax, ref); } else { if (typeof syntax === "string") { Object.defineProperty(descriptor, "syntax", { get() { Object.defineProperty(descriptor, "syntax", { value: parse(syntax) }); return descriptor.syntax; } }); } else { descriptor.syntax = syntax; } Object.defineProperty(descriptor, "match", { get() { Object.defineProperty(descriptor, "match", { value: buildMatchGraph(descriptor.syntax, ref) }); return descriptor.match; } }); } return descriptor; } addAtrule_(name42, syntax) { if (!syntax) { return; } this.atrules[name42] = { type: "Atrule", name: name42, prelude: syntax.prelude ? this.createDescriptor(syntax.prelude, "AtrulePrelude", name42) : null, descriptors: syntax.descriptors ? Object.keys(syntax.descriptors).reduce( (map, descName) => { map[descName] = this.createDescriptor(syntax.descriptors[descName], "AtruleDescriptor", descName, name42); return map; }, /* @__PURE__ */ Object.create(null) ) : null }; } addProperty_(name42, syntax) { if (!syntax) { return; } this.properties[name42] = this.createDescriptor(syntax, "Property", name42); } addType_(name42, syntax) { if (!syntax) { return; } this.types[name42] = this.createDescriptor(syntax, "Type", name42); } checkAtruleName(atruleName) { if (!this.getAtrule(atruleName)) { return new SyntaxReferenceError("Unknown at-rule", "@" + atruleName); } } checkAtrulePrelude(atruleName, prelude) { const error = this.checkAtruleName(atruleName); if (error) { return error; } const atrule = this.getAtrule(atruleName); if (!atrule.prelude && prelude) { return new SyntaxError("At-rule `@" + atruleName + "` should not contain a prelude"); } if (atrule.prelude && !prelude) { if (!matchSyntax(this, atrule.prelude, "", false).matched) { return new SyntaxError("At-rule `@" + atruleName + "` should contain a prelude"); } } } checkAtruleDescriptorName(atruleName, descriptorName) { const error = this.checkAtruleName(atruleName); if (error) { return error; } const atrule = this.getAtrule(atruleName); const descriptor = keyword(descriptorName); if (!atrule.descriptors) { return new SyntaxError("At-rule `@" + atruleName + "` has no known descriptors"); } if (!atrule.descriptors[descriptor.name] && !atrule.descriptors[descriptor.basename]) { return new SyntaxReferenceError("Unknown at-rule descriptor", descriptorName); } } checkPropertyName(propertyName) { if (!this.getProperty(propertyName)) { return new SyntaxReferenceError("Unknown property", propertyName); } } matchAtrulePrelude(atruleName, prelude) { const error = this.checkAtrulePrelude(atruleName, prelude); if (error) { return buildMatchResult(null, error); } const atrule = this.getAtrule(atruleName); if (!atrule.prelude) { return buildMatchResult(null, null); } return matchSyntax(this, atrule.prelude, prelude || "", false); } matchAtruleDescriptor(atruleName, descriptorName, value) { const error = this.checkAtruleDescriptorName(atruleName, descriptorName); if (error) { return buildMatchResult(null, error); } const atrule = this.getAtrule(atruleName); const descriptor = keyword(descriptorName); return matchSyntax(this, atrule.descriptors[descriptor.name] || atrule.descriptors[descriptor.basename], value, false); } matchDeclaration(node) { if (node.type !== "Declaration") { return buildMatchResult(null, new Error("Not a Declaration node")); } return this.matchProperty(node.property, node.value); } matchProperty(propertyName, value) { if (property(propertyName).custom) { return buildMatchResult(null, new Error("Lexer matching doesn't applicable for custom properties")); } const error = this.checkPropertyName(propertyName); if (error) { return buildMatchResult(null, error); } return matchSyntax(this, this.getProperty(propertyName), value, true); } matchType(typeName, value) { const typeSyntax = this.getType(typeName); if (!typeSyntax) { return buildMatchResult(null, new SyntaxReferenceError("Unknown type", typeName)); } return matchSyntax(this, typeSyntax, value, false); } match(syntax, value) { if (typeof syntax !== "string" && (!syntax || !syntax.type)) { return buildMatchResult(null, new SyntaxReferenceError("Bad syntax")); } if (typeof syntax === "string" || !syntax.match) { syntax = this.createDescriptor(syntax, "Type", "anonymous"); } return matchSyntax(this, syntax, value, false); } findValueFragments(propertyName, value, type, name42) { return matchFragments(this, value, this.matchProperty(propertyName, value), type, name42); } findDeclarationValueFragments(declaration, type, name42) { return matchFragments(this, declaration.value, this.matchDeclaration(declaration), type, name42); } findAllFragments(ast, type, name42) { const result = []; this.syntax.walk(ast, { visit: "Declaration", enter: (declaration) => { result.push.apply(result, this.findDeclarationValueFragments(declaration, type, name42)); } }); return result; } getAtrule(atruleName, fallbackBasename = true) { const atrule = keyword(atruleName); const atruleEntry = atrule.vendor && fallbackBasename ? this.atrules[atrule.name] || this.atrules[atrule.basename] : this.atrules[atrule.name]; return atruleEntry || null; } getAtrulePrelude(atruleName, fallbackBasename = true) { const atrule = this.getAtrule(atruleName, fallbackBasename); return atrule && atrule.prelude || null; } getAtruleDescriptor(atruleName, name42) { return this.atrules.hasOwnProperty(atruleName) && this.atrules.declarators ? this.atrules[atruleName].declarators[name42] || null : null; } getProperty(propertyName, fallbackBasename = true) { const property2 = property(propertyName); const propertyEntry = property2.vendor && fallbackBasename ? this.properties[property2.name] || this.properties[property2.basename] : this.properties[property2.name]; return propertyEntry || null; } getType(name42) { return hasOwnProperty.call(this.types, name42) ? this.types[name42] : null; } validate() { function validate(syntax, name42, broken, descriptor) { if (broken.has(name42)) { return broken.get(name42); } broken.set(name42, false); if (descriptor.syntax !== null) { walk(descriptor.syntax, function(node) { if (node.type !== "Type" && node.type !== "Property") { return; } const map = node.type === "Type" ? syntax.types : syntax.properties; const brokenMap = node.type === "Type" ? brokenTypes : brokenProperties; if (!hasOwnProperty.call(map, node.name) || validate(syntax, node.name, brokenMap, map[node.name])) { broken.set(name42, true); } }, this); } } let brokenTypes = /* @__PURE__ */ new Map(); let brokenProperties = /* @__PURE__ */ new Map(); for (const key in this.types) { validate(this, key, brokenTypes, this.types[key]); } for (const key in this.properties) { validate(this, key, brokenProperties, this.properties[key]); } brokenTypes = [...brokenTypes.keys()].filter((name42) => brokenTypes.get(name42)); brokenProperties = [...brokenProperties.keys()].filter((name42) => brokenProperties.get(name42)); if (brokenTypes.length || brokenProperties.length) { return { types: brokenTypes, properties: brokenProperties }; } return null; } dump(syntaxAsAst, pretty) { return { generic: this.generic, units: this.units, types: dumpMapSyntax(this.types, !pretty, syntaxAsAst), properties: dumpMapSyntax(this.properties, !pretty, syntaxAsAst), atrules: dumpAtruleMapSyntax(this.atrules, !pretty, syntaxAsAst) }; } toString() { return JSON.stringify(this.dump()); } }; // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/syntax/config/mix.js function appendOrSet(a, b) { if (typeof b === "string" && /^\s*\|/.test(b)) { return typeof a === "string" ? a + b : b.replace(/^\s*\|\s*/, ""); } return b || null; } function sliceProps(obj, props) { const result = /* @__PURE__ */ Object.create(null); for (const [key, value] of Object.entries(obj)) { if (value) { result[key] = {}; for (const prop of Object.keys(value)) { if (props.includes(prop)) { result[key][prop] = value[prop]; } } } } return result; } function mix(dest, src) { const result = { ...dest }; for (const [prop, value] of Object.entries(src)) { switch (prop) { case "generic": result[prop] = Boolean(value); break; case "units": result[prop] = { ...dest[prop] }; for (const [name42, patch] of Object.entries(value)) { result[prop][name42] = Array.isArray(patch) ? patch : []; } break; case "atrules": result[prop] = { ...dest[prop] }; for (const [name42, atrule] of Object.entries(value)) { const exists = result[prop][name42] || {}; const current = result[prop][name42] = { prelude: exists.prelude || null, descriptors: { ...exists.descriptors } }; if (!atrule) { continue; } current.prelude = atrule.prelude ? appendOrSet(current.prelude, atrule.prelude) : current.prelude || null; for (const [descriptorName, descriptorValue] of Object.entries(atrule.descriptors || {})) { current.descriptors[descriptorName] = descriptorValue ? appendOrSet(current.descriptors[descriptorName], descriptorValue) : null; } if (!Object.keys(current.descriptors).length) { current.descriptors = null; } } break; case "types": case "properties": result[prop] = { ...dest[prop] }; for (const [name42, syntax] of Object.entries(value)) { result[prop][name42] = appendOrSet(result[prop][name42], syntax); } break; case "scope": result[prop] = { ...dest[prop] }; for (const [name42, props] of Object.entries(value)) { result[prop][name42] = { ...result[prop][name42], ...props }; } break; case "parseContext": result[prop] = { ...dest[prop], ...value }; break; case "atrule": case "pseudo": result[prop] = { ...dest[prop], ...sliceProps(value, ["parse"]) }; break; case "node": result[prop] = { ...dest[prop], ...sliceProps(value, ["name", "structure", "parse", "generate", "walkContext"]) }; break; } } return result; } // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/lib/syntax/create.js function createSyntax(config) { const parse44 = createParser(config); const walk3 = createWalker(config); const generate44 = createGenerator2(config); const { fromPlainObject: fromPlainObject2, toPlainObject: toPlainObject2 } = createConvertor(walk3); const syntax = { lexer: null, createLexer: (config2) => new Lexer(config2, syntax, syntax.lexer.structure), tokenize, parse: parse44, generate: generate44, walk: walk3, find: walk3.find, findLast: walk3.findLast, findAll: walk3.findAll, fromPlainObject: fromPlainObject2, toPlainObject: toPlainObject2, fork(extension) { const base = mix({}, config); return createSyntax( typeof extension === "function" ? extension(base, Object.assign) : mix(base, extension) ); } }; syntax.lexer = new Lexer({ generic: true, units: config.units, types: config.types, atrules: config.atrules, properties: config.properties, node: config.node }, syntax); return syntax; } var create_default = (config) => createSyntax(mix({}, config)); // node_modules/.pnpm/css-tree@2.3.1/node_modules/css-tree/dist/data.js var data_default = { "generic": true, "units": { "angle": [ "deg", "grad", "rad", "turn" ], "decibel": [ "db" ], "flex": [ "fr" ], "frequency": [ "hz", "khz" ], "length": [ "cm", "mm", "q", "in", "pt", "pc", "px", "em", "rem", "ex", "rex", "cap", "rcap", "ch", "rch", "ic", "ric", "lh", "rlh", "vw", "svw", "lvw", "dvw", "vh", "svh", "lvh", "dvh", "vi", "svi", "lvi", "dvi", "vb", "svb", "lvb", "dvb", "vmin", "svmin", "lvmin", "dvmin", "vmax", "svmax", "lvmax", "dvmax", "cqw", "cqh", "cqi", "cqb", "cqmin", "cqmax" ], "resolution": [ "dpi", "dpcm", "dppx", "x" ], "semitones": [ "st" ], "time": [ "s", "ms" ] }, "types": { "abs()": "abs( )", "absolute-size": "xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large", "acos()": "acos( )", "alpha-value": "|", "angle-percentage": "|", "angular-color-hint": "", "angular-color-stop": "&&?", "angular-color-stop-list": "[ [, ]?]# , ", "animateable-feature": "scroll-position|contents|", "asin()": "asin( )", "atan()": "atan( )", "atan2()": "atan2( , )", "attachment": "scroll|fixed|local", "attr()": "attr( ? [, ]? )", "attr-matcher": "['~'|'|'|'^'|'$'|'*']? '='", "attr-modifier": "i|s", "attribute-selector": "'[' ']'|'[' [|] ? ']'", "auto-repeat": "repeat( [auto-fill|auto-fit] , [? ]+ ? )", "auto-track-list": "[? [|]]* ? [? [|]]* ?", "axis": "block|inline|vertical|horizontal", "baseline-position": "[first|last]? baseline", "basic-shape": "||||", "bg-image": "none|", "bg-layer": "|| [/ ]?||||||||", "bg-position": "[[left|center|right|top|bottom|]|[left|center|right|] [top|center|bottom|]|[center|[left|right] ?]&&[center|[top|bottom] ?]]", "bg-size": "[|auto]{1,2}|cover|contain", "blur()": "blur( )", "blend-mode": "normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity", "box": "border-box|padding-box|content-box", "brightness()": "brightness( )", "calc()": "calc( )", "calc-sum": " [['+'|'-'] ]*", "calc-product": " ['*' |'/' ]*", "calc-value": "||||( )", "calc-constant": "e|pi|infinity|-infinity|NaN", "cf-final-image": "|", "cf-mixing-image": "?&&", "circle()": "circle( []? [at ]? )", "clamp()": "clamp( #{3} )", "class-selector": "'.' ", "clip-source": "", "color": "|||||||||currentcolor|", "color-stop": "|", "color-stop-angle": "{1,2}", "color-stop-length": "{1,2}", "color-stop-list": "[ [, ]?]# , ", "combinator": "'>'|'+'|'~'|['||']", "common-lig-values": "[common-ligatures|no-common-ligatures]", "compat-auto": "searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button", "composite-style": "clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor", "compositing-operator": "add|subtract|intersect|exclude", "compound-selector": "[? * [ *]*]!", "compound-selector-list": "#", "complex-selector": " [? ]*", "complex-selector-list": "#", "conic-gradient()": "conic-gradient( [from ]? [at ]? , )", "contextual-alt-values": "[contextual|no-contextual]", "content-distribution": "space-between|space-around|space-evenly|stretch", "content-list": "[|contents||||||]+", "content-position": "center|start|end|flex-start|flex-end", "content-replacement": "", "contrast()": "contrast( [] )", "cos()": "cos( )", "counter": "|", "counter()": "counter( , ? )", "counter-name": "", "counter-style": "|symbols( )", "counter-style-name": "", "counters()": "counters( , , ? )", "cross-fade()": "cross-fade( , ? )", "cubic-bezier-timing-function": "ease|ease-in|ease-out|ease-in-out|cubic-bezier( , , , )", "deprecated-system-color": "ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText", "discretionary-lig-values": "[discretionary-ligatures|no-discretionary-ligatures]", "display-box": "contents|none", "display-inside": "flow|flow-root|table|flex|grid|ruby", "display-internal": "table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container", "display-legacy": "inline-block|inline-list-item|inline-table|inline-flex|inline-grid", "display-listitem": "?&&[flow|flow-root]?&&list-item", "display-outside": "block|inline|run-in", "drop-shadow()": "drop-shadow( {2,3} ? )", "east-asian-variant-values": "[jis78|jis83|jis90|jis04|simplified|traditional]", "east-asian-width-values": "[full-width|proportional-width]", "element()": "element( , [first|start|last|first-except]? )|element( )", "ellipse()": "ellipse( [{2}]? [at ]? )", "ending-shape": "circle|ellipse", "env()": "env( , ? )", "exp()": "exp( )", "explicit-track-list": "[? ]+ ?", "family-name": "|+", "feature-tag-value": " [|on|off]?", "feature-type": "@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation", "feature-value-block": " '{' '}'", "feature-value-block-list": "+", "feature-value-declaration": " : + ;", "feature-value-declaration-list": "", "feature-value-name": "", "fill-rule": "nonzero|evenodd", "filter-function": "|||||||||", "filter-function-list": "[|]+", "final-bg-layer": "<'background-color'>|||| [/ ]?||||||||", "fixed-breadth": "", "fixed-repeat": "repeat( [] , [? ]+ ? )", "fixed-size": "|minmax( , )|minmax( , )", "font-stretch-absolute": "normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|", "font-variant-css21": "[normal|small-caps]", "font-weight-absolute": "normal|bold|", "frequency-percentage": "|", "general-enclosed": "[ )]|( )", "generic-family": "serif|sans-serif|cursive|fantasy|monospace|-apple-system", "generic-name": "serif|sans-serif|cursive|fantasy|monospace", "geometry-box": "|fill-box|stroke-box|view-box", "gradient": "||||||<-legacy-gradient>", "grayscale()": "grayscale( )", "grid-line": "auto||[&&?]|[span&&[||]]", "historical-lig-values": "[historical-ligatures|no-historical-ligatures]", "hsl()": "hsl( [/ ]? )|hsl( , , , ? )", "hsla()": "hsla( [/ ]? )|hsla( , , , ? )", "hue": "|", "hue-rotate()": "hue-rotate( )", "hwb()": "hwb( [|none] [|none] [|none] [/ [|none]]? )", "hypot()": "hypot( # )", "image": "||||||", "image()": "image( ? [? , ?]! )", "image-set()": "image-set( # )", "image-set-option": "[|] [||type( )]", "image-src": "|", "image-tags": "ltr|rtl", "inflexible-breadth": "|min-content|max-content|auto", "inset()": "inset( {1,4} [round <'border-radius'>]? )", "invert()": "invert( )", "keyframes-name": "|", "keyframe-block": "# { }", "keyframe-block-list": "+", "keyframe-selector": "from|to|", "lab()": "lab( [||none] [||none] [||none] [/ [|none]]? )", "layer()": "layer( )", "layer-name": " ['.' ]*", "lch()": "lch( [||none] [||none] [|none] [/ [|none]]? )", "leader()": "leader( )", "leader-type": "dotted|solid|space|", "length-percentage": "|", "line-names": "'[' * ']'", "line-name-list": "[|]+", "line-style": "none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset", "line-width": "|thin|medium|thick", "linear-color-hint": "", "linear-color-stop": " ?", "linear-gradient()": "linear-gradient( [|to ]? , )", "log()": "log( , ? )", "mask-layer": "|| [/ ]?||||||[|no-clip]||||", "mask-position": "[|left|center|right] [|top|center|bottom]?", "mask-reference": "none||", "mask-source": "", "masking-mode": "alpha|luminance|match-source", "matrix()": "matrix( #{6} )", "matrix3d()": "matrix3d( #{16} )", "max()": "max( # )", "media-and": " [and ]+", "media-condition": "|||", "media-condition-without-or": "||", "media-feature": "( [||] )", "media-in-parens": "( )||", "media-not": "not ", "media-or": " [or ]+", "media-query": "|[not|only]? [and ]?", "media-query-list": "#", "media-type": "", "mf-boolean": "", "mf-name": "", "mf-plain": " : ", "mf-range": " ['<'|'>']? '='? | ['<'|'>']? '='? | '<' '='? '<' '='? | '>' '='? '>' '='? ", "mf-value": "|||", "min()": "min( # )", "minmax()": "minmax( [|min-content|max-content|auto] , [||min-content|max-content|auto] )", "mod()": "mod( , )", "name-repeat": "repeat( [|auto-fill] , + )", "named-color": "transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|<-non-standard-color>", "namespace-prefix": "", "ns-prefix": "[|'*']? '|'", "number-percentage": "|", "numeric-figure-values": "[lining-nums|oldstyle-nums]", "numeric-fraction-values": "[diagonal-fractions|stacked-fractions]", "numeric-spacing-values": "[proportional-nums|tabular-nums]", "nth": "|even|odd", "opacity()": "opacity( [] )", "overflow-position": "unsafe|safe", "outline-radius": "|", "page-body": "? [; ]?| ", "page-margin-box": " '{' '}'", "page-margin-box-type": "@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom", "page-selector-list": "[#]?", "page-selector": "+| *", "page-size": "A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger", "path()": "path( [ ,]? )", "paint()": "paint( , ? )", "perspective()": "perspective( [|none] )", "polygon()": "polygon( ? , [ ]# )", "position": "[[left|center|right]||[top|center|bottom]|[left|center|right|] [top|center|bottom|]?|[[left|right] ]&&[[top|bottom] ]]", "pow()": "pow( , )", "pseudo-class-selector": "':' |':' ')'", "pseudo-element-selector": "':' ", "pseudo-page": ": [left|right|first|blank]", "quote": "open-quote|close-quote|no-open-quote|no-close-quote", "radial-gradient()": "radial-gradient( [||]? [at ]? , )", "ratio": " [/ ]?", "relative-selector": "? ", "relative-selector-list": "#", "relative-size": "larger|smaller", "rem()": "rem( , )", "repeat-style": "repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}", "repeating-conic-gradient()": "repeating-conic-gradient( [from ]? [at ]? , )", "repeating-linear-gradient()": "repeating-linear-gradient( [|to ]? , )", "repeating-radial-gradient()": "repeating-radial-gradient( [||]? [at ]? , )", "reversed-counter-name": "reversed( )", "rgb()": "rgb( {3} [/ ]? )|rgb( {3} [/ ]? )|rgb( #{3} , ? )|rgb( #{3} , ? )", "rgba()": "rgba( {3} [/ ]? )|rgba( {3} [/ ]? )|rgba( #{3} , ? )|rgba( #{3} , ? )", "rotate()": "rotate( [|] )", "rotate3d()": "rotate3d( , , , [|] )", "rotateX()": "rotateX( [|] )", "rotateY()": "rotateY( [|] )", "rotateZ()": "rotateZ( [|] )", "round()": "round( ? , , )", "rounding-strategy": "nearest|up|down|to-zero", "saturate()": "saturate( )", "scale()": "scale( [|]#{1,2} )", "scale3d()": "scale3d( [|]#{3} )", "scaleX()": "scaleX( [|] )", "scaleY()": "scaleY( [|] )", "scaleZ()": "scaleZ( [|] )", "scroller": "root|nearest", "self-position": "center|start|end|self-start|self-end|flex-start|flex-end", "shape-radius": "|closest-side|farthest-side", "sign()": "sign( )", "skew()": "skew( [|] , [|]? )", "skewX()": "skewX( [|] )", "skewY()": "skewY( [|] )", "sepia()": "sepia( )", "shadow": "inset?&&{2,4}&&?", "shadow-t": "[{2,3}&&?]", "shape": "rect( , , , )|rect( )", "shape-box": "|margin-box", "side-or-corner": "[left|right]||[top|bottom]", "sin()": "sin( )", "single-animation": "