docs: 仓库链接指向本镜像仓库
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run

This commit is contained in:
TanTan committed 2026-11-13 09:27:07 +08:00
1 parent fa9c73363d
commit 2a69b23b47
18210 files changed
+5101211 -16

No files matched your search

@@ -0,0 +1,45 @@
import LazyResult from './lazy-result.js'
import { SourceMap } from './postcss.js'
import Processor from './processor.js'
import Result, { Message, ResultOptions } from './result.js'
import Root from './root.js'
import Warning from './warning.js'
declare namespace NoWorkResult {
export { NoWorkResult_ as default }
}
/**
* A Promise proxy for the result of PostCSS transformations.
* This lazy result instance doesn't parse css unless `NoWorkResult#root` or `Result#root`
* are accessed. See the example below for details.
* A `NoWork` instance is returned by `Processor#process` ONLY when no plugins defined.
*
* ```js
* const noWorkResult = postcss().process(css) // No plugins are defined.
* // CSS is not parsed
* let root = noWorkResult.root // now css is parsed because we accessed the root
* ```
*/
declare class NoWorkResult_ implements LazyResult<Root> {
catch: Promise<Result<Root>>['catch']
finally: Promise<Result<Root>>['finally']
then: Promise<Result<Root>>['then']
get content(): string
get css(): string
get map(): SourceMap
get messages(): Message[]
get opts(): ResultOptions
get processor(): Processor
get root(): Root
get [Symbol.toStringTag](): string
constructor(processor: Processor, css: string, opts: ResultOptions)
async(): Promise<Result<Root>>
sync(): Result<Root>
toString(): string
warnings(): Warning[]
}
declare class NoWorkResult extends NoWorkResult_ {}
export = NoWorkResult
@@ -0,0 +1,11 @@
import * as ts from 'typescript';
import type { ParseSettings } from '../parseSettings';
import type { ASTAndDefiniteProgram } from './shared';
export declare function useProvidedPrograms(programInstances: Iterable<ts.Program>, parseSettings: ParseSettings): ASTAndDefiniteProgram;
/**
* Utility offered by parser to help consumers construct their own program instance.
*
* @param configFile the path to the tsconfig.json file, relative to `projectDirectory`
* @param projectDirectory the project directory to use as the CWD, defaults to `process.cwd()`
*/
export declare function createProgramFromConfigFile(configFile: string, projectDirectory?: string): ts.Program;
@@ -0,0 +1,102 @@
import * as react_jsx_runtime from 'react/jsx-runtime';
import * as _radix_ui_react_context from '@radix-ui/react-context';
import { Scope } from '@radix-ui/react-context';
import * as React from 'react';
import { Primitive } from '@radix-ui/react-primitive';
type Direction = 'ltr' | 'rtl';
declare global {
interface FocusOptions {
/**
* A boolean value that should be set to `true` to force, or `false` to prevent
* visible indication that the element is focused. If the property is not
* specified, a browser will provide visible indication if it determines
* that this would improve accessibility for users.
*
* @see
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#focusvisible
*/
focusVisible?: boolean;
}
}
type ScopedProps<P> = P & {
__scopeSlider?: Scope;
};
declare const createSliderScope: _radix_ui_react_context.CreateScope;
interface SliderProps extends Omit<SliderHorizontalProps | SliderVerticalProps, keyof SliderOrientationPrivateProps | 'defaultValue'> {
name?: string;
disabled?: boolean;
orientation?: React.AriaAttributes['aria-orientation'];
dir?: Direction;
min?: number;
max?: number;
step?: number;
minStepsBetweenThumbs?: number;
value?: number[];
defaultValue?: number[];
onValueChange?(value: number[]): void;
onValueCommit?(value: number[]): void;
inverted?: boolean;
form?: string;
}
declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLSpanElement>>;
type SliderOrientationPrivateProps = {
min: number;
max: number;
inverted: boolean;
onSlideStart?(value: number): void;
onSlideMove?(value: number): void;
onSlideEnd?(): void;
onHomeKeyDown(event: React.KeyboardEvent): void;
onEndKeyDown(event: React.KeyboardEvent): void;
onStepKeyDown(step: {
event: React.KeyboardEvent;
direction: number;
}): void;
};
interface SliderOrientationProps extends Omit<SliderImplProps, keyof SliderImplPrivateProps>, SliderOrientationPrivateProps {
}
interface SliderHorizontalProps extends SliderOrientationProps {
dir?: Direction;
}
interface SliderVerticalProps extends SliderOrientationProps {
}
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
type SliderImplPrivateProps = {
onSlideStart(event: React.PointerEvent): void;
onSlideMove(event: React.PointerEvent): void;
onSlideEnd(event: React.PointerEvent): void;
onHomeKeyDown(event: React.KeyboardEvent): void;
onEndKeyDown(event: React.KeyboardEvent): void;
onStepKeyDown(event: React.KeyboardEvent): void;
};
interface SliderImplProps extends PrimitiveDivProps, SliderImplPrivateProps {
}
type PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;
interface SliderTrackProps extends PrimitiveSpanProps {
}
declare const SliderTrack: React.ForwardRefExoticComponent<SliderTrackProps & React.RefAttributes<HTMLSpanElement>>;
interface SliderRangeProps extends PrimitiveSpanProps {
}
declare const SliderRange: React.ForwardRefExoticComponent<SliderRangeProps & React.RefAttributes<HTMLSpanElement>>;
interface SliderThumbProviderProps {
name?: string;
children?: React.ReactNode;
}
declare function SliderThumbProvider(props: ScopedProps<SliderThumbProviderProps>): react_jsx_runtime.JSX.Element;
declare namespace SliderThumbProvider {
var displayName: string;
}
interface SliderThumbTriggerProps extends PrimitiveSpanProps {
}
declare const SliderThumbTrigger: React.ForwardRefExoticComponent<SliderThumbTriggerProps & React.RefAttributes<HTMLSpanElement>>;
interface SliderThumbProps extends SliderThumbTriggerProps {
name?: string;
}
declare const SliderThumb: React.ForwardRefExoticComponent<SliderThumbProps & React.RefAttributes<HTMLSpanElement>>;
type PrimitiveInputProps = React.ComponentPropsWithoutRef<typeof Primitive.input>;
interface SliderBubbleInputProps extends Omit<PrimitiveInputProps, 'value'> {
}
declare const SliderBubbleInput: React.ForwardRefExoticComponent<SliderBubbleInputProps & React.RefAttributes<HTMLInputElement>>;
export { SliderRange as Range, Slider as Root, Slider, type SliderProps, SliderRange, type SliderRangeProps, SliderThumb, type SliderThumbProps, SliderTrack, type SliderTrackProps, SliderThumb as Thumb, SliderTrack as Track, createSliderScope, SliderBubbleInput as unstable_BubbleInput, SliderBubbleInput as unstable_SliderBubbleInput, type SliderBubbleInputProps as unstable_SliderBubbleInputProps, SliderThumbProvider as unstable_SliderThumbProvider, type SliderThumbProviderProps as unstable_SliderThumbProviderProps, SliderThumbTrigger as unstable_SliderThumbTrigger, type SliderThumbTriggerProps as unstable_SliderThumbTriggerProps, SliderThumbProvider as unstable_ThumbProvider, SliderThumbTrigger as unstable_ThumbTrigger };
@@ -0,0 +1,144 @@
export default `flf2a$ 1 1 9 0 40 0 8256 0
#
# benjamin.flf // Version 02 // 2001-06-04
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# This font is based on article <5m7lhtg5vj1esom25btrdugng0mseqisqv@4ax.com>
# from the newsgroup de.alt.rec.ascii-art and its follow-ups.
#
# The most current version of this font should be available here:
# http://www.cgarbs.de/stuff/benjamin.flf.gz
#
#-[WhoIsWho]------------------------------------------------------------------
#
# Font creators:
# >> Benjamin Weiland <benjamin.weiland@uloc.de>
# >> Markus Gebhard <ukgh@rz.uni-karlsruhe.de>
# >> Christian Garbs <mitch@cgarbs.de>
#
# .flf file maintainer:
# Christian Garbs <mitch@cgarbs.de>
#
#-[History]-------------------------------------------------------------------
#
# 2001-06-04::Version 02
# * added the comments you're reading now
# * changed download location to www.cgarbs.de
# * added 0-9, &, German umlauts + ess-zed
# * changed X
#
# 2001-06-03::Version 01
# * available characters: A-Z, a-z, @, *
#
#-[Commercial]----------------------------------------------------------------
#
# _ __,"\\\\ _. _ de.alt.rec.ascii-art
# /\\\\ /\\\\ _.--/ \`. ,' ( "_//" __| |__ _ _ _ __ _ ___ __ _
# ,''\\," ,""\\,"=='( \\.'\\\\_,( _\`-'=-' / _\` / _\` | '_/ _\` |___/ _\` |
# ' u-u \`=' u-u |l''|l \`" |m' |m -bf- \\__,_\\__,_|_| \\__,_| \\__,_|
#
#-[TheEnd]--------------------------------------------------------------------
#
$@@
!@@
"@@
#@@
S@@
%@@
&@@
'@@
(@@
)@@
x@@
+@@
,@@
-@@
.@@
/@@
(\\)@@
'|@@
^/_@@
-}@@
+|@@
;"@@
(o@@
"/@@
{}@@
")@@
:@@
;@@
<@@
=@@
>@@
?@@
(a)@@
/-\\@@
|3@@
(@@
|)@@
[-@@
|=@@
[,@@
|-|@@
|@@
.]@@
|<@@
|_@@
|\\/|@@
|\\|@@
()@@
|'@@
()_@@
|2@@
_\\"@@
"|"@@
|_|@@
\\/@@
\\/\\/@@
><@@
\`/@@
"/_@@
[@@
\\@@
]@@
^@@
_@@
\`@@
/-\\@@
|3@@
(@@
|)@@
[-@@
|=@@
[,@@
|-|@@
|@@
.]@@
|<@@
|_@@
|\\/|@@
|\\|@@
()@@
|'@@
()_@@
|2@@
_\\"@@
"|"@@
|_|@@
\\/@@
\\/\\/@@
\`/.@@
\`/@@
"/_@@
{@@
|@@
}@@
~@@
'/-\\'@@
'()'@@
'|_|'@@
'/-\\'@@
'()'@@
i_i@@
/3@@
`
@@ -0,0 +1,645 @@
const n = /[^\0-\x7E]/;
const t = /[\x2E\u3002\uFF0E\uFF61]/g;
const o = {
overflow: "Overflow Error",
"not-basic": "Illegal Input",
"invalid-input": "Invalid Input"
};
const e = Math.floor;
const r = String.fromCharCode;
function s(n2) {
throw new RangeError(o[n2]);
}
const c = function(n2, t2) {
return n2 + 22 + 75 * (n2 < 26) - ((t2 != 0) << 5);
};
const u = function(n2, t2, o2) {
let r2 = 0;
for (n2 = o2 ? e(n2 / 700) : n2 >> 1, n2 += e(n2 / t2); n2 > 455; r2 += 36) {
n2 = e(n2 / 35);
}
return e(r2 + 36 * n2 / (n2 + 38));
};
function toASCII(o2) {
return (function(n2, o3) {
const e2 = n2.split("@");
let r2 = "";
e2.length > 1 && (r2 = e2[0] + "@", n2 = e2[1]);
const s2 = (function(n3, t2) {
const o4 = [];
let e3 = n3.length;
for (; e3--; ) {
o4[e3] = t2(n3[e3]);
}
return o4;
})((n2 = n2.replace(t, ".")).split("."), o3).join(".");
return r2 + s2;
})(o2, function(t2) {
return n.test(t2) ? "xn--" + (function(n2) {
const t3 = [];
const o3 = (n2 = (function(n3) {
const t4 = [];
let o4 = 0;
const e2 = n3.length;
for (; o4 < e2; ) {
const r2 = n3.charCodeAt(o4++);
if (r2 >= 55296 && r2 <= 56319 && o4 < e2) {
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;
})(n2)).length;
let f = 128;
let i = 0;
let l = 72;
for (const o4 of n2) {
o4 < 128 && t3.push(r(o4));
}
const h = t3.length;
let p = h;
for (h && t3.push("-"); p < o3; ) {
let o4 = 2147483647;
for (const t4 of n2) {
t4 >= f && t4 < o4 && (o4 = t4);
}
const a = p + 1;
o4 - f > e((2147483647 - i) / a) && s("overflow"), i += (o4 - f) * a, f = o4;
for (const o5 of n2) {
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 = e(u2 / f2);
}
t3.push(r(c(n3, 0))), l = u(i, a, p == h), i = 0, ++p;
}
}
++i, ++f;
}
return t3.join("");
})(t2) : t2;
});
}
const HASH_RE = /#/g;
const AMPERSAND_RE = /&/g;
const SLASH_RE = /\//g;
const EQUAL_RE = /=/g;
const IM_RE = /\?/g;
const PLUS_RE = /\+/g;
const ENC_CARET_RE = /%5e/gi;
const ENC_BACKTICK_RE = /%60/gi;
const ENC_CURLY_OPEN_RE = /%7b/gi;
const ENC_PIPE_RE = /%7c/gi;
const ENC_CURLY_CLOSE_RE = /%7d/gi;
const ENC_SPACE_RE = /%20/gi;
const ENC_SLASH_RE = /%2f/gi;
const ENC_ENC_SLASH_RE = /%252f/gi;
function encode(text) {
return encodeURI("" + text).replace(ENC_PIPE_RE, "|");
}
function encodeHash(text) {
return encode(text).replace(ENC_CURLY_OPEN_RE, "{").replace(ENC_CURLY_CLOSE_RE, "}").replace(ENC_CARET_RE, "^");
}
function encodeQueryValue(input) {
return encode(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 encode(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 decode(text = "") {
try {
return decodeURIComponent("" + text);
} catch {
return "" + text;
}
}
function decodePath(text) {
return decode(text.replace(ENC_SLASH_RE, "%252F"));
}
function decodeQueryKey(text) {
return decode(text.replace(PLUS_RE, " "));
}
function decodeQueryValue(text) {
return decode(text.replace(PLUS_RE, " "));
}
function encodeHost(name = "") {
return toASCII(name);
}
function parseQuery(parametersString = "") {
const object = /* @__PURE__ */ Object.create(null);
if (parametersString[0] === "?") {
parametersString = parametersString.slice(1);
}
for (const parameter of parametersString.split("&")) {
const s = parameter.match(/([^=]+)=?(.*)/) || [];
if (s.length < 2) {
continue;
}
const key = decodeQueryKey(s[1]);
if (key === "__proto__" || key === "constructor") {
continue;
}
const value = decodeQueryValue(s[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("&");
}
const PROTOCOL_STRICT_REGEX = /^[\s\w\0+.-]{2,}:([/\\]{1,2})/;
const PROTOCOL_REGEX = /^[\s\w\0+.-]{2,}:([/\\]{2})?/;
const PROTOCOL_RELATIVE_REGEX = /^([/\\]\s*){2,}[^/\\]/;
const PROTOCOL_SCRIPT_RE = /^[\s\0]*(blob|data|javascript|vbscript):$/i;
const TRAILING_SLASH_RE = /\/$|\/\?|\/#/;
const 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 !== -1) {
path = input.slice(0, fragmentIndex);
fragment = input.slice(fragmentIndex);
}
const [s0, ...s] = path.split("?");
const cleanPath = s0.endsWith("/") ? s0.slice(0, -1) : s0;
return (cleanPath || "/") + (s.length > 0 ? `?${s.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 !== -1) {
path = input.slice(0, fragmentIndex);
fragment = input.slice(fragmentIndex);
if (!path) {
return fragment;
}
}
const [s0, ...s] = path.split("?");
return s0 + "/" + (s.length > 0 ? `?${s.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)) {
const nextChar = input[_base.length];
if (!nextChar || nextChar === "/" || nextChar === "?") {
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 nextChar = input[_base.length];
if (nextChar && nextChar !== "/" && nextChar !== "?") {
return input;
}
const trimmed = input.slice(_base.length).replace(/^\/+/, "");
return "/" + trimmed;
}
function withQuery(input, query) {
const parsed = parseURL(input);
const mergedQuery = { ...parseQuery(parsed.search), ...query };
parsed.search = stringifyQuery(mergedQuery);
return stringifyParsedURL(parsed);
}
function filterQuery(input, predicate) {
if (!input.includes("?")) {
return input;
}
const parsed = parseURL(input);
const query = parseQuery(parsed.search);
const filteredQuery = Object.fromEntries(
Object.entries(query).filter(([key, value]) => predicate(key, value))
);
parsed.search = stringifyQuery(filteredQuery);
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, s] of i.split(JOIN_SEGMENT_SPLIT_RE).entries()) {
if (!s || s === ".") {
continue;
}
if (s === "..") {
if (segments.length === 1 && hasProtocol(segments[0])) {
continue;
}
segments.pop();
segmentsDepth--;
continue;
}
if (sindex === 1 && segments[segments.length - 1]?.endsWith(":/")) {
segments[segments.length - 1] += "/" + s;
continue;
}
segments.push(s);
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(decode(parsed.hash));
parsed.host = encodeHost(decode(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 decode(withoutTrailingSlash(p1)) === decode(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 = decode(a);
b = decode(b);
}
return a === b;
}
function withFragment(input, hash) {
if (!hash || hash === "#") {
return input;
}
const parsed = parseURL(input);
parsed.hash = hash === "" ? "" : "#" + encodeHash(hash);
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;
}
const 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 } = parsePath(path);
return {
protocol: protocol.toLowerCase(),
auth: auth ? auth.slice(0, Math.max(0, auth.length - 1)) : "",
host,
pathname,
search,
hash,
[protocolRelative]: !protocol
};
}
function parsePath(input = "") {
const [pathname = "", search = "", hash = ""] = (input.match(/([^#?]*)(\?[^#]*)?(#.*)?/) || []).splice(1);
return {
pathname,
search,
hash
};
}
function parseAuth(input = "") {
const [username, password] = input.split(":");
return {
username: decode(username),
password: decode(password)
};
}
function parseHost(input = "") {
const [hostname, port] = (input.match(/([^/:]*):?(\d+)?/) || []).splice(1);
return {
hostname: decode(hostname),
port
};
}
function stringifyParsedURL(parsed) {
const pathname = parsed.pathname || "";
const search = parsed.search ? (parsed.search.startsWith("?") ? "" : "?") + parsed.search : "";
const hash = 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 + hash;
}
const FILENAME_STRICT_REGEX = /\/([^/]+\.[^/]+)$/;
const FILENAME_REGEX = /\/([^/]+)$/;
function parseFilename(input = "", opts) {
const { pathname } = parseURL(input);
const matches = opts?.strict ? pathname.match(FILENAME_STRICT_REGEX) : pathname.match(FILENAME_REGEX);
return matches ? matches[1] : void 0;
}
class $URL {
protocol;
host;
auth;
pathname;
query = {};
hash;
constructor(input = "") {
if (typeof input !== "string") {
throw new TypeError(
`URL input should be string received ${typeof input} (${input})`
);
}
const parsed = parseURL(input);
this.protocol = decode(parsed.protocol);
this.host = decode(parsed.host);
this.auth = decode(parsed.auth);
this.pathname = decodePath(parsed.pathname);
this.query = parseQuery(parsed.search);
this.hash = decode(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 name in this.query) {
const value = this.query[name];
if (Array.isArray(value)) {
for (const v of value) {
p.append(name, v);
}
} else {
p.append(
name,
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);
}
export { $URL, cleanDoubleSlashes, createURL, decode, decodePath, decodeQueryKey, decodeQueryValue, encode, encodeHash, encodeHost, encodeParam, encodePath, encodeQueryItem, encodeQueryKey, encodeQueryValue, filterQuery, getQuery, hasLeadingSlash, hasProtocol, hasTrailingSlash, isEmptyURL, isEqual, isNonEmptyURL, isRelative, isSamePath, isScriptProtocol, joinRelativeURL, joinURL, normalizeURL, parseAuth, parseFilename, parseHost, parsePath, parseQuery, parseURL, resolveURL, stringifyParsedURL, stringifyQuery, withBase, withFragment, withHttp, withHttps, withLeadingSlash, withProtocol, withQuery, withTrailingSlash, withoutBase, withoutFragment, withoutHost, withoutLeadingSlash, withoutProtocol, withoutTrailingSlash };
@@ -0,0 +1,616 @@
export default `flf2a$ 6 4 20 0 2
Derived from a copyrighted program by Jan Wolter (janc@crim.eecs.umich.edu)
Figlet-ized by Wendell Hicken (whicken@parasoft.com)
$$@
$$@
$$@
$$@
$$@
$$@@
@
/@
/ @
' @
o @
@@
@
o o@
' '@
@
@
@@
/ /@
-/-/-@
-/-/- @
/ / @
@
@@
,-/-@
(_/ @
/ ) @
-/-' @
@
@@
() /@
/ @
/ @
/ ()@
@
@@
() @
/\\ @
( X @
\\/ \\@
@
@@
@
o@
'@
@
@
@@
_/@
/ @
/ @
/ @
@
@@
/@
/@
_/ @
/ @
@
@@
@
\\ / @
--X--@
/ \\ @
@
@@
@
/ @
--/--@
/ @
@
@@
@
@
@
o @
' @
@@
@
@
@
---@
@
@@
@
@
@
o@
@
@@
/@
/ @
/ @
/ @
@
@@
__ @
/ )@
/ / @
(__/ @
@
@@
_@
/@
/ @
/ @
@
@@
__ @
)@
.--' @
(__ @
@
@@
__ @
)@
-/ @
___/ @
@
@@
@
/ /@
'--/ @
/ @
@
@@
___@
/ @
'--. @
___) @
@
@@
@
/ @
/_ @
(__)@
@
@@
___@
/@
-/-@
/ @
@
@@
__ @
( )@
./' @
(__) @
@
@@
__ @
(__)@
/ @
/ @
@
@@
@
@
o@
@
o @
@@
@
@
o@
@
o @
' @@
/@
/ @
\\ @
\\@
@
@@
@
@
---@
---@
@
@@
\\ @
\\@
/@
/ @
@
@@
__ @
__)@
/ @
o @
@
@@
@
_ @
/o\\ @
(____@
@
@@
_, @
/ | @
/--| @
_/ |_@
@
@@
_ __ @
( / )@
/--< @
/___/ @
@
@@
,___@
/ /@
/ @
(___/ @
@
@@
___ @
( / \\@
/ /@
(/\\_/ @
@
@@
______@
( / @
/-- @
(/____/@
@
@@
______@
( / @
-/-- @
_/ @
@
@@
,___@
/ /@
/ __ @
(___/ @
@
@@
__ @
( / /@
/--/ @
/ /_ @
@
@@
___ @
( / @
/ @
_/_ @
@
@@
___ @
( / @
/ @
_/_ @
// @
(/ @@
__ ,@
( /,/ @
/< @
/ \\_ @
@
@@
__ @
( / @
/ @
(/___/@
@
@@
_ _ _ @
( / ) )@
/ / / @
/ / (_ @
@
@@
_ __ @
( / )@
/ / @
/ (_ @
@
@@
___ @
/ ()@
/ / @
(___/ @
@
@@
_ __ @
( / )@
/--' @
/ @
@
@@
___ @
/ )@
/_ / @
(__\\/ @
\\_ @
@@
_ __ @
( / )@
/--< @
/ \\_@
@
@@
__,@
( @
\`. @
(___)@
@
@@
______@
( / @
/ @
_/ @
@
@@
__ ,@
( / / @
/ / @
(_,/_ @
@
@@
_, _@
( | / @
| / @
|/ @
@
@@
__ _@
( / / @
/ / / @
(_/_/ @
@
@@
_, ,@
( |,' @
+ @
_,'|__ @
@
@@
__ _@
( / / @
(__/ @
_/_ @
// @
(/ @@
__ @
/ )@
-< @
_/_@
// @
(/ @@
_@
/ @
/ @
/_ @
@
@@
\\ @
\\ @
\\ @
\\@
@
@@
_@
/@
/ @
_/ @
@
@@
/\\@
@
@
@
@
@@
@
@
@
@
___@
@@
@
o@
\`@
@
@
@@
@
@
__, @
(_/(_@
@
@@
@
/ @
/ @
/_) @
@
@@
@
@
_,@
(__@
@
@@
@
/@
__/ @
(_/_ @
@
@@
@
@
_ @
(/_@
@
@@
@
/)@
// @
//_ @
/) @
(/ @@
@
@
_, @
(_)_@
/| @
(/ @@
@
/ @
/_ @
/ /_@
@
@@
@
o@
, @
(_@
@
@@
@
o@
, @
_/|_@
/) @
(/ @@
@
/ @
/< @
/ |_@
@
@@
_@
//@
// @
(/_ @
@
@@
@
@
_ _ _ @
/ / / /_@
@
@@
@
@
_ _ @
/ / /_@
@
@@
@
@
__@
(_)@
@
@@
@
@
,_ @
_/|_)_@
/| @
(/ @@
@
@
_, @
(_/_@
/| @
(/ @@
@
@
_ @
/ (_@
@
@@
@
@
( @
/_)_@
@
@@
@
_/_@
/ @
(__ @
@
@@
@
@
, ,@
(_/_@
@
@@
@
@
_ ,_@
/ |/ @
@
@@
@
@
, , ,@
(_(_/_@
@
@@
@
@
_., @
/ /\\_@
@
@@
@
@
__ ,@
/ (_/_@
/ @
' @@
@
@
__,@
/_/_@
(/ @
@@
_/@
_/ @
/ @
/ @
@
@@
/@
/ @
/ @
/ @
@
@@
/ @
/_@
_/ @
/ @
@
@@
_ @
/ \\_/@
@
@
@
@@
o_,o@
/ | @
/--| @
_/ |_@
@
@@
o__o@
/ ()@
/ / @
(___/ @
@
@@
__o o@
( / / @
/ / @
(_,/_ @
@
@@
@
o o@
__, @
(_/(_@
@
@@
@
o o@
__ @
(_) @
@
@@
@
o o@
, , @
(_/_ @
@
@@
__ @
/ )@
/--< @
/___/ @
/ @
@@
`
@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const PanelTop = createLucideIcon("PanelTop", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M3 9h18", key: "1pudct" }]
]);
export { PanelTop as default };
//# sourceMappingURL=panel-top.js.map
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './chart-scatter.js';
//# sourceMappingURL=scatter-chart.js.map
@@ -0,0 +1,228 @@
var ReactiveFlags = /* @__PURE__ */ ((ReactiveFlags2) => {
ReactiveFlags2[ReactiveFlags2["None"] = 0] = "None";
ReactiveFlags2[ReactiveFlags2["Mutable"] = 1] = "Mutable";
ReactiveFlags2[ReactiveFlags2["Watching"] = 2] = "Watching";
ReactiveFlags2[ReactiveFlags2["RecursedCheck"] = 4] = "RecursedCheck";
ReactiveFlags2[ReactiveFlags2["Recursed"] = 8] = "Recursed";
ReactiveFlags2[ReactiveFlags2["Dirty"] = 16] = "Dirty";
ReactiveFlags2[ReactiveFlags2["Pending"] = 32] = "Pending";
return ReactiveFlags2;
})(ReactiveFlags || {});
// @__NO_SIDE_EFFECTS__
function createReactiveSystem({
update,
notify,
unwatched
}) {
return {
link,
unlink,
propagate,
checkDirty,
shallowPropagate
};
function link(dep, sub, version) {
const prevDep = sub.depsTail;
if (prevDep !== void 0 && prevDep.dep === dep) {
return;
}
const nextDep = prevDep !== void 0 ? prevDep.nextDep : sub.deps;
if (nextDep !== void 0 && nextDep.dep === dep) {
nextDep.version = version;
sub.depsTail = nextDep;
return;
}
const prevSub = dep.subsTail;
if (prevSub !== void 0 && prevSub.version === version && prevSub.sub === sub) {
return;
}
const newLink = sub.depsTail = dep.subsTail = {
version,
dep,
sub,
prevDep,
nextDep,
prevSub,
nextSub: void 0
};
if (nextDep !== void 0) {
nextDep.prevDep = newLink;
}
if (prevDep !== void 0) {
prevDep.nextDep = newLink;
} else {
sub.deps = newLink;
}
if (prevSub !== void 0) {
prevSub.nextSub = newLink;
} else {
dep.subs = newLink;
}
}
function unlink(link2, sub = link2.sub) {
const dep = link2.dep;
const prevDep = link2.prevDep;
const nextDep = link2.nextDep;
const nextSub = link2.nextSub;
const prevSub = link2.prevSub;
if (nextDep !== void 0) {
nextDep.prevDep = prevDep;
} else {
sub.depsTail = prevDep;
}
if (prevDep !== void 0) {
prevDep.nextDep = nextDep;
} else {
sub.deps = nextDep;
}
if (nextSub !== void 0) {
nextSub.prevSub = prevSub;
} else {
dep.subsTail = prevSub;
}
if (prevSub !== void 0) {
prevSub.nextSub = nextSub;
} else if ((dep.subs = nextSub) === void 0) {
unwatched(dep);
}
return nextDep;
}
function propagate(link2) {
let next = link2.nextSub;
let stack;
top: do {
const sub = link2.sub;
let flags = sub.flags;
if (!(flags & (4 | 8 | 16 | 32))) {
sub.flags = flags | 32;
} else if (!(flags & (4 | 8))) {
flags = 0;
} else if (!(flags & 4)) {
sub.flags = flags & -9 | 32;
} else if (!(flags & (16 | 32)) && isValidLink(link2, sub)) {
sub.flags = flags | (8 | 32);
flags &= 1;
} else {
flags = 0;
}
if (flags & 2) {
notify(sub);
}
if (flags & 1) {
const subSubs = sub.subs;
if (subSubs !== void 0) {
const nextSub = (link2 = subSubs).nextSub;
if (nextSub !== void 0) {
stack = { value: next, prev: stack };
next = nextSub;
}
continue;
}
}
if ((link2 = next) !== void 0) {
next = link2.nextSub;
continue;
}
while (stack !== void 0) {
link2 = stack.value;
stack = stack.prev;
if (link2 !== void 0) {
next = link2.nextSub;
continue top;
}
}
break;
} while (true);
}
function checkDirty(link2, sub) {
let stack;
let checkDepth = 0;
let dirty = false;
top: do {
const dep = link2.dep;
const flags = dep.flags;
if (sub.flags & 16) {
dirty = true;
} else if ((flags & (1 | 16)) === (1 | 16)) {
if (update(dep)) {
const subs = dep.subs;
if (subs.nextSub !== void 0) {
shallowPropagate(subs);
}
dirty = true;
}
} else if ((flags & (1 | 32)) === (1 | 32)) {
if (link2.nextSub !== void 0 || link2.prevSub !== void 0) {
stack = { value: link2, prev: stack };
}
link2 = dep.deps;
sub = dep;
++checkDepth;
continue;
}
if (!dirty) {
const nextDep = link2.nextDep;
if (nextDep !== void 0) {
link2 = nextDep;
continue;
}
}
while (checkDepth--) {
const firstSub = sub.subs;
const hasMultipleSubs = firstSub.nextSub !== void 0;
if (hasMultipleSubs) {
link2 = stack.value;
stack = stack.prev;
} else {
link2 = firstSub;
}
if (dirty) {
if (update(sub)) {
if (hasMultipleSubs) {
shallowPropagate(firstSub);
}
sub = link2.sub;
continue;
}
dirty = false;
} else {
sub.flags &= -33;
}
sub = link2.sub;
const nextDep = link2.nextDep;
if (nextDep !== void 0) {
link2 = nextDep;
continue top;
}
}
return dirty;
} while (true);
}
function shallowPropagate(link2) {
do {
const sub = link2.sub;
const flags = sub.flags;
if ((flags & (32 | 16)) === 32) {
sub.flags = flags | 16;
if ((flags & (2 | 4)) === 2) {
notify(sub);
}
}
} while ((link2 = link2.nextSub) !== void 0);
}
function isValidLink(checkLink, sub) {
let link2 = sub.depsTail;
while (link2 !== void 0) {
if (link2 === checkLink) {
return true;
}
link2 = link2.prevDep;
}
return false;
}
}
export {
ReactiveFlags,
createReactiveSystem
};
//# sourceMappingURL=alien.js.map
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './lock-keyhole-open.js';
//# sourceMappingURL=unlock-keyhole.js.map
@@ -0,0 +1,164 @@
# tslib
This is a runtime library for [TypeScript](https://www.typescriptlang.org/) that contains all of the TypeScript helper functions.
This library is primarily used by the `--importHelpers` flag in TypeScript.
When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:
```ts
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
exports.x = {};
exports.y = __assign({}, exports.x);
```
will instead be emitted as something like the following:
```ts
var tslib_1 = require("tslib");
exports.x = {};
exports.y = tslib_1.__assign({}, exports.x);
```
Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.
For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.
# Installing
For the latest stable version, run:
## npm
```sh
# TypeScript 3.9.2 or later
npm install tslib
# TypeScript 3.8.4 or earlier
npm install tslib@^1
# TypeScript 2.3.2 or earlier
npm install tslib@1.6.1
```
## yarn
```sh
# TypeScript 3.9.2 or later
yarn add tslib
# TypeScript 3.8.4 or earlier
yarn add tslib@^1
# TypeScript 2.3.2 or earlier
yarn add tslib@1.6.1
```
## bower
```sh
# TypeScript 3.9.2 or later
bower install tslib
# TypeScript 3.8.4 or earlier
bower install tslib@^1
# TypeScript 2.3.2 or earlier
bower install tslib@1.6.1
```
## JSPM
```sh
# TypeScript 3.9.2 or later
jspm install tslib
# TypeScript 3.8.4 or earlier
jspm install tslib@^1
# TypeScript 2.3.2 or earlier
jspm install tslib@1.6.1
```
# Usage
Set the `importHelpers` compiler option on the command line:
```
tsc --importHelpers file.ts
```
or in your tsconfig.json:
```json
{
"compilerOptions": {
"importHelpers": true
}
}
```
#### For bower and JSPM users
You will need to add a `paths` mapping for `tslib`, e.g. For Bower users:
```json
{
"compilerOptions": {
"module": "amd",
"importHelpers": true,
"baseUrl": "./",
"paths": {
"tslib" : ["bower_components/tslib/tslib.d.ts"]
}
}
}
```
For JSPM users:
```json
{
"compilerOptions": {
"module": "system",
"importHelpers": true,
"baseUrl": "./",
"paths": {
"tslib" : ["jspm_packages/npm/tslib@2.x.y/tslib.d.ts"]
}
}
}
```
## Deployment
- Choose your new version number
- Set it in `package.json` and `bower.json`
- Create a tag: `git tag [version]`
- Push the tag: `git push --tags`
- Create a [release in GitHub](https://github.com/microsoft/tslib/releases)
- Run the [publish to npm](https://github.com/microsoft/tslib/actions?query=workflow%3A%22Publish+to+NPM%22) workflow
Done.
# Contribute
There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.
* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).
* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).
* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
# Documentation
* [Quick tutorial](http://www.typescriptlang.org/Tutorial)
* [Programming handbook](http://www.typescriptlang.org/Handbook)
* [Homepage](http://www.typescriptlang.org/)
@@ -0,0 +1,396 @@
import { expect, expectTypeOf, test } from "vitest";
import * as z from "zod/mini";
const FAIL = { success: false };
test("z.string", async () => {
const a = z.string();
expect(z.parse(a, "hello")).toEqual("hello");
expect(() => z.parse(a, 123)).toThrow();
expect(() => z.parse(a, false)).toThrow();
type a = z.infer<typeof a>;
expectTypeOf<a>().toEqualTypeOf<string>();
});
// test("z.string with description", () => {
// const a = z.string({ description: "string description" });
// a._def;
// expect(a._def.description).toEqual("string description");
// });
test("z.string with custom error", () => {
const a = z.string({ error: () => "BAD" });
expect(z.safeParse(a, 123).error!.issues[0].message).toEqual("BAD");
});
test("inference in checks", () => {
const a = z.string().check(z.refine((val) => val.length));
z.parse(a, "___");
expect(() => z.parse(a, "")).toThrow();
const b = z.string().check(z.refine((val) => val.length));
z.parse(b, "___");
expect(() => z.parse(b, "")).toThrow();
const c = z.string().check(z.refine((val) => val.length));
z.parse(c, "___");
expect(() => z.parse(c, "")).toThrow();
const d = z.string().check(z.refine((val) => val.length));
z.parse(d, "___");
expect(() => z.parse(d, "")).toThrow();
});
test("z.string async", async () => {
// async
const a = z.string().check(z.refine(async (val) => val.length));
expect(await z.parseAsync(a, "___")).toEqual("___");
await expect(() => z.parseAsync(a, "")).rejects.toThrowError();
});
test("z.uuid", () => {
const a = z.uuid();
// parse uuid
z.parse(a, "550e8400-e29b-41d4-a716-446655440000");
z.parse(a, "550e8400-e29b-61d4-a716-446655440000");
// bad uuid
expect(() => z.parse(a, "hello")).toThrow();
// wrong type
expect(() => z.parse(a, 123)).toThrow();
const b = z.uuidv4();
z.parse(b, "550e8400-e29b-41d4-a716-446655440000");
expect(z.safeParse(b, "550e8400-e29b-61d4-a716-446655440000")).toMatchObject(FAIL);
const c = z.uuidv6();
z.parse(c, "550e8400-e29b-61d4-a716-446655440000");
expect(z.safeParse(c, "550e8400-e29b-41d4-a716-446655440000")).toMatchObject(FAIL);
const d = z.uuidv7();
z.parse(d, "550e8400-e29b-71d4-a716-446655440000");
expect(z.safeParse(d, "550e8400-e29b-41d4-a716-446655440000")).toMatchObject(FAIL);
expect(z.safeParse(d, "550e8400-e29b-61d4-a716-446655440000")).toMatchObject(FAIL);
});
test("z.email", () => {
const a = z.email();
expect(z.parse(a, "test@test.com")).toEqual("test@test.com");
expect(() => z.parse(a, "test")).toThrow();
expect(z.safeParse(a, "bad email", { error: () => "bad email" }).error!.issues[0].message).toEqual("bad email");
const b = z.email("bad email");
expect(z.safeParse(b, "bad email").error!.issues[0].message).toEqual("bad email");
const c = z.email({ error: "bad email" });
expect(z.safeParse(c, "bad email").error!.issues[0].message).toEqual("bad email");
const d = z.email({ error: () => "bad email" });
expect(z.safeParse(d, "bad email").error!.issues[0].message).toEqual("bad email");
});
test("z.url", () => {
const a = z.url();
// valid URLs
expect(a.parse("http://example.com")).toEqual("http://example.com");
expect(a.parse("https://example.com")).toEqual("https://example.com");
expect(a.parse("ftp://example.com")).toEqual("ftp://example.com");
expect(a.parse("http://sub.example.com")).toEqual("http://sub.example.com");
expect(a.parse("https://example.com/path?query=123#fragment")).toEqual("https://example.com/path?query=123#fragment");
expect(a.parse("http://localhost")).toEqual("http://localhost");
expect(a.parse("https://localhost")).toEqual("https://localhost");
expect(a.parse("http://localhost:3000")).toEqual("http://localhost:3000");
expect(a.parse("https://localhost:3000")).toEqual("https://localhost:3000");
// test trimming
expect(a.parse(" http://example.com ")).toEqual("http://example.com");
expect(a.parse(" http://example.com/")).toEqual("http://example.com/");
expect(a.parse(" http://example.com")).toEqual("http://example.com");
expect(a.parse(" http://example.com//")).toEqual("http://example.com//");
// invalid URLs
expect(() => a.parse("not-a-url")).toThrow();
// expect(() => a.parse("http:/example.com")).toThrow();
expect(() => a.parse("://example.com")).toThrow();
expect(() => a.parse("http://")).toThrow();
expect(() => a.parse("example.com")).toThrow();
// wrong type
expect(() => a.parse(123)).toThrow();
expect(() => a.parse(null)).toThrow();
expect(() => a.parse(undefined)).toThrow();
});
test("z.url with optional hostname regex", () => {
const a = z.url({ hostname: /example\.com$/ });
expect(a.parse("http://example.com")).toEqual("http://example.com");
expect(a.parse("https://sub.example.com")).toEqual("https://sub.example.com");
expect(() => a.parse("http://examples.com")).toThrow();
expect(() => a.parse("http://example.org")).toThrow();
expect(() => a.parse("asdf")).toThrow();
});
test("z.url - file urls", () => {
// file URLs
const a = z.url({ hostname: /.*/ }); // allow any hostname
expect(a.parse("file:///path/to/file.txt")).toEqual("file:///path/to/file.txt");
expect(a.parse("file:///C:/path/to/file.txt")).toEqual("file:///C:/path/to/file.txt");
expect(a.parse("file:///C:/path/to/file.txt?query=123#fragment")).toEqual(
"file:///C:/path/to/file.txt?query=123#fragment"
);
});
test("z.url with optional protocol regex", () => {
const a = z.url({ protocol: /^https?$/ });
expect(a.parse("http://example.com")).toEqual("http://example.com");
expect(a.parse("https://example.com")).toEqual("https://example.com");
expect(() => a.parse("ftp://example.com")).toThrow();
expect(() => a.parse("mailto:example@example.com")).toThrow();
expect(() => a.parse("asdf")).toThrow();
});
test("z.url with both hostname and protocol regexes", () => {
const a = z.url({ hostname: /example\.com$/, protocol: /^https$/ });
expect(a.parse("https://example.com")).toEqual("https://example.com");
expect(a.parse("https://sub.example.com")).toEqual("https://sub.example.com");
expect(() => a.parse("http://example.com")).toThrow();
expect(() => a.parse("https://example.org")).toThrow();
expect(() => a.parse("ftp://example.com")).toThrow();
expect(() => a.parse("asdf")).toThrow();
});
test("z.url with invalid regex patterns", () => {
const a = z.url({ hostname: /a+$/, protocol: /^ftp$/ });
a.parse("ftp://a");
a.parse("ftp://aaaaaaaa");
expect(() => a.parse("http://aaa")).toThrow();
expect(() => a.parse("https://example.com")).toThrow();
expect(() => a.parse("ftp://asdfasdf")).toThrow();
expect(() => a.parse("ftp://invalid")).toThrow();
});
test("z.emoji", () => {
const a = z.emoji();
expect(z.parse(a, "😀")).toEqual("😀");
expect(() => z.parse(a, "hello")).toThrow();
});
test("z.nanoid", () => {
const a = z.nanoid();
expect(z.parse(a, "8FHZpIxleEK3axQRBNNjN")).toEqual("8FHZpIxleEK3axQRBNNjN");
expect(() => z.parse(a, "abc")).toThrow();
});
test("z.nanoid custom length", () => {
const a = z.nanoid({ length: 64 });
const id = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
expect(z.parse(a, id)).toEqual(id);
expect(() => z.parse(a, "8FHZpIxleEK3axQRBNNjN")).toThrow();
});
test("z.cuid", () => {
const a = z.cuid();
expect(z.parse(a, "cixs7y0c0000f7x3b1z6m3w6r")).toEqual("cixs7y0c0000f7x3b1z6m3w6r");
expect(() => z.parse(a, "abc")).toThrow();
});
test("z.cuid2", () => {
const a = z.cuid2();
expect(z.parse(a, "cixs7y0c0000f7x3b1z6m3w6r")).toEqual("cixs7y0c0000f7x3b1z6m3w6r");
expect(() => z.parse(a, 123)).toThrow();
});
test("z.ulid", () => {
const a = z.ulid();
expect(z.parse(a, "01ETGRM9QYVX6S9V2F3B6JXG4N")).toEqual("01ETGRM9QYVX6S9V2F3B6JXG4N");
expect(() => z.parse(a, "abc")).toThrow();
});
test("z.xid", () => {
const a = z.xid();
expect(z.parse(a, "9m4e2mr0ui3e8a215n4g")).toEqual("9m4e2mr0ui3e8a215n4g");
expect(() => z.parse(a, "abc")).toThrow();
});
test("z.ksuid", () => {
const a = z.ksuid();
expect(z.parse(a, "2naeRjTrrHJAkfd3tOuEjw90WCA")).toEqual("2naeRjTrrHJAkfd3tOuEjw90WCA");
expect(() => z.parse(a, "abc")).toThrow();
});
// test("z.ip", () => {
// const a = z.ip();
// expect(z.parse(a, "127.0.0.1")).toEqual("127.0.0.1");
// expect(z.parse(a, "2001:0db8:85a3:0000:0000:8a2e:0370:7334")).toEqual("2001:0db8:85a3:0000:0000:8a2e:0370:7334");
// expect(() => z.parse(a, "abc")).toThrow();
// });
test("z.ipv4", () => {
const a = z.ipv4();
// valid ipv4
expect(z.parse(a, "192.168.1.1")).toEqual("192.168.1.1");
expect(z.parse(a, "255.255.255.255")).toEqual("255.255.255.255");
// invalid ipv4
expect(() => z.parse(a, "999.999.999.999")).toThrow();
expect(() => z.parse(a, "256.256.256.256")).toThrow();
expect(() => z.parse(a, "192.168.1")).toThrow();
expect(() => z.parse(a, "hello")).toThrow();
// wrong type
expect(() => z.parse(a, 123)).toThrow();
});
test("z.ipv6", () => {
const a = z.ipv6();
// valid ipv6
expect(z.parse(a, "2001:0db8:85a3:0000:0000:8a2e:0370:7334")).toEqual("2001:0db8:85a3:0000:0000:8a2e:0370:7334");
expect(z.parse(a, "::1")).toEqual("::1");
// invalid ipv6
expect(() => z.parse(a, "2001:db8::85a3::8a2e:370:7334")).toThrow();
expect(() => z.parse(a, "2001:db8:85a3:0:0:8a2e:370g:7334")).toThrow();
expect(() => z.parse(a, "hello")).toThrow();
// wrong type
expect(() => z.parse(a, 123)).toThrow();
});
test("z.mac", () => {
const a = z.mac();
// valid mac
expect(z.parse(a, "00:1A:2B:3C:4D:5E")).toEqual("00:1A:2B:3C:4D:5E");
// invalid mac (dash delimiter not accepted by default)
expect(() => z.parse(a, "01-23-45-67-89-AB")).toThrow();
expect(() => z.parse(a, "00:1A:2B::4D:5E")).toThrow();
expect(() => z.parse(a, "00:1a-2B:3c-4D:5e")).toThrow();
expect(() => z.parse(a, "hello")).toThrow();
// wrong type
expect(() => z.parse(a, 123)).toThrow();
});
test("z.mac with custom delimiter", () => {
const a = z.mac({ delimiter: ":" });
// valid mac with colon
expect(z.parse(a, "00:1A:2B:3C:4D:5E")).toEqual("00:1A:2B:3C:4D:5E");
// invalid mac with dash
expect(() => z.parse(a, "00-1A-2B-3C-4D-5E")).toThrow();
const b = z.mac({ delimiter: "-" });
// valid mac with dash
expect(z.parse(b, "00-1A-2B-3C-4D-5E")).toEqual("00-1A-2B-3C-4D-5E");
// invalid mac with colon
expect(() => z.parse(b, "00:1A:2B:3C:4D:5E")).toThrow();
const c = z.mac({ delimiter: ":" });
// colon-only mac
expect(z.parse(c, "00:1A:2B:3C:4D:5E")).toEqual("00:1A:2B:3C:4D:5E");
expect(() => z.parse(c, "00-1A-2B-3C-4D-5E")).toThrow();
});
test("z.base64", () => {
const a = z.base64();
// valid base64
expect(z.parse(a, "SGVsbG8gd29ybGQ=")).toEqual("SGVsbG8gd29ybGQ=");
expect(z.parse(a, "U29tZSBvdGhlciBzdHJpbmc=")).toEqual("U29tZSBvdGhlciBzdHJpbmc=");
// invalid base64
expect(() => z.parse(a, "SGVsbG8gd29ybGQ")).toThrow();
expect(() => z.parse(a, "U29tZSBvdGhlciBzdHJpbmc")).toThrow();
expect(() => z.parse(a, "hello")).toThrow();
// whitespace is not allowed (atob would otherwise strip it)
expect(() => z.parse(a, "123 ")).toThrow();
expect(() => z.parse(a, "SGVsbG8gd29ybGQ= ")).toThrow();
expect(() => z.parse(a, "SGVsbG8gd29ybGQ=\n")).toThrow();
expect(() => z.parse(a, "SGVs bG8gd29ybGQ=")).toThrow();
// wrong type
expect(() => z.parse(a, 123)).toThrow();
});
// test("z.jsonString", () => {
// const a = z.jsonString();
// // valid JSON string
// expect(z.parse(a, '{"key":"value"}')).toEqual('{"key":"value"}');
// expect(z.parse(a, '["item1", "item2"]')).toEqual('["item1", "item2"]');
// // invalid JSON string
// expect(() => z.parse(a, '{"key":value}')).toThrow();
// expect(() => z.parse(a, '["item1", "item2"')).toThrow();
// expect(() => z.parse(a, "hello")).toThrow();
// // wrong type
// expect(() => z.parse(a, 123)).toThrow();
// });
test("z.e164", () => {
const a = z.e164();
// valid e164
expect(z.parse(a, "+1234567890")).toEqual("+1234567890");
expect(z.parse(a, "+19876543210")).toEqual("+19876543210");
// invalid e164
expect(() => z.parse(a, "1234567890")).toThrow();
expect(() => z.parse(a, "+12345")).toThrow();
expect(() => z.parse(a, "hello")).toThrow();
// wrong type
expect(() => z.parse(a, 123)).toThrow();
});
test("z.creditCard", () => {
const a = z.creditCard();
// valid credit card
expect(z.parse(a, "4111111111111111")).toEqual("4111111111111111");
expect(z.parse(a, "4111 1111 1111 1111")).toEqual("4111 1111 1111 1111");
// failed Luhn checksum
expect(() => z.parse(a, "4111111111111112")).toThrow();
// outside the 12-19 digit range
expect(() => z.parse(a, "40000000006")).toThrow();
expect(() => z.parse(a, "hello")).toThrow();
// wrong type
expect(() => z.parse(a, 123)).toThrow();
});
test("z.iban", () => {
const a = z.iban();
// valid iban
expect(z.parse(a, "DE89370400440532013000")).toEqual("DE89370400440532013000");
expect(z.parse(a, "NO9386011117947")).toEqual("NO9386011117947");
// failed mod 97 checksum
expect(() => z.parse(a, "DE89370400440532013001")).toThrow();
// formatting violations
expect(() => z.parse(a, "de89370400440532013000")).toThrow();
expect(() => z.parse(a, "DE89 3704 0044 0532 0130 00")).toThrow();
expect(() => z.parse(a, "NO938601111794")).toThrow();
expect(() => z.parse(a, "hello")).toThrow();
// wrong type
expect(() => z.parse(a, 123)).toThrow();
});
test("z.jwt", () => {
const a = z.jwt();
// valid jwt
expect(
z.parse(
a,
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
)
).toEqual(
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
);
// invalid jwt
expect(() => z.parse(a, "invalid.jwt.token")).toThrow();
expect(() => z.parse(a, "hello")).toThrow();
// wrong type
expect(() => z.parse(a, 123)).toThrow();
});
test("z.hash generic format", () => {
expect(z.hash("sha256").parse("a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3")).toBe(
"a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3"
);
// --- Type-level checks (ensure the literal format string is encoded in the return type)
expectTypeOf(z.hash("md5")).toEqualTypeOf<z.ZodMiniCustomStringFormat<"md5_hex">>();
expectTypeOf(z.hash("sha1")).toEqualTypeOf<z.ZodMiniCustomStringFormat<"sha1_hex">>();
expectTypeOf(z.hash("sha256", { enc: "base64" as const })).toEqualTypeOf<
z.ZodMiniCustomStringFormat<"sha256_base64">
>();
expectTypeOf(z.hash("sha384", { enc: "base64url" as const })).toEqualTypeOf<
z.ZodMiniCustomStringFormat<"sha384_base64url">
>();
});
test("z.currencyCode", () => {
const a = z.currencyCode();
expectTypeOf(a).toEqualTypeOf<z.ZodMiniCustomStringFormat<"currency_code">>();
expect(z.parse(a, "EUR")).toBe("EUR");
expect(z.safeParse(a, "eur")).toMatchObject(FAIL);
});
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Disc3 = createLucideIcon("Disc3", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["path", { d: "M6 12c0-1.7.7-3.2 1.8-4.2", key: "oqkarx" }],
["circle", { cx: "12", cy: "12", r: "2", key: "1c9p78" }],
["path", { d: "M18 12c0 1.7-.7 3.2-1.8 4.2", key: "1eah9h" }]
]);
export { Disc3 as default };
//# sourceMappingURL=disc-3.js.map
@@ -0,0 +1,175 @@
#ifndef IPC_H
#define IPC_H
#include <string>
#include <stdlib.h>
#ifdef _WIN32
#include <winsock2.h>
#include <windows.h>
#else
#include <unistd.h>
#include <sys/socket.h>
#include <sys/un.h>
#endif
class IPC {
public:
IPC(std::string path) {
mStopped = false;
#ifdef _WIN32
while (true) {
mPipe = CreateFile(
path.data(), // pipe name
GENERIC_READ | GENERIC_WRITE, // read and write access
0, // no sharing
NULL, // default security attributes
OPEN_EXISTING, // opens existing pipe
FILE_FLAG_OVERLAPPED, // attributes
NULL // no template file
);
if (mPipe != INVALID_HANDLE_VALUE) {
break;
}
if (GetLastError() != ERROR_PIPE_BUSY) {
throw std::runtime_error("Could not open pipe");
}
// Wait for pipe to become available if it is busy
if (!WaitNamedPipe(path.data(), 30000)) {
throw std::runtime_error("Error waiting for pipe");
}
}
mReader = CreateEvent(NULL, true, false, NULL);
mWriter = CreateEvent(NULL, true, false, NULL);
#else
struct sockaddr_un addr;
memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_UNIX;
strncpy(addr.sun_path, path.c_str(), sizeof(addr.sun_path) - 1);
mSock = socket(AF_UNIX, SOCK_STREAM, 0);
if (connect(mSock, (struct sockaddr *) &addr, sizeof(struct sockaddr_un))) {
throw std::runtime_error("Error connecting to socket");
}
#endif
}
~IPC() {
mStopped = true;
#ifdef _WIN32
CancelIo(mPipe);
CloseHandle(mPipe);
CloseHandle(mReader);
CloseHandle(mWriter);
#else
shutdown(mSock, SHUT_RDWR);
#endif
}
void write(std::string buf) {
#ifdef _WIN32
OVERLAPPED overlapped;
overlapped.hEvent = mWriter;
bool success = WriteFile(
mPipe, // pipe handle
buf.data(), // message
static_cast<DWORD>(buf.size()), // message length
NULL, // bytes written
&overlapped // overlapped
);
if (mStopped) {
return;
}
if (!success) {
if (GetLastError() != ERROR_IO_PENDING) {
throw std::runtime_error("Write error");
}
}
DWORD written;
success = GetOverlappedResult(mPipe, &overlapped, &written, true);
if (!success) {
throw std::runtime_error("GetOverlappedResult failed");
}
if (written != buf.size()) {
throw std::runtime_error("Wrong number of bytes written");
}
#else
int r = 0;
for (unsigned int i = 0; i != buf.size(); i += r) {
r = ::write(mSock, &buf[i], buf.size() - i);
if (r == -1) {
if (errno == EAGAIN) {
r = 0;
} else if (mStopped) {
return;
} else {
throw std::runtime_error("Write error");
}
}
}
#endif
}
int read(char *buf, size_t len) {
#ifdef _WIN32
OVERLAPPED overlapped;
overlapped.hEvent = mReader;
bool success = ReadFile(
mPipe, // pipe handle
buf, // buffer to receive reply
static_cast<DWORD>(len), // size of buffer
NULL, // number of bytes read
&overlapped // overlapped
);
if (!success && !mStopped) {
if (GetLastError() != ERROR_IO_PENDING) {
throw std::runtime_error("Read error");
}
}
DWORD read = 0;
success = GetOverlappedResult(mPipe, &overlapped, &read, true);
if (!success && !mStopped) {
throw std::runtime_error("GetOverlappedResult failed");
}
return read;
#else
int r = ::read(mSock, buf, len);
if (r == 0 && !mStopped) {
throw std::runtime_error("Socket ended unexpectedly");
}
if (r < 0) {
if (mStopped) {
return 0;
}
throw std::runtime_error(strerror(errno));
}
return r;
#endif
}
private:
bool mStopped;
#ifdef _WIN32
HANDLE mPipe;
HANDLE mReader;
HANDLE mWriter;
#else
int mSock;
#endif
};
#endif
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2025_float16: LibDefinition;
@@ -0,0 +1,60 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.WHILE_TYPES = exports.USERWHITESPACABLE_TYPES = exports.UNARYLIKE_TYPES = exports.TYPESCRIPT_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.TSENTITYNAME_TYPES = exports.TSBASETYPE_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.STANDARDIZED_TYPES = exports.SCOPABLE_TYPES = exports.PUREISH_TYPES = exports.PROPERTY_TYPES = exports.PRIVATE_TYPES = exports.PATTERN_TYPES = exports.PATTERNLIKE_TYPES = exports.OBJECTMEMBER_TYPES = exports.MODULESPECIFIER_TYPES = exports.MODULEDECLARATION_TYPES = exports.MISCELLANEOUS_TYPES = exports.METHOD_TYPES = exports.LVAL_TYPES = exports.LOOP_TYPES = exports.LITERAL_TYPES = exports.JSX_TYPES = exports.IMPORTOREXPORTDECLARATION_TYPES = exports.IMMUTABLE_TYPES = exports.FUNCTION_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FUNCTIONPARAMETER_TYPES = exports.FOR_TYPES = exports.FORXSTATEMENT_TYPES = exports.FLOW_TYPES = exports.FLOWTYPE_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.EXPRESSION_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.DECLARATION_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.CLASS_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.BINARY_TYPES = exports.ACCESSOR_TYPES = void 0;
var _index = require("../../definitions/index.js");
const STANDARDIZED_TYPES = exports.STANDARDIZED_TYPES = _index.FLIPPED_ALIAS_KEYS["Standardized"];
const EXPRESSION_TYPES = exports.EXPRESSION_TYPES = _index.FLIPPED_ALIAS_KEYS["Expression"];
const BINARY_TYPES = exports.BINARY_TYPES = _index.FLIPPED_ALIAS_KEYS["Binary"];
const SCOPABLE_TYPES = exports.SCOPABLE_TYPES = _index.FLIPPED_ALIAS_KEYS["Scopable"];
const BLOCKPARENT_TYPES = exports.BLOCKPARENT_TYPES = _index.FLIPPED_ALIAS_KEYS["BlockParent"];
const BLOCK_TYPES = exports.BLOCK_TYPES = _index.FLIPPED_ALIAS_KEYS["Block"];
const STATEMENT_TYPES = exports.STATEMENT_TYPES = _index.FLIPPED_ALIAS_KEYS["Statement"];
const TERMINATORLESS_TYPES = exports.TERMINATORLESS_TYPES = _index.FLIPPED_ALIAS_KEYS["Terminatorless"];
const COMPLETIONSTATEMENT_TYPES = exports.COMPLETIONSTATEMENT_TYPES = _index.FLIPPED_ALIAS_KEYS["CompletionStatement"];
const CONDITIONAL_TYPES = exports.CONDITIONAL_TYPES = _index.FLIPPED_ALIAS_KEYS["Conditional"];
const LOOP_TYPES = exports.LOOP_TYPES = _index.FLIPPED_ALIAS_KEYS["Loop"];
const WHILE_TYPES = exports.WHILE_TYPES = _index.FLIPPED_ALIAS_KEYS["While"];
const EXPRESSIONWRAPPER_TYPES = exports.EXPRESSIONWRAPPER_TYPES = _index.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
const FOR_TYPES = exports.FOR_TYPES = _index.FLIPPED_ALIAS_KEYS["For"];
const FORXSTATEMENT_TYPES = exports.FORXSTATEMENT_TYPES = _index.FLIPPED_ALIAS_KEYS["ForXStatement"];
const FUNCTION_TYPES = exports.FUNCTION_TYPES = _index.FLIPPED_ALIAS_KEYS["Function"];
const FUNCTIONPARENT_TYPES = exports.FUNCTIONPARENT_TYPES = _index.FLIPPED_ALIAS_KEYS["FunctionParent"];
const PUREISH_TYPES = exports.PUREISH_TYPES = _index.FLIPPED_ALIAS_KEYS["Pureish"];
const DECLARATION_TYPES = exports.DECLARATION_TYPES = _index.FLIPPED_ALIAS_KEYS["Declaration"];
const FUNCTIONPARAMETER_TYPES = exports.FUNCTIONPARAMETER_TYPES = _index.FLIPPED_ALIAS_KEYS["FunctionParameter"];
const PATTERNLIKE_TYPES = exports.PATTERNLIKE_TYPES = _index.FLIPPED_ALIAS_KEYS["PatternLike"];
const LVAL_TYPES = exports.LVAL_TYPES = _index.FLIPPED_ALIAS_KEYS["LVal"];
const TSENTITYNAME_TYPES = exports.TSENTITYNAME_TYPES = _index.FLIPPED_ALIAS_KEYS["TSEntityName"];
const LITERAL_TYPES = exports.LITERAL_TYPES = _index.FLIPPED_ALIAS_KEYS["Literal"];
const IMMUTABLE_TYPES = exports.IMMUTABLE_TYPES = _index.FLIPPED_ALIAS_KEYS["Immutable"];
const USERWHITESPACABLE_TYPES = exports.USERWHITESPACABLE_TYPES = _index.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
const METHOD_TYPES = exports.METHOD_TYPES = _index.FLIPPED_ALIAS_KEYS["Method"];
const OBJECTMEMBER_TYPES = exports.OBJECTMEMBER_TYPES = _index.FLIPPED_ALIAS_KEYS["ObjectMember"];
const PROPERTY_TYPES = exports.PROPERTY_TYPES = _index.FLIPPED_ALIAS_KEYS["Property"];
const UNARYLIKE_TYPES = exports.UNARYLIKE_TYPES = _index.FLIPPED_ALIAS_KEYS["UnaryLike"];
const PATTERN_TYPES = exports.PATTERN_TYPES = _index.FLIPPED_ALIAS_KEYS["Pattern"];
const CLASS_TYPES = exports.CLASS_TYPES = _index.FLIPPED_ALIAS_KEYS["Class"];
const IMPORTOREXPORTDECLARATION_TYPES = exports.IMPORTOREXPORTDECLARATION_TYPES = _index.FLIPPED_ALIAS_KEYS["ImportOrExportDeclaration"];
const EXPORTDECLARATION_TYPES = exports.EXPORTDECLARATION_TYPES = _index.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
const MODULESPECIFIER_TYPES = exports.MODULESPECIFIER_TYPES = _index.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
const ACCESSOR_TYPES = exports.ACCESSOR_TYPES = _index.FLIPPED_ALIAS_KEYS["Accessor"];
const PRIVATE_TYPES = exports.PRIVATE_TYPES = _index.FLIPPED_ALIAS_KEYS["Private"];
const FLOW_TYPES = exports.FLOW_TYPES = _index.FLIPPED_ALIAS_KEYS["Flow"];
const FLOWTYPE_TYPES = exports.FLOWTYPE_TYPES = _index.FLIPPED_ALIAS_KEYS["FlowType"];
const FLOWBASEANNOTATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = _index.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
const FLOWDECLARATION_TYPES = exports.FLOWDECLARATION_TYPES = _index.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
const FLOWPREDICATE_TYPES = exports.FLOWPREDICATE_TYPES = _index.FLIPPED_ALIAS_KEYS["FlowPredicate"];
const ENUMBODY_TYPES = exports.ENUMBODY_TYPES = _index.FLIPPED_ALIAS_KEYS["EnumBody"];
const ENUMMEMBER_TYPES = exports.ENUMMEMBER_TYPES = _index.FLIPPED_ALIAS_KEYS["EnumMember"];
const JSX_TYPES = exports.JSX_TYPES = _index.FLIPPED_ALIAS_KEYS["JSX"];
const MISCELLANEOUS_TYPES = exports.MISCELLANEOUS_TYPES = _index.FLIPPED_ALIAS_KEYS["Miscellaneous"];
const TYPESCRIPT_TYPES = exports.TYPESCRIPT_TYPES = _index.FLIPPED_ALIAS_KEYS["TypeScript"];
const TSTYPEELEMENT_TYPES = exports.TSTYPEELEMENT_TYPES = _index.FLIPPED_ALIAS_KEYS["TSTypeElement"];
const TSTYPE_TYPES = exports.TSTYPE_TYPES = _index.FLIPPED_ALIAS_KEYS["TSType"];
const TSBASETYPE_TYPES = exports.TSBASETYPE_TYPES = _index.FLIPPED_ALIAS_KEYS["TSBaseType"];
const MODULEDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = IMPORTOREXPORTDECLARATION_TYPES;
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_K","2":"_I"},C:{"1":"_IM","2":"_rL"},D:{"1":"_sN","2":"_9H"},E:{"1":"_JB","2":"_RB"},F:{"1":"_8F","2":"_4B _sB _O"},G:{"1":"_9","2":"_iB"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_9F","2":"_nF"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"ME","2":"LE"}},B:5,C:"prefers-reduced-motion media query",D:true};
@@ -0,0 +1,7 @@
import Options from '../../Options';
import { MatchEstimated } from '../../types';
declare const _default: (options: Options, match: MatchEstimated) => {
warning: string | null;
suggestions: string[];
} | null;
export default _default;
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _arrayWithHoles;
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}
//# sourceMappingURL=arrayWithHoles.js.map
@@ -0,0 +1 @@
{"version":3,"file":"git-compare-arrows.js","sources":["../../../src/icons/git-compare-arrows.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name GitCompareArrows\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSI1IiBjeT0iNiIgcj0iMyIgLz4KICA8cGF0aCBkPSJNMTIgNmg1YTIgMiAwIDAgMSAyIDJ2NyIgLz4KICA8cGF0aCBkPSJtMTUgOS0zLTMgMy0zIiAvPgogIDxjaXJjbGUgY3g9IjE5IiBjeT0iMTgiIHI9IjMiIC8+CiAgPHBhdGggZD0iTTEyIDE4SDdhMiAyIDAgMCAxLTItMlY5IiAvPgogIDxwYXRoIGQ9Im05IDE1IDMgMy0zIDMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/git-compare-arrows\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst GitCompareArrows = createLucideIcon('GitCompareArrows', [\n ['circle', { cx: '5', cy: '6', r: '3', key: '1qnov2' }],\n ['path', { d: 'M12 6h5a2 2 0 0 1 2 2v7', key: '1yj91y' }],\n ['path', { d: 'm15 9-3-3 3-3', key: '1lwv8l' }],\n ['circle', { cx: '19', cy: '18', r: '3', key: '1qljk2' }],\n ['path', { d: 'M12 18H7a2 2 0 0 1-2-2V9', key: '16sdep' }],\n ['path', { d: 'm9 15 3 3-3 3', key: '1m3kbl' }],\n]);\n\nexport default GitCompareArrows;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAmB,iBAAiB,kBAAoB,CAAA,CAAA,CAAA;AAAA,CAC5D,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAA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AC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,UAAU,CAAC,MAAc,EAAE,OAAwB;QACrD,OACI,IAAI,CAAC,OAGR,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACJ;AA/RD,0DA+RC"}
@@ -0,0 +1,34 @@
import { decode as b64u } from './base64url.js';
import { decoder } from '../lib/buffer_utils.js';
import { isObject } from '../lib/type_checks.js';
export function decodeProtectedHeader(token) {
let protectedB64u;
if (typeof token === 'string') {
const parts = token.split('.');
if (parts.length === 3 || parts.length === 5) {
;
[protectedB64u] = parts;
}
}
else if (typeof token === 'object' && token) {
if ('protected' in token) {
protectedB64u = token.protected;
}
else {
throw new TypeError('Token does not contain a Protected Header');
}
}
try {
if (typeof protectedB64u !== 'string' || !protectedB64u) {
throw new Error();
}
const result = JSON.parse(decoder.decode(b64u(protectedB64u)));
if (!isObject(result)) {
throw new Error();
}
return result;
}
catch {
throw new TypeError('Invalid Token or Protected Header formatting');
}
}
@@ -0,0 +1,764 @@
/**
* utils.ts 12.6.0
* Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license
*/
// /**
// * Checks for obsolete method names and provides deprecation warnings.
// * Creates a wrapper function that logs a deprecation warning when called.
// *
// * @param self the object context to apply the function to
// * @param f the new function to call
// * @param oldName the deprecated method name
// * @param newName the new method name to use instead
// * @param rev the version when the deprecation was introduced
// * @returns a wrapper function that warns about deprecation
// */
// eslint-disable-next-line
// export function obsolete(self, f, oldName: string, newName: string, rev: string): (...args: any[]) => any {
// const wrapper = (...args) => {
// console.warn('gridstack.js: Function `' + oldName + '` is deprecated in ' + rev + ' and has been replaced ' +
// 'with `' + newName + '`. It will be **removed** in a future release');
// return f.apply(self, args);
// }
// wrapper.prototype = f.prototype;
// return wrapper;
// }
// /**
// * Checks for obsolete grid options and migrates them to new names.
// * Automatically copies old option values to new option names and shows deprecation warnings.
// *
// * @param opts the options object to check and migrate
// * @param oldName the deprecated option name
// * @param newName the new option name to use instead
// * @param rev the version when the deprecation was introduced
// */
// export function obsoleteOpts(opts: GridStackOptions, oldName: string, newName: string, rev: string): void {
// if (opts[oldName] !== undefined) {
// opts[newName] = opts[oldName];
// console.warn('gridstack.js: Option `' + oldName + '` is deprecated in ' + rev + ' and has been replaced with `' +
// newName + '`. It will be **removed** in a future release');
// }
// }
// /**
// * Checks for obsolete grid options that have been completely removed.
// * Shows deprecation warnings for options that are no longer supported.
// *
// * @param opts the options object to check
// * @param oldName the removed option name
// * @param rev the version when the option was removed
// * @param info additional information about the removal
// */
// export function obsoleteOptsDel(opts: GridStackOptions, oldName: string, rev: string, info: string): void {
// if (opts[oldName] !== undefined) {
// console.warn('gridstack.js: Option `' + oldName + '` is deprecated in ' + rev + info);
// }
// }
// /**
// * Checks for obsolete HTML element attributes and migrates them.
// * Automatically copies old attribute values to new attribute names and shows deprecation warnings.
// *
// * @param el the HTML element to check and migrate
// * @param oldName the deprecated attribute name
// * @param newName the new attribute name to use instead
// * @param rev the version when the deprecation was introduced
// */
// export function obsoleteAttr(el: HTMLElement, oldName: string, newName: string, rev: string): void {
// const oldAttr = el.getAttribute(oldName);
// if (oldAttr !== null) {
// el.setAttribute(newName, oldAttr);
// console.warn('gridstack.js: attribute `' + oldName + '`=' + oldAttr + ' is deprecated on this object in ' + rev + ' and has been replaced with `' +
// newName + '`. It will be **removed** in a future release');
// }
// }
/**
* Collection of utility methods used throughout GridStack.
* These are general-purpose helper functions for DOM manipulation,
* positioning calculations, object operations, and more.
*/
export class Utils {
/**
* Convert a potential selector into an actual list of HTML elements.
* Supports CSS selectors, element references, and special ID handling.
*
* @param els selector string, HTMLElement, or array of elements
* @param root optional root element to search within (defaults to document, useful for shadow DOM)
* @returns array of HTML elements matching the selector
*
* @example
* const elements = Utils.getElements('.grid-item');
* const byId = Utils.getElements('#myWidget');
* const fromShadow = Utils.getElements('.item', shadowRoot);
*/
static getElements(els, root = document) {
if (typeof els === 'string') {
const doc = ('getElementById' in root) ? root : undefined;
// Note: very common for people use to id='1,2,3' which is only legal as HTML5 id, but not CSS selectors
// so if we start with a number, assume it's an id and just return that one item...
// see https://github.com/gridstack/gridstack.js/issues/2234#issuecomment-1523796562
if (doc && !isNaN(+els[0])) { // start with digit
const el = doc.getElementById(els);
return el ? [el] : [];
}
let list = root.querySelectorAll(els);
if (!list.length && els[0] !== '.' && els[0] !== '#') {
// see if mean to be a class
list = root.querySelectorAll('.' + els);
// else if mean to be an id
if (!list.length)
list = root.querySelectorAll('#' + els);
// else see if gs-id attribute
if (!list.length) {
const el = root.querySelector(`[gs-id="${els}"]`);
return el ? [el] : [];
}
}
return Array.from(list);
}
return [els];
}
/**
* Convert a potential selector into a single HTML element.
* Similar to getElements() but returns only the first match.
*
* @param els selector string or HTMLElement
* @param root optional root element to search within (defaults to document)
* @returns the first HTML element matching the selector, or null if not found
*
* @example
* const element = Utils.getElement('#myWidget');
* const first = Utils.getElement('.grid-item');
*/
static getElement(els, root = document) {
if (typeof els === 'string') {
const doc = ('getElementById' in root) ? root : undefined;
if (!els.length)
return null;
if (doc && els[0] === '#') {
return doc.getElementById(els.substring(1));
}
if (els[0] === '#' || els[0] === '.' || els[0] === '[') {
return root.querySelector(els);
}
// if we start with a digit, assume it's an id (error calling querySelector('#1')) as class are not valid CSS
if (doc && !isNaN(+els[0])) { // start with digit
return doc.getElementById(els);
}
// finally try string, then id, then class
let el = root.querySelector(els);
if (doc && !el) {
el = doc.getElementById(els);
}
if (!el) {
el = root.querySelector('.' + els);
}
return el;
}
return els;
}
/**
* Check if a widget should be lazy loaded based on node or grid settings.
*
* @param n the grid node to check
* @returns true if the item should be lazy loaded
*
* @example
* if (Utils.lazyLoad(node)) {
* // Set up intersection observer for lazy loading
* }
*/
static lazyLoad(n) {
return n.lazyLoad || n.grid?.opts?.lazyLoad && n.lazyLoad !== false;
}
/**
* Create a div element with the specified CSS classes.
*
* @param classes array of CSS class names to add
* @param parent optional parent element to append the div to
* @returns the created div element
*
* @example
* const div = Utils.createDiv(['grid-item', 'draggable']);
* const nested = Utils.createDiv(['content'], parentDiv);
*/
static createDiv(classes, parent) {
const el = document.createElement('div');
classes.forEach(c => { if (c)
el.classList.add(c); });
parent?.appendChild(el);
return el;
}
/**
* Check if a widget should resize to fit its content.
*
* @param n the grid node to check (can be undefined)
* @param strict if true, only returns true for explicit sizeToContent:true (not numbers)
* @returns true if the widget should resize to content
*
* @example
* if (Utils.shouldSizeToContent(node)) {
* // Trigger content-based resizing
* }
*/
static shouldSizeToContent(n, strict = false) {
return n?.grid && (strict ?
(n.sizeToContent === true || (n.grid.opts.sizeToContent === true && n.sizeToContent === undefined)) :
(!!n.sizeToContent || (n.grid.opts.sizeToContent && n.sizeToContent !== false)));
}
/**
* Check if two grid positions overlap/intersect.
*
* @param a first position with x, y, w, h properties
* @param b second position with x, y, w, h properties
* @returns true if the positions overlap
*
* @example
* const overlaps = Utils.isIntercepted(
* {x: 0, y: 0, w: 2, h: 1},
* {x: 1, y: 0, w: 2, h: 1}
* ); // true - they overlap
*/
static isIntercepted(a, b) {
return !(a.y >= b.y + b.h || a.y + a.h <= b.y || a.x + a.w <= b.x || a.x >= b.x + b.w);
}
/**
* Check if two grid positions are touching (edges or corners).
*
* @param a first position
* @param b second position
* @returns true if the positions are touching
*
* @example
* const touching = Utils.isTouching(
* {x: 0, y: 0, w: 2, h: 1},
* {x: 2, y: 0, w: 1, h: 1}
* ); // true - they share an edge
*/
static isTouching(a, b) {
return Utils.isIntercepted(a, { x: b.x - 0.5, y: b.y - 0.5, w: b.w + 1, h: b.h + 1 });
}
/**
* Calculate the overlapping area between two grid positions.
*
* @param a first position
* @param b second position
* @returns the area of overlap (0 if no overlap)
*
* @example
* const overlap = Utils.areaIntercept(
* {x: 0, y: 0, w: 3, h: 2},
* {x: 1, y: 0, w: 3, h: 2}
* ); // returns 4 (2x2 overlap)
*/
static areaIntercept(a, b) {
const x0 = (a.x > b.x) ? a.x : b.x;
const x1 = (a.x + a.w < b.x + b.w) ? a.x + a.w : b.x + b.w;
if (x1 <= x0)
return 0; // no overlap
const y0 = (a.y > b.y) ? a.y : b.y;
const y1 = (a.y + a.h < b.y + b.h) ? a.y + a.h : b.y + b.h;
if (y1 <= y0)
return 0; // no overlap
return (x1 - x0) * (y1 - y0);
}
/**
* Calculate the total area of a grid position.
*
* @param a position with width and height
* @returns the total area (width * height)
*
* @example
* const area = Utils.area({x: 0, y: 0, w: 3, h: 2}); // returns 6
*/
static area(a) {
return a.w * a.h;
}
/**
* Sort an array of grid nodes by position (y first, then x).
*
* @param nodes array of nodes to sort
* @param dir sort direction: 1 for ascending (top-left first), -1 for descending
* @returns the sorted array (modifies original)
*
* @example
* const sorted = Utils.sort(nodes); // Sort top-left to bottom-right
* const reverse = Utils.sort(nodes, -1); // Sort bottom-right to top-left
*/
static sort(nodes, dir = 1) {
const und = 10000;
return nodes.sort((a, b) => {
const diffY = dir * ((a.y ?? und) - (b.y ?? und));
if (diffY === 0)
return dir * ((a.x ?? und) - (b.x ?? und));
return diffY;
});
}
/**
* Find a grid node by its ID.
*
* @param nodes array of nodes to search
* @param id the ID to search for
* @returns the node with matching ID, or undefined if not found
*
* @example
* const node = Utils.find(nodes, 'widget-1');
* if (node) console.log('Found node at:', node.x, node.y);
*/
static find(nodes, id) {
return id ? nodes.find(n => n.id === id) : undefined;
}
/**
* Convert various value types to boolean.
* Handles strings like 'false', 'no', '0' as false.
*
* @param v value to convert
* @returns boolean representation
*
* @example
* Utils.toBool('true'); // true
* Utils.toBool('false'); // false
* Utils.toBool('no'); // false
* Utils.toBool('1'); // true
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
static toBool(v) {
if (typeof v === 'boolean') {
return v;
}
if (typeof v === 'string') {
v = v.toLowerCase();
return !(v === '' || v === 'no' || v === 'false' || v === '0');
}
return Boolean(v);
}
/**
* Convert a string value to a number, handling null and empty strings.
*
* @param value string or null value to convert
* @returns number value, or undefined for null/empty strings
*
* @example
* Utils.toNumber('42'); // 42
* Utils.toNumber(''); // undefined
* Utils.toNumber(null); // undefined
*/
static toNumber(value) {
return (value === null || value.length === 0) ? undefined : Number(value);
}
/**
* Parse a height value with units into numeric value and unit string.
* Supports px, em, rem, vh, vw, %, cm, mm units.
*
* @param val height value as number or string with units
* @returns object with h (height) and unit properties
*
* @example
* Utils.parseHeight('100px'); // {h: 100, unit: 'px'}
* Utils.parseHeight('2rem'); // {h: 2, unit: 'rem'}
* Utils.parseHeight(50); // {h: 50, unit: 'px'}
*/
static parseHeight(val) {
let h;
let unit = 'px';
if (typeof val === 'string') {
if (val === 'auto' || val === '')
h = 0;
else {
const match = val.match(/^(-[0-9]+\.[0-9]+|[0-9]*\.[0-9]+|-[0-9]+|[0-9]+)(px|em|rem|vh|vw|%|cm|mm)?$/);
if (!match) {
throw new Error(`Invalid height val = ${val}`);
}
unit = match[2] || 'px';
h = parseFloat(match[1]);
}
}
else {
h = val;
}
return { h, unit };
}
/**
* Copy unset fields from source objects to target object (shallow merge with defaults).
* Similar to Object.assign but only sets undefined/null fields.
*
* @param target the object to copy defaults into
* @param sources one or more source objects to copy defaults from
* @returns the modified target object
*
* @example
* const config = { width: 100 };
* Utils.defaults(config, { width: 200, height: 50 });
* // config is now { width: 100, height: 50 }
*/
// eslint-disable-next-line
static defaults(target, ...sources) {
sources.forEach(source => {
for (const key in source) {
if (!source.hasOwnProperty(key))
return;
if (target[key] === null || target[key] === undefined) {
target[key] = source[key];
}
else if (typeof source[key] === 'object' && typeof target[key] === 'object') {
// property is an object, recursively add it's field over... #1373
Utils.defaults(target[key], source[key]);
}
}
});
return target;
}
/**
* Compare two objects for equality (shallow comparison).
* Checks if objects have the same fields and values at one level deep.
*
* @param a first object to compare
* @param b second object to compare
* @returns true if objects have the same values
*
* @example
* Utils.same({x: 1, y: 2}, {x: 1, y: 2}); // true
* Utils.same({x: 1}, {x: 1, y: 2}); // false
*/
static same(a, b) {
if (typeof a !== 'object')
return a == b;
if (typeof a !== typeof b)
return false;
// else we have object, check just 1 level deep for being same things...
if (Object.keys(a).length !== Object.keys(b).length)
return false;
for (const key in a) {
if (a[key] !== b[key])
return false;
}
return true;
}
/**
* Copy position and size properties from one widget to another.
* Copies x, y, w, h and optionally min/max constraints.
*
* @param a target widget to copy to
* @param b source widget to copy from
* @param doMinMax if true, also copy min/max width/height constraints
* @returns the target widget (a)
*
* @example
* Utils.copyPos(widget1, widget2); // Copy position/size
* Utils.copyPos(widget1, widget2, true); // Also copy constraints
*/
static copyPos(a, b, doMinMax = false) {
if (b.x !== undefined)
a.x = b.x;
if (b.y !== undefined)
a.y = b.y;
if (b.w !== undefined)
a.w = b.w;
if (b.h !== undefined)
a.h = b.h;
if (doMinMax) {
if (b.minW)
a.minW = b.minW;
if (b.minH)
a.minH = b.minH;
if (b.maxW)
a.maxW = b.maxW;
if (b.maxH)
a.maxH = b.maxH;
}
return a;
}
/** true if a and b has same size & position */
static samePos(a, b) {
return a && b && a.x === b.x && a.y === b.y && (a.w || 1) === (b.w || 1) && (a.h || 1) === (b.h || 1);
}
/** given a node, makes sure it's min/max are valid */
static sanitizeMinMax(node) {
// remove 0, undefine, null
if (!node.minW) {
delete node.minW;
}
if (!node.minH) {
delete node.minH;
}
if (!node.maxW) {
delete node.maxW;
}
if (!node.maxH) {
delete node.maxH;
}
}
/** removes field from the first object if same as the second objects (like diffing) and internal '_' for saving */
static removeInternalAndSame(a, b) {
if (typeof a !== 'object' || typeof b !== 'object')
return;
// skip arrays as we don't know how to hydrate them (unlike object spread operator)
if (Array.isArray(a) || Array.isArray(b))
return;
for (let key in a) {
const aVal = a[key];
const bVal = b[key];
if (key[0] === '_' || aVal === bVal) {
delete a[key];
}
else if (aVal && typeof aVal === 'object' && bVal !== undefined) {
Utils.removeInternalAndSame(aVal, bVal);
if (!Object.keys(aVal).length) {
delete a[key];
}
}
}
}
/** removes internal fields '_' and default values for saving */
static removeInternalForSave(n, removeEl = true) {
for (let key in n) {
if (key[0] === '_' || n[key] === null || n[key] === undefined)
delete n[key];
}
delete n.grid;
if (removeEl)
delete n.el;
// delete default values (will be re-created on read)
if (!n.autoPosition)
delete n.autoPosition;
if (!n.noResize)
delete n.noResize;
if (!n.noMove)
delete n.noMove;
if (!n.locked)
delete n.locked;
if (n.w === 1 || n.w === n.minW)
delete n.w;
if (n.h === 1 || n.h === n.minH)
delete n.h;
}
/** return the closest parent (or itself) matching the given class */
// static closestUpByClass(el: HTMLElement, name: string): HTMLElement {
// while (el) {
// if (el.classList.contains(name)) return el;
// el = el.parentElement
// }
// return null;
// }
/** delay calling the given function for given delay, preventing new calls from happening while waiting */
static throttle(func, delay) {
let isWaiting = false;
return (...args) => {
if (!isWaiting) {
isWaiting = true;
setTimeout(() => { func(...args); isWaiting = false; }, delay);
}
};
}
static removePositioningStyles(el) {
const style = el.style;
if (style.position) {
style.removeProperty('position');
}
if (style.left) {
style.removeProperty('left');
}
if (style.top) {
style.removeProperty('top');
}
if (style.width) {
style.removeProperty('width');
}
if (style.height) {
style.removeProperty('height');
}
}
/** @internal returns the passed element if vertically scrollable, else the closest parent that will, up to the entire document scrolling element */
static getScrollElement(el) {
if (!el)
return document.scrollingElement || document.documentElement; // IE support
const overflowY = getComputedStyle(el).overflowY;
if ((overflowY === 'auto' || overflowY === 'scroll') && el.scrollHeight > el.clientHeight) {
return el;
}
else {
return Utils.getScrollElement(el.parentElement);
}
}
/**
* @internal Function used to scroll the page.
*
* @param event `MouseEvent` that triggers the resize
* @param el `HTMLElement` that's being resized
* @param distance Distance from the V edges to start scrolling
*/
static updateScrollResize(event, el, distance) {
const scrollEl = Utils.getScrollElement(el);
const height = scrollEl.clientHeight;
// #1727 event.clientY is relative to viewport, so must compare this against position of scrollEl getBoundingClientRect().top
// #1745 Special situation if scrollEl is document 'html': here browser spec states that
// clientHeight is height of viewport, but getBoundingClientRect() is rectangle of html element;
// this discrepancy arises because in reality scrollbar is attached to viewport, not html element itself.
const offsetTop = (scrollEl === Utils.getScrollElement()) ? 0 : scrollEl.getBoundingClientRect().top;
const pointerPosY = event.clientY - offsetTop;
const top = pointerPosY < distance;
const bottom = pointerPosY > height - distance;
if (top) {
// This also can be done with a timeout to keep scrolling while the mouse is
// in the scrolling zone. (will have smoother behavior)
scrollEl.scrollBy({ behavior: 'smooth', top: pointerPosY - distance });
}
else if (bottom) {
scrollEl.scrollBy({ behavior: 'smooth', top: distance - (height - pointerPosY) });
}
}
/** single level clone, returning a new object with same top fields. This will share sub objects and arrays */
static clone(obj) {
if (obj === null || obj === undefined || typeof (obj) !== 'object') {
return obj;
}
// return Object.assign({}, obj);
if (obj instanceof Array) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return [...obj];
}
return { ...obj };
}
/**
* Recursive clone version that returns a full copy, checking for nested objects and arrays ONLY.
* Note: this will use as-is any key starting with double __ (and not copy inside) some lib have circular dependencies.
*/
static cloneDeep(obj) {
// list of fields we will skip during cloneDeep (nested objects, other internal)
const skipFields = ['parentGrid', 'el', 'grid', 'subGrid', 'engine'];
// return JSON.parse(JSON.stringify(obj)); // doesn't work with date format ?
const ret = Utils.clone(obj);
for (const key in ret) {
// NOTE: we don't support function/circular dependencies so skip those properties for now...
if (ret.hasOwnProperty(key) && typeof (ret[key]) === 'object' && key.substring(0, 2) !== '__' && !skipFields.find(k => k === key)) {
ret[key] = Utils.cloneDeep(obj[key]);
}
}
return ret;
}
/** deep clone the given HTML node, removing teh unique id field */
static cloneNode(el) {
const node = el.cloneNode(true);
node.removeAttribute('id');
return node;
}
static appendTo(el, parent) {
let parentNode;
if (typeof parent === 'string') {
parentNode = Utils.getElement(parent);
}
else {
parentNode = parent;
}
if (parentNode) {
parentNode.appendChild(el);
}
}
// public static setPositionRelative(el: HTMLElement): void {
// if (!(/^(?:r|a|f)/).test(getComputedStyle(el).position)) {
// el.style.position = "relative";
// }
// }
static addElStyles(el, styles) {
if (styles instanceof Object) {
for (const s in styles) {
if (styles.hasOwnProperty(s)) {
if (Array.isArray(styles[s])) {
// support fallback value
styles[s].forEach(val => {
el.style[s] = val;
});
}
else {
el.style[s] = styles[s];
}
}
}
}
}
static initEvent(e, info) {
const evt = { type: info.type };
const obj = {
button: 0,
which: 0,
buttons: 1,
bubbles: true,
cancelable: true,
target: info.target ? info.target : e.target
};
['altKey', 'ctrlKey', 'metaKey', 'shiftKey'].forEach(p => evt[p] = e[p]); // keys
['pageX', 'pageY', 'clientX', 'clientY', 'screenX', 'screenY'].forEach(p => evt[p] = e[p]); // point info
return { ...evt, ...obj };
}
/** copies the MouseEvent (or convert Touch) properties and sends it as another event to the given target */
static simulateMouseEvent(e, simulatedType, target) {
const me = e;
const simulatedEvent = new MouseEvent(simulatedType, {
bubbles: true,
composed: true,
cancelable: true,
view: window,
detail: 1,
screenX: e.screenX,
screenY: e.screenY,
clientX: e.clientX,
clientY: e.clientY,
ctrlKey: me.ctrlKey ?? false,
altKey: me.altKey ?? false,
shiftKey: me.shiftKey ?? false,
metaKey: me.metaKey ?? false,
button: 0,
relatedTarget: e.target
});
(target || e.target).dispatchEvent(simulatedEvent);
}
/**
* defines an element that is used to get the offset and scale from grid transforms
* returns the scale and offsets from said element
*/
static getValuesFromTransformedElement(parent) {
const transformReference = document.createElement('div');
Utils.addElStyles(transformReference, {
opacity: '0',
position: 'fixed',
top: 0 + 'px',
left: 0 + 'px',
width: '1px',
height: '1px',
zIndex: '-999999',
});
parent.appendChild(transformReference);
const transformValues = transformReference.getBoundingClientRect();
parent.removeChild(transformReference);
transformReference.remove();
return {
xScale: 1 / transformValues.width,
yScale: 1 / transformValues.height,
xOffset: transformValues.left,
yOffset: transformValues.top,
};
}
/** swap the given object 2 field values */
static swap(o, a, b) {
if (!o)
return;
const tmp = o[a];
o[a] = o[b];
o[b] = tmp;
}
/** returns true if event is inside the given element rectangle */
// Note: Safari Mac has null event.relatedTarget which causes #1684 so check if DragEvent is inside the coordinates instead
// Utils.el.contains(event.relatedTarget as HTMLElement)
// public static inside(e: MouseEvent, el: HTMLElement): boolean {
// // srcElement, toElement, target: all set to placeholder when leaving simple grid, so we can't use that (Chrome)
// const target: HTMLElement = e.relatedTarget || (e as any).fromElement;
// if (!target) {
// const { bottom, left, right, top } = el.getBoundingClientRect();
// return (e.x < right && e.x > left && e.y < bottom && e.y > top);
// }
// return el.contains(target);
// }
/** true if the item can be rotated (checking for prop, not space available) */
static canBeRotated(n) {
return !(!n || n.w === n.h || n.locked || n.noResize || n.grid?.opts.disableResize || (n.minW && n.minW === n.maxW) || (n.minH && n.minH === n.maxH));
}
}
//# sourceMappingURL=utils.js.map
@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const FileVolume2 = createLucideIcon("FileVolume2", [
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
["path", { d: "M8 15h.01", key: "a7atzg" }],
["path", { d: "M11.5 13.5a2.5 2.5 0 0 1 0 3", key: "1fccat" }],
["path", { d: "M15 12a5 5 0 0 1 0 6", key: "ps46cm" }]
]);
export { FileVolume2 as default };
//# sourceMappingURL=file-volume-2.js.map
@@ -0,0 +1,44 @@
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.estree=e()}})(function(){"use strict";var Co=Object.defineProperty;var tc=Object.getOwnPropertyDescriptor;var rc=Object.getOwnPropertyNames;var nc=Object.prototype.hasOwnProperty;var Fo=(e,t)=>{for(var r in t)Co(e,r,{get:t[r],enumerable:!0})},oc=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of rc(t))!nc.call(e,o)&&o!==r&&Co(e,o,{get:()=>t[o],enumerable:!(n=tc(t,o))||n.enumerable});return e};var ic=e=>oc(Co({},"__esModule",{value:!0}),e);var dy={};Fo(dy,{languages:()=>Ey,options:()=>$p,printers:()=>yy});var _i=[{name:"JavaScript",type:"programming",aceMode:"javascript",extensions:[".js","._js",".bones",".cjs",".es",".es6",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".start.frag",".end.frag",".wxs"],filenames:["Jakefile","start.frag","end.frag"],tmScope:"source.js",aliases:["js","node"],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["bun","chakra","d8","deno","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"],linguistLanguageId:183},{name:"Flow",type:"programming",aceMode:"javascript",extensions:[".js.flow"],filenames:[],tmScope:"source.js",aliases:[],codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",interpreters:["bun","chakra","d8","deno","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"],linguistLanguageId:183},{name:"JSX",type:"programming",aceMode:"javascript",extensions:[".jsx"],filenames:void 0,tmScope:"source.js.jsx",aliases:void 0,codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript",linguistLanguageId:183},{name:"TypeScript",type:"programming",aceMode:"typescript",extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aliases:["ts"],codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",interpreters:["bun","deno","ts-node","tsx"],parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"],linguistLanguageId:378},{name:"TSX",type:"programming",aceMode:"tsx",extensions:[".tsx"],tmScope:"source.tsx",aliases:["typescriptreact"],codemirrorMode:"jsx",codemirrorMimeType:"text/typescript-jsx",group:"TypeScript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"],linguistLanguageId:94901924}];var bi={};Fo(bi,{estree:()=>Bi});function sc(e){return Array.isArray(e)&&e.length>0}var j=sc;var uc=()=>{},Re=uc;function B(e){let t=new Set(e);return r=>t.has(r?.type)}var $t=(e,t)=>(r,n,...o)=>r|1&&n==null?void 0:(t.call(n)??n[e]).apply(n,o);function ac(e){return this[e<0?this.length+e:e]}var pc=$t("at",function(){if(Array.isArray(this)||typeof this=="string")return ac}),w=pc;function Z(e,t,r){if(!e.has(t)){let n=r(t);e.set(t,n)}return e.get(t)}function cc(e){let t=[];return e.this&&t.push(e.this),t.push(...e.params),e.rest&&t.push(e.rest),t}var lc=new WeakMap;function ee(e){return Z(lc,e,cc)}function Ni(e,t){let{node:r}=e,n=0,o=()=>t(e,n++);r.this&&e.call(o,"this"),e.each(o,"params"),r.rest&&e.call(o,"rest")}function ji(e){if(e.rest)return!0;let t=ee(e);return w(0,t,-1)?.type==="RestElement"}var vi=e=>e?.type==="TSAsExpression"&&e.typeAnnotation.type==="TSTypeReference"&&e.typeAnnotation.typeName.type==="Identifier"&&e.typeAnnotation.typeName.name==="const";function Qt({node:e,parent:t}){return e?.type!=="EmptyStatement"?!1:t.type==="IfStatement"?t.consequent===e||t.alternate===e:t.type==="DoWhileStatement"||t.type==="ForInStatement"||t.type==="ForOfStatement"||t.type==="ForStatement"||t.type==="LabeledStatement"||t.type==="WithStatement"||t.type==="WhileStatement"?t.body===e:!1}function $e(e){return e.method&&e.kind==="init"||e.kind==="get"||e.kind==="set"}var Ao=e=>Number.isSafeInteger(e)&&e>=0;function It(e){return e.range?.[1]??e.end}function b(e){let t=e.range?.[0]??e.start,r=(e.declaration?.decorators??e.decorators)?.[0];return r?Math.min(b(r),t):t}var mc=5,fc=8,Dc=8,Ri=e=>t=>t.label?S(t.label):b(t)+e,yc=e=>e.__contentEnd??It(e),Wi=["ExpressionStatement","Directive","ImportDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ReturnStatement","ThrowStatement","DoWhileStatement"],Ec=new Map([["BreakStatement",Ri(mc)],["ContinueStatement",Ri(fc)],["DebuggerStatement",e=>b(e)+Dc],["VariableDeclaration",e=>S(w(0,e.declarations,-1))],...Wi.map(e=>[e,yc])]),Ji=B(Wi),Pr=e=>{if(Ji(e)&&eLine truncated
`||e==="\r"||e==="\u2028"||e==="\u2029";function Sc(e,t,r){if(t===!1)return!1;let n=!!r?.backwards,o=e.charAt(t);if(n){if(e.charAt(t-1)==="\r"&&o===`
`)return t-2;if(zi(o))return t-1}else{if(o==="\r"&&e.charAt(t+1)===`
`)return t+2;if(zi(o))return t+1}return t}var pt=Sc;function Bc(e,t){return t===!1?!1:e.charAt(t)==="/"&&e.charAt(t+1)==="/"?Qi(e,t):t}var tr=Bc;function bc(e,t){let r=null,n=t;for(;n!==r;)r=n,n=at(e,n),n=er(e,n),n=tr(e,n),n=pt(e,n);return n}var Rt=bc;function Pc(e,t){let r=Rt(e,t);return r===!1?"":e.charAt(r)}var Je=Pc;function Ic(e,t,r={}){let n=at(e,r.backwards?t-1:t,r),o=pt(e,n,r);return n!==o}var J=Ic;function kc(e,t,r){for(let n=t;n<r;++n)if(e.charAt(n)===`
`)return!0;return!1}var te=kc;var wc=new WeakMap;function Lc(e){let t;return e.type==="ImportExpression"||e.type==="TSImportType"?(t=[e.source],e.options&&t.push(e.options)):e.type==="TSExternalModuleReference"?t=[e.expression]:t=e.arguments,t}function se(e){return Z(wc,e,Lc)}function kr(e,t){let{node:r}=e;r.type==="ImportExpression"||r.type==="TSImportType"?(e.call(()=>t(e,0),"source"),r.options&&e.call(()=>t(e,1),"options")):r.type==="TSExternalModuleReference"?e.call(()=>t(e,0),"expression"):e.each(t,"arguments")}function ho(e,t){if(e.type==="ImportExpression"||e.type==="TSImportType"){if(t===0||t===(e.options?-2:-1))return["source"];if(e.options&&(t===1||t===-1))return["options"];throw new RangeError("Invalid argument index")}if(e.type==="TSExternalModuleReference"){if(t===0||t===-1)return["expression"]}else if(t<0&&(t=e.arguments.length+t),t>=0&&t<e.arguments.length)return["arguments",t];throw new RangeError("Invalid argument index")}var Zi=Symbol.for("comments");var Oc=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},Mc=$t("replaceAll",function(){if(typeof this=="string")return Oc}),V=Mc;function _c(e){return V(0,e,/[^\n]/g," ")}var es=_c;function Nc(e,t){for(let r of t){let n=b(r),o=S(r);e=e.slice(0,n)+es(e.slice(n,o))+e.slice(o)}return e}var jc=new WeakMap;function ce(e){let t=e[Zi];return Z(jc,t,r=>Nc(e.originalText,r))}function ts(e,t){let r=S(e)-1;if(t.originalText[r]===")")return r}function vc(e,t){if(ts(e,t)===void 0)return;let n=ce(t),o=S(e.typeArguments??e.callee),i=n.indexOf("(",o);if(i!==-1)return i}function rs(e,t,r){let n=ts(e,r);if(n===void 0||S(t)>n)return!1;let o=vc(e,r);return o===void 0?!1:b(t)>o}var le=B(["Block","CommentBlock","MultiLine"]),Le=B(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]);function Ge(e){return e?.type==="ObjectProperty"||e?.type==="Property"&&!$e(e)}function yt(e){return e.value.trim()==="prettier-ignore"&&!e.unignore}var Rc=new WeakMap;function rr(e){return Z(Rc,e,t=>le(t)&&t.value[0]==="*"&&/@(?:type|satisfies)\b/.test(t.value))}function $r({comment:e,enclosingNode:t,followingNode:r,options:n}){if((t?.type==="ForInStatement"||t?.type==="ForOfStatement"||t?.type==="ForStatement")&&r&&r===t.body){let o=ce(n).lastIndexOf(")",b(r));if(b(e)>o)return K(r,e),!0}return!1}var So=(e,t)=>le(e)&&!te(t,b(e),S(e)),wr=(e,t)=>Le(e)||So(e,t);function Qr(e,t){e.type==="BlockStatement"?nr(e,t):K(e,t)}function nr(e,t){let r=(e.body||e.properties).find(({type:n})=>n!=="EmptyStatement");r?K(r,t):ge(e,t)}function zr({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:o,options:i}){return r?.type!=="IfStatement"||!n?!1:Je(o,S(e))===")"?(X(t,e),!0):n===r.consequent?(K(n,e),!0):t===r.consequent&&n===r.alternate?Wc({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:o,options:i}):!1}function Wc({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:o,options:i}){let s=ce(i).indexOf("else",S(r.consequent));return b(e)>=s?(K(n,e),!0):!(t.type==="BlockStatement")&&wr(e,o)&&!te(o,S(t),b(e))?(X(t,e),!0):(ge(r,e),!0)}function Zr({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:o}){return r?.type==="SwitchStatement"&&r.cases.length===0&&!n&&t===r.discriminant&&Je(o,S(e))==="}"?(ge(r,e),!0):!1}function en({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:o}){return(r?.type==="WhileStatement"||r?.type==="WithStatement")&&n?Je(o,S(e))===")"?(X(t,e),!0):r.body===n?(K(n,e),!0):!1:!1}function Bo(e,{comment:t,text:r,options:n}){if(pe(e)&&So(t,r)&&!yt(t)){let i=ce(n).slice(S(t),b(e));return/^[ \t]*$/.test(i)}return!1}function bo(e,t){return K(Bo(e,t)?e.types[0]:e,t.comment),!0}function Jc(e){return[Po,Ds,ss,cs,Yc,zr,en,Zr,is,us,$r,zc,Zc,Io,ms,tl,as,ls,Hc,al,ko,wo,Es].some(t=>t(e))}function Gc(e){return[Po,qc,cs,ss,ms,zr,en,Zr,is,us,$r,ls,Qc,el,Io,fs,sl,ul,pl,ko,ml,ys,cl,wo].some(t=>t(e))}function Uc(e){return[Po,Ds,zr,en,Zr,$r,as,Io,fs,ko,Kc,Vc,ol,ys,wo,Es].some(t=>t(e))}function qc({comment:e,followingNode:t}){return t&&rr(e)?(K(t,e),!0):!1}function is({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return r?.type!=="TryStatement"&&r?.type!=="CatchClause"||!n?!1:r.type==="CatchClause"&&t?(X(t,e),!0):n.type==="BlockStatement"?(nr(n,e),!0):n.type==="TryStatement"?(Qr(n.finalizer,e),!0):n.type==="CatchClause"?(Qr(n.body,e),!0):!1}function Yc({comment:e,enclosingNode:t,followingNode:r}){return N(t)&&r?.type==="Identifier"?(K(t,e),!0):!1}function Hc({comment:e,enclosingNode:t,followingNode:r,options:n}){return!n.experimentalTernaries||!(t?.type==="ConditionalExpression"||Qe(t))?!1:r?.type==="ConditionalExpression"||Qe(r)?(ge(t,e),!0):!1}function ss({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:o,options:i}){let s=t&&!te(o,S(t),b(e));return(!t||!s)&&(r?.type==="ConditionalExpression"||Qe(r))&&n?i.experimentalTernaries&&r.alternate===n&&!(le(e)&&!te(i.originalText,b(e),S(e)))?(ge(r,e),!0):(K(n,e),!0):Line truncated
Expected it to be 'string' or 'object'.`;if(Xe(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=Ml([...cn].map(o=>`'${o}'`));return`Unexpected doc.type '${e.type}'.
Expected it to be ${n}.`}var Mo=class extends Error{name="InvalidDocError";constructor(t){super(_l(t)),this.doc=t}},Ot=Mo;var Os={};function Nl(e,t,r,n){let o=[e];for(;o.length>0;){let i=o.pop();if(i===Os){r(o.pop());continue}r&&o.push(i,Os);let s=Xe(i);if(!s)throw new Ot(i);if(t?.(i)!==!1)switch(s){case Me:case Ue:{let u=s===Me?i:i.parts;for(let a=u.length,c=a-1;c>=0;--c)o.push(u[c]);break}case _e:o.push(i.flatContents,i.breakContents);break;case he:if(n&&i.expandedStates)for(let u=i.expandedStates.length,a=u-1;a>=0;--a)o.push(i.expandedStates[a]);else o.push(i.contents);break;case et:case Ze:case tt:case Ne:case rt:o.push(i.contents);break;case ze:case ct:case lt:case He:case Fe:case qe:break;default:throw new Ot(i)}}}var ln=Nl;function gt(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(i){return Z(r,i,o)}function o(i){switch(Xe(i)){case Me:return t(i.map(n));case Ue:return t({...i,parts:i.parts.map(n)});case _e:return t({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case he:{let{expandedStates:s,contents:u}=i;return s?(s=s.map(n),u=s[0]):u=n(u),t({...i,contents:u,expandedStates:s})}case et:case Ze:case tt:case Ne:case rt:return t({...i,contents:n(i.contents)});case ze:case ct:case lt:case He:case Fe:case qe:return t(i);default:throw new Ot(i)}}}function _s(e,t,r){let n=r,o=!1;function i(s){if(o)return!1;let u=t(s);u!==void 0&&(o=!0,n=u)}return ln(e,i),n}function jl(e){if(e.type===he&&e.break||e.type===Fe&&e.hard||e.type===qe)return!0}function ue(e){return _s(e,jl,!1)}function Ms(e){if(e.length>0){let t=w(0,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Ns(e){let t=new Set,r=[];function n(i){if(i.type===qe&&Ms(r),i.type===he){if(r.push(i),t.has(i))return!1;t.add(i)}}function o(i){i.type===he&&r.pop().break&&Ms(r)}ln(e,n,o,!0)}function vl(e){return e.type===Fe&&!e.hard?e.soft?"":" ":e.type===_e?e.flatContents:e}function Wt(e){return gt(e,vl)}function Rl(e){switch(Xe(e)){case Ue:{let{parts:t}=e;if(t.every(r=>r===""))return"";if(t.length===1)return t[0];break}case he:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return"";if(e.contents.type===he&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case et:case Ze:case tt:case rt:if(!e.contents)return"";break;case _e:if(!e.flatContents&&!e.breakContents)return"";break;case Me:{let t=[];for(let r of e){if(!r)continue;let[n,...o]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof w(0,t,-1)=="string"?t[t.length-1]+=n:t.push(n),t.push(...o)}return t.length===0?"":t.length===1?t[0]:t}case ze:case ct:case lt:case He:case Fe:case Ne:case qe:break;default:throw new Ot(e)}return e}function sr(e){return gt(e,t=>Rl(t))}function Ve(e,t=ur){return gt(e,r=>typeof r=="string"?L(t,r.split(`
`)):r)}function Wl(e){if(e.type===Fe)return!0}function js(e){return _s(e,Wl,!1)}function mn(e,t){return e.type===Ne?{...e,contents:t(e.contents)}:t(e)}function vs(e){let t=!0;return ln(e,r=>{switch(Xe(r)){case ze:if(r==="")break;case lt:case He:case Fe:case qe:return t=!1,!1}}),t}var Se=Re,fn=Re,Rs=Re,Ws=Re;function m(e){return Se(e),{type:Ze,contents:e}}function Be(e,t){return Ws(e),Se(t),{type:et,contents:t,n:e}}function Js(e){return Be(Number.NEGATIVE_INFINITY,e)}function Gs(e){return Be({type:"root"},e)}function Dn(e){return Be(-1,e)}function Us(e,t,r){Se(e);let n=e;if(t>0){for(let o=0;o<Math.floor(t/r);++o)n=m(n);n=Be(t%r,n),n=Be(Number.NEGATIVE_INFINITY,n)}return n}var je={type:qe};var jr={type:ct};function yn(e){return Rs(e),{type:Ue,parts:e}}function p(e,t={}){return Se(e),fn(t.expandedStates,!0),{type:he,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function mt(e,t){return p(e[0],{...t,expandedStates:e})}function O(e,t="",r={}){return Se(e),t!==""&&Se(t),{type:_e,breakContents:e,flatContents:t,groupId:r.groupId}}function ht(e,t){return Se(e),{type:tt,contents:e,groupId:t.groupId,negate:t.negate}}function L(e,t){Se(e),fn(t);let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}function Et(e,t){return Se(t),e?{type:Ne,label:e,contents:t}:t}var T={type:Fe},y={type:Fe,soft:!0},_o={type:Fe,hard:!0},d=[_o,je],Jl={type:Fe,hard:!0,literal:!0},ur=[Jl,je];function No(e){return Se(e),{type:rt,contents:e}}var xe={type:He};var Gl="cr",Ul="crlf";var ql="\r",Yl=`\r
`,Hl=`
`,Xl=Hl;function qs(e){return e===Gl?ql:e===Ul?Yl:Xl}var Ys=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uD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FE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uLine truncated
`?V(0,F,`
`,o):F;I&&(c.write(I),s.length>0&&(i+=dt(I)));break}case Me:for(let I=F.length-1;I>=0;I--)s.push({indent:D,mode:P,doc:F[I]});break;case ct:c.markPosition();break;case Ze:s.push({indent:tu(D,t),mode:P,doc:F.contents});break;case et:s.push({indent:eu(D,F.n,t),mode:P,doc:F.contents});break;case lt:i-=c.trim();break;case he:{let I=(function(){if(P===Ct&&!u)return{indent:D,mode:F.break?nt:Ct,doc:F.contents};u=!1;let h=n-i,v=a.length>0,U={indent:D,mode:Ct,doc:F.contents};if(!F.break&&dn(U,s,h,v,r))return U;if(!F.expandedStates)return{indent:D,mode:nt,doc:F.contents};if(!F.break)for(let ae=1;ae<F.expandedStates.length-1;ae++){let fe={indent:D,mode:Ct,doc:F.expandedStates[ae]};if(dn(fe,s,h,v,r))return fe}return{indent:D,mode:nt,doc:w(0,F.expandedStates,-1)}})();s.push(I),F.id&&(r[F.id]=I.mode);break}case Ue:{let I=n-i,k=F[Uo]??0,{parts:h}=F,v=h.length-k;if(v===0)break;let U=h[k+0],ae=h[k+1],fe={indent:D,mode:Ct,doc:U},z={indent:D,mode:nt,doc:U},Ae=dn(fe,[],I,a.length>0,r,!0);if(v===1){Ae?s.push(fe):s.push(z);break}let De={indent:D,mode:Ct,doc:ae},xt={indent:D,mode:nt,doc:ae};if(v===2){Ae?s.push(De,fe):s.push(xt,z);break}let bt=h[k+2],_={indent:D,mode:P,doc:{...F,[Uo]:k+2}},we=dn({indent:D,mode:Ct,doc:[U,ae,bt]},[],I,a.length>0,r,!0);s.push(_),we?s.push(De,fe):Ae?s.push(xt,fe):s.push(xt,z);break}case _e:case tt:{let I=F.groupId?r[F.groupId]:P;if(I===nt){let k=F.type===_e?F.breakContents:F.negate?F.contents:m(F.contents);k&&s.push({indent:D,mode:P,doc:k})}if(I===Ct){let k=F.type===_e?F.flatContents:F.negate?m(F.contents):F.contents;k&&s.push({indent:D,mode:P,doc:k})}break}case rt:a.push({indent:D,mode:P,doc:F.contents});break;case He:a.length>0&&s.push({indent:D,mode:P,doc:_o});break;case Fe:switch(P){case Ct:if(!F.hard){F.soft||(c.write(" "),i+=1);break}u=!0;case nt:if(a.length>0){s.push({indent:D,mode:P,doc:F},...a.reverse()),a.length=0;break}F.literal?(c.write(o),i=0,D.root&&(D.root.value&&c.write(D.root.value),i=D.root.length)):(c.trim(),c.write(o+D.value),i=D.length);break}break;case Ne:s.push({indent:D,mode:P,doc:F.contents});break;case qe:break;default:throw new Ot(F)}s.length===0&&a.length>0&&(s.push(...a.reverse()),a.length=0)}let{text:f,positions:E}=c.finish();if(E.length!==2)return{formatted:f};let[C,A]=E;return{formatted:f,cursorNodeStart:C,cursorNodeText:f.slice(C,A)}}var St=class extends Error{name="ArgExpansionBailout"};function ar(e){return(e.type==="ObjectTypeProperty"||e.type==="ObjectTypeInternalSlot")&&!e.static&&!e.method&&e.kind!=="get"&&e.kind!=="set"&&e.value.type==="FunctionTypeAnnotation"}function nm(e,t){let r=null,n=t;for(;n!==r;)r=n,n=$i(e,n),n=er(e,n),n=at(e,n);return n=tr(e,n),n=pt(e,n),n!==!1&&J(e,n)}var Jt=nm;var me=(e,{originalText:t})=>{let r=S(e);if(Jt(t,r))return!0;let n=It(e);return n===r?!1:Jt(t,n)};var om=B(["AnyTypeAnnotation","ThisTypeAnnotation","NumberTypeAnnotation","VoidTypeAnnotation","BooleanTypeAnnotation","BigIntTypeAnnotation","SymbolTypeAnnotation","StringTypeAnnotation","NeverTypeAnnotation","UndefinedTypeAnnotation","UnknownTypeAnnotation","EmptyTypeAnnotation","MixedTypeAnnotation"]),Cn=om;var nu=B(["TSThisType","NullLiteralTypeAnnotation","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType"]);function im({type:e}){return e.startsWith("TS")&&e.endsWith("Keyword")}var Fn=im;function pr(e){return Fn(e)||Cn(e)||nu(e)||e.type==="GenericTypeAnnotation"&&!e.typeParameters||e.type==="TSTypeReference"&&!e.typeArguments}function ou(e){return(e.type==="TypeAnnotation"||e.type==="TSTypeAnnotation")&&e.typeAnnotation.type==="FunctionTypeAnnotation"&&!e.static&&!kt(e,e.typeAnnotation)}function sm(e,t){let r=t.split(".");for(let n=r.length-1;n>=0;n--){let o=r[n];if(n===0)return e.type==="Identifier"&&e.name===o;if(n===1&&e.type==="MetaProperty"&&e.property.type==="Identifier"&&e.property.name===o){e=e.meta;continue}if(e.type==="MemberExpression"&&!e.optional&&!e.computed&&e.property.type==="Identifier"&&e.property.name===o){e=e.object;continue}return!1}}function cr(e,t){return t.some(r=>sm(e,r))}var um=["it","it.only","it.skip","describe","describe.only","describe.skip","test","test.only","test.skip","test.fixme","test.step","test.describe","test.describe.only","test.describe.skip","test.describe.fixme","test.describe.parallel","test.describe.parallel.only","test.describe.serial","test.describe.serial.only","skip","xit","xdescribe","xtest","fit","fdescribe","ftest"];function am(e){return cr(e,um)}function pm(e){return e.type==="Identifier"&&(e.name==="beforeEach"||e.name==="beforeAll"||e.name==="afterEach"||e.name==="afterAll")}function Yo(e){return M(e)&&e.callee.type==="Identifier"&&["async","inject","fakeAsync","waitForAsync"].includes(e.callee.name)}function cm(e){return e.type==="FunctionExpression"||e.type==="ArrowFunctionExpression"&&e.body.type==="BlockStatement"}function Gt(e,t){if(e?.type!=="CallExpression"||e.optional)return!1;let r=se(e);if(r.length===1){if(Line truncated
`);return r===-1?0:hu(e.slice(r+1).match(/^[\t ]*/)[0],t)}var Su=Um;function On(e,t,r){if(Xm(e)){let i=qm(e,t,r);if(i)return i}let n=Iu(e,t,r),o=e.map(({isLast:i,index:s})=>[r(),i?"":n[s]],"quasis");return[xe,"`",...o,"`"]}function bu(e,t,r){let n=r("quasi"),{node:o}=e,i="",s=re(o.quasi,g.Leading)[0];return s&&(te(t.originalText,S(o.typeArguments??o.tag),b(s))?i=y:i=" "),Et(n.label&&{tagged:!0,...n.label},[r("tag"),r("typeArguments"),i,xe,n])}function qm(e,t,r){let{node:n}=e,o=n.quasis[0].value.raw.trim().split(/\s*\|\s*/);if(o.length>1||o.some(i=>i.length>0)){t.__inJestEach=!0;let i=Iu(e,t,r);t.__inJestEach=!1;let s=i.map(E=>qo(E,{...t,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted),u=[{hasLineBreak:!1,cells:[]}];for(let E=1;E<n.quasis.length;E++){let C=w(0,u,-1),A=s[E-1];C.cells.push(A),A.includes(`
`)&&(C.hasLineBreak=!0),n.quasis[E].value.raw.includes(`
`)&&u.push({hasLineBreak:!1,cells:[]})}let a=Math.max(o.length,...u.map(E=>E.cells.length)),c=Array.from({length:a},()=>0),f=[{cells:o},...u.filter(E=>E.cells.length>0)];for(let E of f)if(!E.hasLineBreak)for(let[C,A]of E.cells.entries())c[C]=Math.max(c[C],dt(A));return[xe,"`",m([d,L(d,f.map(E=>L(" | ",E.cells.map((C,A)=>E.hasLineBreak?C:C+" ".repeat(c[A]-dt(C))))))]),d,"`"]}}var Ym=new WeakMap;function Hm(e,t){let{parent:r,index:n}=e;return Z(Ym,r,i=>{let{tabWidth:s}=t,u=0;return i.quasis.map(c=>{let f=c.value.raw,E=f.includes(`
`)?Su(f,s):u;return u=E,{indentSize:E,previousQuasiText:f}})})[n]}function Pu(e,t,r,n=!0){let{node:o,index:i}=e,s=r(),u=e.parent,{quasis:a}=u,c=S(a[i]),f=b(a[i+1]),E=te(t.originalText,c,f);if(!E){let D=qo(s,{...t,printWidth:Number.POSITIVE_INFINITY}).formatted;D.includes(`
`)?E=!0:s=D}if(E&&(x(o)||o.type==="Identifier"||N(Pe(o))||o.type==="ConditionalExpression"||o.type==="SequenceExpression"||de(o)||be(o))&&(s=[m([y,s]),y]),!n)return p(["${",s,xe,"}"]);let{indentSize:C,previousQuasiText:A}=Hm(e,t);return t.__inJestEach&&(C=Math.max(C,t.tabWidth)),s=C===0&&A.endsWith(`
`)?Be(Number.NEGATIVE_INFINITY,s):Us(s,C,t.tabWidth),p(["${",s,xe,"}"])}function Iu(e,t,r){return e.map(()=>Pu(e,t,r),e.node.type==="TSTemplateLiteralType"?"types":"expressions")}function yr(e,t,r){return e.map(()=>Pu(e,t,r,!1),"expressions")}function Mn(e,t){return gt(e,r=>typeof r=="string"?t?V(0,r,/(\\*)`/g,"$1$1\\`"):ei(r):r)}function ei(e){return V(0,e,/([\\`]|\$\{)/g,"\\$1")}var Bu=/^[fx]?(?:describe|it|test)$/;function Xm({node:e,parent:t}){return e.type==="TemplateLiteral"&&t.type==="TaggedTemplateExpression"&&t.quasi===e&&t.tag.type==="MemberExpression"&&t.tag.property.type==="Identifier"&&t.tag.property.name==="each"&&(t.tag.object.type==="Identifier"&&Bu.test(t.tag.object.name)||t.tag.object.type==="MemberExpression"&&t.tag.object.property.type==="Identifier"&&(t.tag.object.property.name==="only"||t.tag.object.property.name==="skip")&&t.tag.object.object.type==="Identifier"&&Bu.test(t.tag.object.object.name))}var ri=[(e,t)=>t==="properties"&&e.type==="ObjectExpression",(e,t)=>t==="arguments"&&e.type==="CallExpression"&&e.callee.type==="Identifier"&&e.callee.name==="Component",(e,t)=>t==="expression"&&e.type==="Decorator"];function ku(e){let t=n=>n.type==="TemplateLiteral",r=(n,o)=>Ge(n)&&!n.computed&&n.key.type==="Identifier"&&n.key.name==="styles"&&o==="value";return e.match(t,(n,o)=>Y(n)&&o==="elements",r,...ri)||e.match(t,r,...ri)}function ni(e){return e.match(t=>t.type==="TemplateLiteral",(t,r)=>Ge(t)&&!t.computed&&t.key.type==="Identifier"&&t.key.name==="template"&&r==="value",...ri)}function ti(e,t){return x(e,g.Block|g.Leading,({value:r})=>r===` ${t} `)}function _n({node:e,parent:t},r){return ti(e,r)||Vm(t)&&ti(t,r)||t.type==="ExpressionStatement"&&ti(t,r)}function Vm(e){return e.type==="AsConstExpression"||e.type==="TSAsExpression"&&e.typeAnnotation.type==="TSTypeReference"&&e.typeAnnotation.typeName.type==="Identifier"&&e.typeAnnotation.typeName.name==="const"}async function Lu(e,t,r,n){let{node:o}=r,i="";for(let[c,f]of o.quasis.entries()){let{raw:E}=f.value;c>0&&(i+="@prettier-placeholder-"+(c-1)+"-id"),i+=E}let s=await e(i,{parser:"scss"}),u=yr(r,n,t),a=Km(s,u);if(!a)throw new Error("Couldn't insert all the expressions");return["`",m([d,a]),y,"`"]}function Km(e,t){if(!j(t))return e;let r=0,n=gt(sr(e),o=>typeof o!="string"||!o.includes("@prettier-placeholder")?o:o.split(/@prettier-placeholder-(\d+)-id/).map((i,s)=>s%2===0?Ve(i):(r++,t[i])));return t.length===r?n:null}function $m(e){return e.match(void 0,(t,r)=>r==="quasi"&&t.type==="TaggedTemplateExpression"&&cr(t.tag,["css","css.global","css.resolve"]))||e.match(void 0,(t,r)=>r==="expression"&&t.type==="JSXExpressionContainer",(t,r)=>r==="children"&&t.type==="JSXElement"&&t.openingElement.name.type==="JSXIdentifier"&&t.openingElement.name.name==="style"&&t.openingElement.attributes.some(n=>n.type==="JSXAttribute"&&n.name.type==="JSXIdentifier"&&n.name.name==="jsx"))}function Nn(e){return e.type==="Identifier"&&e.name==="styled"}function wu(e){return/^[A-Z]/.test(e.object.name)&&e.property.name==="extend"}function Qm({parent:e}){if(!e||e.type!=="TaggedTemplateExpression")return!1;let t=e.tag.type==="ParenthesizedExpression"?e.tag.expression:e.tag;switch(t.type){case"MemberExpression":return Nn(t.object)||wu(t);case"CallExpression":return Nn(t.callee)||t.callee.type==="MemberExpression"&&(t.callee.object.type==="MemberExpression"&&(Nn(t.callee.object.object)||wu(t.callee.object))||t.callee.object.type==="CallExpression"&&Nn(t.callee.object.callee));case"Identifier":return t.name==="css";default:return!1}}function zm({parent:e,grandparent:t}){return t?.type==="JSXAttribute"&&e.type==="JSXExpressionContainer"&&t.name.type==="JSXIdentifier"&&t.name.name==="css"}var Ou=e=>$m(e)||Qm(e)||zm(e)||ku(e);async function Mu(e,t,r,n){let{node:o}=r,i=o.quasis.length,s=yr(r,n,t),u=[];for(let a=0;a<i;a++){let c=o.quasis[a],f=a===0,E=a===i-1,C=c.value.cooked,A=C.split(`
`),D=A.length;if(!E&&/#[^\n\r]*$/.test(A[D-1]))return null;let P=D>2&&A[0].trim()===""&&A[1].trim()==="",F=D>2&&A[D-1].trim()===""&&A[D-2].trim()==="",I=A.every(h=>/^\s*(?:#[^\n\r]*)?$/.test(h)),k;I?k=Zm(A):k=await e(C,{parser:"graphql"}),k?(k=Mn(k,!1),!f&&P&&u.push(""),u.push(k),!E&&F&&u.push("")):!f&&!E&&P&&u.push(""),E||u.push(s[a])}return["`",m([d,L(d,u)]),d,"`"]}function Zm(e){let t=[],r=!1,n=e.map(o=>o.trim());for(let[o,i]of n.entries())i!==""&&(n[o-1]===""&&r?t.push([d,i]):t.push(i),r=!0);return t.length===0?null:L(d,t)}function _u({node:e,parent:t}){return _n({node:e,parent:t},"GraphQL")||t&&(t.type==="TaggedTemplateExpression"&&(t.tag.type==="MemberExpression"&&t.tag.object.name==="graphql"&&t.tag.property.name==="experimental"||t.tag.type==="Identifier"&&(t.tag.name==="gql"||t.tag.name==="graphql"))||t.type==="CallExpression"&&t.callee.type==="Identifier"&&t.callee.name==="graphql")}var oi=0;async function Nu(e,t,r,n,o){let{node:i}=n,s=oi;oi=oi+1>>>0;let u=I=>`PRETTIER_HTML_PLACEHOLDER_${I}_${s}_IN_JS`,a=i.quasis.map((I,k,h)=>k===h.length-1?I.value.cooked:I.value.cooked+u(k)).join(""),c=yr(n,o,r),f=new RegExp(u("(\\d+)"),"g"),E=0,C=await t(a,{parser:e,__onHtmlRoot(I){E=I.children.length}}),A=gt(C,I=>{if(typeof I!="string")return I;let k=[],h=I.split(f);for(let v=0;v<h.length;v++){let U=h[v];if(v%2===0){U&&(U=ei(U),o.__embeddedInHtml&&(U=V(0,U,/<\/(?=script\b)/gi,"<\\/")),k.push(U));continue}let ae=Number(U);k.push(c[ae])}return k}),D=/^\s/.test(a)?" ":"",P=/\s$/.test(a)?" ":"",F=o.htmlWhitespaceSensitivity==="ignore"?d:D&&P?T:null;return F?p(["`",m([F,p(A)]),F,"`"]):Et({hug:!1},p(["`",D,E>1?m(p(A)):p(A),P,"`"]))}function ju(e){return _n(e,"HTML")||e.match(t=>t.type==="TemplateLiteral",(t,r)=>t.type==="TaggedTemplateExpression"&&t.tag.type==="Identifier"&&t.tag.name==="html"&&r==="quasi")}var vu=Nu.bind(void 0,"html"),Ru=Nu.bind(void 0,"angular");async function Wu(e,t,r){let{node:n}=r,o=V(0,n.quasis[0].value.raw,/((?:\\\\)*)\\`/g,(a,c)=>"\\".repeat(c.length/2)+"`"),i=ef(o),s=i!=="";s&&(o=V(0,o,new RegExp(`^${i}`,"gm"),""));let u=Mn(await e(o,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",s?m([y,u]):[ur,Js(u)],y,"`"]}function ef(e){let t=e.match(/^([^\S\n]*)\S/m);return t===null?"":t[1]}function Ju({node:e,parent:t}){return t?.type==="TaggedTemplateExpression"&&e.quasis.length===1&&t.tag.type==="Identifier"&&(t.tag.name==="md"||t.tag.name==="markdown")}var tf=[{test:Ou,print:Lu},{test:_u,print:Mu},{test:ju,print:vu},{test:ni,print:Ru},{test:Ju,print:Wu}].map(({test:e,print:t})=>({test:e,print:nf(t)}));function rf(e){let{node:t}=e;if(t.type!=="TemplateLiteral"||of(t))return;let r=tf.find(({test:n})=>n(e));if(r)return t.quasis.length===1&&t.quasis[0].value.raw.trim()===""?"``":r.print}function nf(e){return async(...t)=>{let r=await e(...t);return r&&Et({embed:!0,...r.label},r)}}function of({quasis:e}){return e.some(({value:{cooked:t}})=>t===null)}var Gu=rf;function Uu(e,t){e.type==="ChainExpression"?sf(t):(e.type==="OptionalMemberExpression"||e.type==="OptionalCallExpression")&&uf(t)}function qu(e){if(N(e))return"object";if(M(e))return"callee";if(We(e))return"expression"}function jn(e){let t=qu(e);if(t)return e[t]}function sf(e){for(e=jn(e);e.type==="MemberExpression"||e.type==="CallExpression"||e.type==="TSNonNullExpression";e=jn(e)){let t=qu(e),r=e[t];r.type==="ChainExpression"&&(e[t]=r.expression)}}function uf(e){for(e=jn(e);e.type==="MemberExpression"||e.type==="CallExpression";e=jn(e))e.type=`Optional${e.type}`}function Yu(e,t,r){let n=t[r];(q(n)||Ee(n))&&(e[r]=String(n.value)),n.type==="Identifier"&&(e[r]=n.name)}function Hu(e,t){(e.type==="Property"||e.type==="ObjectProperty"||e.type==="MethodDefinition"||e.type==="ClassProperty"||e.type==="ClassMethod"||e.type==="PropertyDefinition"||e.type==="TSDeclareMethod"||e.type==="TSPropertySignature"||e.type==="TSMethodSignature"||e.type==="ObjectTypeProperty"||e.type==="ImportAttribute"||e.type==="RecordDeclarationProperty"||e.type==="RecordDeclarationStaticProperty")&&!e.computed&&Yu(t,e,"key"),e.type==="TSEnumMember"&&Yu(t,e,"id")}function Xu(e,t){e.type==="RegExpLiteral"&&(t.flags=[...e.flags].sort().join("")),e.type==="Literal"&&"regex"in e&&(t.regex.flags=[...e.regex.flags].sort().join(""))}var af=new Set(["range","raw","comments","extra","start","end","loc","errors","tokens","trailingComma","docblock","__contentEnd"]),Er=e=>{for(let t of e.quasis)delete t.value};function ii(e,t,r){if(e.type==="Program"&&delete t.sourceType,Uu(e,t),Hu(e,t),Xu(e,t),(Gi(e)||e.type==="BigIntLiteralTypeAnnotation")&&"bigint"in e&&(t.bigint=e.bigint.toLowerCase()),e.type==="EmptyStatement"&&!Qt({node:e,parent:r})||e.type==="JSXText"||e.type==="JSXExpressionContainer"&&(e.expression.type==="Literal"||e.expression.type==="StringLiteral")&&e.expression.value===" ")return null;if(e.type==="JSXElement"&&e.openingElement.name.type==="JSXIdentifier"&&e.openingElement.name.name==="style"&&e.openingElement.attributes.some(o=>o.type==="JSXAttribute"&&o.name.name==="jsx"Line truncated
$1 $2
`);e=e.replace(Vu,"").trimEnd();let n=Object.create(null),o=V(0,e,Ku,"").replace(Vu,"").trimEnd(),i;for(;i=Ku.exec(e);){let s=V(0,i[2],lf,"");if(typeof n[i[1]]=="string"||Array.isArray(n[i[1]])){let u=n[i[1]];n[i[1]]=[...zu,...Array.isArray(u)?u:[u],s]}else n[i[1]]=s}return{comments:o,pragmas:n}}function ra({comments:e="",pragmas:t={}}){let s=Object.keys(t),u=s.flatMap(c=>$u(c,t[c])).map(c=>` * ${c}
`).join("");if(!e){if(s.length===0)return"";if(s.length===1&&!Array.isArray(t[s[0]])){let c=t[s[0]];return`/** ${$u(s[0],c)[0]} */`}}let a=e.split(`
`).map(c=>` * ${c}`).join(`
`)+`
`;return`/**
`+(e?a:"")+(e&&s.length>0?` *
`:"")+u+" */"}function $u(e,t){return[...zu,...Array.isArray(t)?t:[t]].map(r=>`@${e} ${r}`.trim())}var na="format";function Df(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
`);return t===-1?e:e.slice(0,t)}var oa=Df;function yf(e){let t=oa(e);t&&(e=e.slice(t.length+1));let r=Zu(e),{pragmas:n,comments:o}=ta(r);return{shebang:t,text:e,pragmas:n,comments:o}}function ia(e){let{shebang:t,text:r,pragmas:n,comments:o}=yf(e),i=ea(r),s=ra({pragmas:{[na]:"",...n},comments:o.trimStart()});return(t?`${t}
`:"")+s+(i.startsWith(`
`)?`
`:`
`)+i}function Ef(e){if(!le(e))return[];if(!e.value.includes(`
`))return[];let t=[];for(let r of`*${e.value}*`.split(`
`)){if(r=r.trimStart(),!r.startsWith("*"))return[];t.push(r)}return t}var df=new WeakMap;function si(e){return Z(df,e,Ef)}function vn(e){return si(e).length>0}function sa(e,t){let r=e.node;if(Le(r))return t.originalText.slice(b(r),S(r)).trimEnd();if(vn(r))return Cf(r);if(le(r))return["/*",Ve(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}function Cf(e){let t=si(e),r=e.value[0]==="*"&&e.value[1]!=="*";return["/",t.map((n,o)=>{if(o===0)return[n.trimEnd(),d];if(o===t.length-1)return[" ",n];let i=n.trimEnd(),s=[" ",i];return r&&i!=="*"&&n.endsWith(" ")?[s," ",Gs(ur)]:[s,d]}),"/"]}function ui(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var ai=class{#e;constructor(t){this.#e=new Set(t)}getLeadingWhitespaceCount(t){let r=this.#e,n=0;for(let o=0;o<t.length&&r.has(t.charAt(o));o++)n++;return n}getTrailingWhitespaceCount(t){let r=this.#e,n=0;for(let o=t.length-1;o>=0&&r.has(t.charAt(o));o--)n++;return n}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return this.#e.has(t.charAt(0))}hasTrailingWhitespace(t){return this.#e.has(w(0,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let n=`[${ui([...this.#e].join(""))}]+`,o=new RegExp(r?`(${n})`:n);return t.split(o)}hasWhitespaceCharacter(t){let r=this.#e;return Array.prototype.some.call(t,n=>r.has(n))}hasNonWhitespaceCharacter(t){let r=this.#e;return Array.prototype.some.call(t,n=>!r.has(n))}isWhitespaceOnly(t){let r=this.#e;return Array.prototype.every.call(t,n=>r.has(n))}#t(t){let r=Number.POSITIVE_INFINITY;for(let n of t.split(`
`)){if(n.length===0)continue;let o=this.getLeadingWhitespaceCount(n);if(o===0)return 0;n.length!==o&&o<r&&(r=o)}return r===Number.POSITIVE_INFINITY?0:r}dedentString(t){let r=this.#t(t);return r===0?t:t.split(`
`).map(n=>n.slice(r)).join(`
`)}},ua=ai;var dr=new ua(`
\r `);function Ht(e){return e.type==="JSXText"&&(dr.hasNonWhitespaceCharacter(ye(e))||!/\n/.test(ye(e)))}function aa(e){let{node:t,parent:r}=e;if(!H(t)||!H(r))return!1;let{index:n,siblings:o}=e,i;for(let s=n;s>0;s--){let u=o[s-1];if(!(u.type==="JSXText"&&!Ht(u))){i=u;break}}return i?.type==="JSXExpressionContainer"&&i.expression.type==="JSXEmptyExpression"&&Lt(i.expression)}function Ff(e){return Lt(e.node)||aa(e)}var Cr=Ff;var pi=class extends Error{name="UnexpectedNodeError";constructor(t,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`),this.node=t}},it=pi;function pa(e){return e.type==="CallExpression"&&!e.optional&&e.arguments.length===1&&e.callee.type==="Identifier"&&e.callee.name==="Boolean"}var xf=0;function Rn(e,t,r){let{node:n,parent:o,grandparent:i,key:s}=e,u=s!=="body"&&(o.type==="IfStatement"||o.type==="WhileStatement"||o.type==="SwitchStatement"||o.type==="DoWhileStatement"),a=n.operator==="|>"&&e.root.extra?.__isUsingHackPipeline,c=ci(e,t,r,!1,u);if(u)return c;if(a)return p(c);if(s==="callee"&&Tt(o)||o.type==="UnaryExpression"&&!x(n)||N(o)&&!o.computed)return p([m([y,...c]),y]);let f=ut(o)||o.type==="JSXExpressionContainer"&&i.type==="JSXAttribute"||n.operator!=="|"&&o.type==="JsExpressionRoot"||n.type!=="NGPipeExpression"&&(o.type==="NGRoot"&&t.parser==="__ng_binding"||o.type==="NGMicrosyntaxExpression"&&i.type==="NGMicrosyntax"&&i.body.length===1)||n===o.body&&o.type==="ArrowFunctionExpression"||n!==o.body&&o.type==="ForStatement"||o.type==="ConditionalExpression"&&!ut(i)&&!Tt(i)||o.type==="TemplateLiteral"||s==="argument"&&o.type==="UnaryExpression"||s==="arguments"&&pa(o),E=o.type==="AssignmentExpression"||o.type==="VariableDeclarator"||o.type==="ClassProperty"||o.type==="PropertyDefinition"||o.type==="TSAbstractPropertyDefinition"||o.type==="ClassPrivateProperty"||Ge(o),C=be(n.left)&&Lr(n.operator,n.left.operator);if(f||Fr(n)&&!C||!Fr(n)&&E)return p(c);if(c.length===0)return"";let A=H(n.right),D=c.findIndex(v=>typeof v!="string"&&!Array.isArray(v)&&v.type===he),P=c.slice(0,D===-1?1:D+1),F=c.slice(P.length,A?-1:void 0),I=Symbol("logicalChain-"+ ++xf),k=p([...P,m(F)],{id:I});if(!A)return k;let h=w(0,c,-1);return p([k,ht(h,{groupId:I})])}function ci(e,t,r,n,o){let{node:i}=e;if(!be(i))return[p(r())];let s=[];Lr(i.operator,i.left.operator)?s=e.call(()=>ci(e,t,r,!0,o),"left"):s.push(p(r("left")));let u=Fr(i),a=i.right.type==="ChainExpression"?i.right.expression:i.right,c=(i.type==="NGPipeExpression"||i.operator==="|>"||Af(e,t))&&!Oe(t.originalText,a),E=!x(a,g.Leading,rr)&&Oe(t.originalText,a),C=i.type==="NGPipeExpression"?"|":i.operator,A=i.type==="NGPipeExpression"&&i.arguments.length>0?p(m([y,": ",L([T,": "],e.map(()=>Be(2,p(r())),"arguments"))])):"",D;if(u)D=[C,Oe(t.originalText,a)?m([T,r("right"),A]):[" ",r("right"),A]];else{let h=C==="|>"&&e.root.extra?.__isUsingHackPipeline?e.call(()=>ci(e,t,r,!0,o),"right"):r("right");if(t.experimentalOperatorPosition==="start"){let v="";if(E)switch(Xe(h)){case Me:v=h[0],h.shift();break;case Ne:v=h.contents[0],h.contents.shift();break}D=[T,v,C," ",h,A]}else D=[c?T:"",C,c?" ":T,h,A]}let{parent:P}=e,F=x(i.left,g.Trailing|g.Line);if((F||!(o&&i.type==="LogicalExpression")&&P.type!==i.type&&i.left.type!==i.type&&i.right.type!==i.type)&&(D=p(D,{shouldBreak:F})),t.experimentalOperatorPosition==="start"?s.push(u||E?" ":"",D):s.push(c?"":" ",D),n&&x(i)){let k=sr(Q(e,s,t));return k.type===Ue?k.parts:Array.isArray(k)?k:[k]}return s}function Fr(e){return e.type!=="LogicalExpression"?!1:!!(ie(e.right)&&e.right.properties.length>0||Y(e.right)&&e.right.elements.length>0||H(e.right))}var ca=e=>e.type==="BinaryExpression"&&e.operator==="|";function Af(e,t){return(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression")&&ca(e.node)&&!e.hasAncestor(r=>!ca(r)&&r.type!=="JsExpressionRoot")}function ma(e,t,r){let{node:n}=e;if(n.type.startsWith("NG"))switch(n.type){case"NGRoot":return r("node");case"NGPipeExpression":return Rn(e,t,r);case"NGChainedExpression":return p(L([";",T],e.map(()=>hf(e)?r():["(",r(),")"],"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return e.map(()=>[e.isFirst?"":la(e)?" ":[";",T],r()],"body");case"NGMicrosyntaxKey":return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/i.test(n.name)?n.name:JSON.stringify(n.name);case"NGMicrosyntaxExpression":return[r("expression"),n.alias===null?"":[" as ",r("alias")]];case"NGMicrosyntaxKeyedExpression":{let{index:o,parent:i}=e,s=la(e)||Tf(e)||(o===1&&(n.key.name==="then"||n.key.name==="else"||n.key.name==="as")||o===2&&(n.key.name==="else"&&i.body[o-1].type==="NGMicrosyntaxKeyedExpression"&&i.body[o-1].key.name==="then"||n.key.name==="track"))&&i.body[0].type==="NGMicrosyntaxExpression";return[r("key"),s?" ":": ",r("expression")]}case"NGMicrosyntaxLet":return["let ",r("key"),n.value===null?"":[" = ",r("value")]];case"NGMicrosyntaxAs":return[r("key")," as ",r("alias")];default:throw new it(n,"Angular")}}function la({node:e,index:t}){return e.type==="NGMicrosyntaxKeyedExpressioLine truncated
`))}function Gn(e,t){return(e.type==="TemplateLiteral"&&fi(e)||e.type==="TaggedTemplateExpression"&&fi(e.quasi))&&!J(t,b(e),{backwards:!0})}var bf=new WeakMap;function da(e){return Z(bf,e,t=>t.type==="ConditionalExpression"&&!Ce(t,r=>r.type==="ObjectExpression"))}var Pf=e=>e.type==="SequenceExpression";function Ca(e,t,r,n={}){let o=[],i,s=[],u=!1,a=!n.expandLastArg&&e.node.body.type==="ArrowFunctionExpression",c;(function I(){let{node:k}=e,h=If(e,t,r,n);if(o.length===0)o.push(h);else{let{leading:v,trailing:U}=Tn(e,t);o.push([v,h]),s.unshift(U)}a&&(u||(u=k.returnType&&ee(k).length>0||k.typeParameters||ee(k).some(v=>v.type!=="Identifier"))),!a||k.body.type!=="ArrowFunctionExpression"?(i=r("body",n),c=k.body):e.call(I,"body")})();let f=!Oe(t.originalText,c)&&(Pf(c)||kf(c,i,t)||!u&&da(c)),E=e.key==="callee"&&Dt(e.parent),C=Symbol("arrow-chain"),A=wf(e,n,{signatureDocs:o,shouldBreak:u}),D=!1,P=!1,F=!1;return a&&(E||n.assignmentLayout)&&(P=!0,F=!x(e.node,g.Leading&g.Line),D=n.assignmentLayout==="chain-tail-arrow-chain"||E&&!f),i=Lf(e,t,n,{bodyDoc:i,bodyComments:s,functionBody:c,shouldPutBodyOnSameLine:f}),p([p(P?m([F?y:"",A]):A,{shouldBreak:D,id:C})," =>",a?ht(i,{groupId:C}):p(i),a&&E?O(y,"",{groupId:C}):""])}function If(e,t,r,n){let{node:o}=e,i=[];if(o.async&&i.push("async "),kn(e,t))i.push(r(["params",0]));else{let u=n.expandLastArg||n.expandFirstArg,a=wn(e,r);if(u){if(ue(a))throw new St;a=p(Wt(a))}i.push(p([Ke(e,t,r,u,!0),a]))}let s=W(e,t,{marker:"commentBeforeArrow"});return s&&i.push(" ",s),i}function kf(e,t,r){return Y(e)||ie(e)||e.type==="ArrowFunctionExpression"||e.type==="DoExpression"||e.type==="BlockStatement"||H(e)||t.label?.hug!==!1&&(t.label?.embed||Gn(e,r.originalText))}function wf(e,t,{signatureDocs:r,shouldBreak:n}){if(r.length===1)return r[0];let{parent:o,key:i}=e;return i!=="callee"&&Dt(o)||be(o)?p([r[0]," =>",m([T,L([" =>",T],r.slice(1))])],{shouldBreak:n}):i==="callee"&&Dt(o)||t.assignmentLayout?p(L([" =>",T],r),{shouldBreak:n}):p(m(L([" =>",T],r)),{shouldBreak:n})}function Lf(e,t,r,{bodyDoc:n,bodyComments:o,functionBody:i,shouldPutBodyOnSameLine:s}){let{node:u,parent:a}=e,c=r.expandLastArg?Ie(t,"all"):"",f=(r.expandLastArg||a.type==="JSXExpressionContainer")&&!x(u)?y:"";return s&&da(i)?[" ",p([O("","("),m([y,n]),O("",")"),c,f]),o]:s?[" ",n,o]:[m([T,n,o]),c,f]}var Of=.25;function Wr(e,t){let{printWidth:r}=t;if(x(e))return!1;let n=r*Of;if(e.type==="ThisExpression"||e.type==="Identifier"&&e.name.length<=n||Jn(e)&&!x(e.argument))return!0;let o=e.type==="Literal"&&"regex"in e&&e.regex.pattern||e.type==="RegExpLiteral"&&e.pattern;return o?o.length<=n:q(e)?ot(ye(e),t).length<=n:e.type==="TemplateLiteral"?e.expressions.length===0&&e.quasis[0].value.raw.length<=n&&!e.quasis[0].value.raw.includes(`
`):e.type==="UnaryExpression"?Wr(e.argument,{printWidth:r}):e.type==="CallExpression"&&e.arguments.length===0&&e.callee.type==="Identifier"?e.callee.name.length<=n-2:Zt(e)}function Nt(e){return N(e)||e.type==="BindExpression"&&!!e.object}function Fa(e){if(e.length<=1)return!1;let t=0;for(let r of e)if(wt(r)){if(t+=1,t>1)return!0}else if(r=Pe(r),M(r)){for(let n of se(r))if(wt(n))return!0}return!1}function Un(e){let{node:t,parent:r,key:n}=e;return n==="callee"&&M(t)&&M(r)&&r.arguments.length>0&&t.arguments.length>r.arguments.length}var Mf=new Set(["!","-","+","~"]),_f=B(["Identifier","ThisExpression","Super","PrivateName","PrivateIdentifier"]);function st(e,t=2){if(t<=0)return!1;let r=n=>st(n,t-1);if(e=Pe(e),Xr(e))return dt(e.pattern??e.regex.pattern)<=5;if(Zt(e)||_f(e)||e.type==="ArgumentPlaceholder")return!0;if(e.type==="TemplateLiteral")return e.quasis.every(n=>!n.value.raw.includes(`
`))&&e.expressions.every(r);if(ie(e))return e.properties.every(n=>!n.computed&&(n.shorthand||n.value&&r(n.value)));if(Y(e))return e.elements.every(n=>n===null||r(n));if(Dt(e)){if(e.type==="ImportExpression"||st(e.callee,t)){let n=se(e);return n.length<=t&&n.every(r)}return!1}return N(e)?st(e.object,t)&&st(e.property,t):e.type==="UnaryExpression"&&Mf.has(e.operator)||e.type==="UpdateExpression"?st(e.argument,t):!1}function Nf(e,t,r){let{node:n}=e,o=se(n);if(o.length===0)return p(["(",Mt(e,t),")"]);let i=o.length-1;if(Rf(o)){let E=["("];return kr(e,(C,A)=>{E.push(r()),A!==i&&E.push(", ")}),E.push(")"),E}let s=!1,u=[];kr(e,({node:E},C)=>{let A=r();C===i||(me(E,t)?(s=!0,A=[A,",",d,d]):A=[A,",",T]),u.push(A)});let a=e.root.type!=="NGRoot"&&n.type!=="ImportExpression"&&n.type!=="TSImportType"&&n.type!=="TSExternalModuleReference"?Ie(t,"all"):"";function c(){return p(["(",m([T,...u]),a,T,")"],{shouldBreak:!0})}if(s||e.parent.type!=="Decorator"&&Fa(o))return c();if(vf(o)){let E=u.slice(1);if(E.some(ue))return c();let C;try{C=r(ho(n,0),{expandFirstArg:!0})}catch(A){if(A instanceof St)return c();throw A}return ue(C)?[je,mt([["(",p(C,{shouldBreak:!0}),", ",...E,")"],c()])]:mt([["(",C,", ",...E,")"],["(",p(C,{shouldBreak:!0}),", ",...E,")"],c()])}if(jf(o,u,t)){let E=u.slice(0,-1);if(E.some(ue))return c();let C;try{C=r(ho(n,-1),{expandLastArg:!0})}catch(A){if(A instanceof St)return c();throw A}return ue(C)?[je,mt([["(",...E,p(C,{shouldBreak:!0}),")"],c()])]:mt([["(",...E,C,")"],["(",...E,p(C,{shouldBreak:!0}),")"],c()])}let f=["(",m([y,...u]),a,y,")"];return Un(e)?f:p(f,{shouldBreak:u.some(ue)||s})}function qn(e,t=!1){if(ie(e)&&(e.properties.length>0||x(e))||Y(e)&&(e.elements.length>0||x(e))||(de(e)||e.type==="TSTypeAssertion")&&qn(e.expression)||e.type==="FunctionExpression"||e.type==="DoExpression"||e.type==="ModuleExpression")return!0;if(e.type==="ArrowFunctionExpression"){let{body:r}=e;if(r.type==="BlockStatement"||H(r)||ie(r)||Y(r)||r.type==="ArrowFunctionExpression"&&qn(r,!0)||!t&&(r.type==="ConditionalExpression"||M(Pe(r))))return!0}return!1}function jf(e,t,r){if(e.length===1){let i=w(0,t,-1);if(i.label?.embed&&i.label?.hug!==!1)return!0}let n=w(0,e,-1),o=w(0,e,-2);return!x(n,g.Leading)&&!x(n,g.Trailing)&&qn(n)&&(!o||o.type!==n.type)&&(e.length!==2||o.type!=="ArrowFunctionExpression"||!Y(n))&&!(e.length>1&&mi(n,r))}function vf(e){if(e.length!==2)return!1;let[t,r]=e;return t.type==="ModuleExpression"&&Wf(r)?!0:!x(t)&&(t.type==="FunctionExpression"||t.type==="ArrowFunctionExpression"&&t.body.type==="BlockStatement")&&r.type!=="FunctionExpression"&&r.type!=="ArrowFunctionExpression"&&r.type!=="ConditionalExpression"&&Aa(r)&&!qn(r)}function Aa(e){if(e.type==="ParenthesizedExpression")return Aa(e.expression);if(de(e)||e.type==="TypeCastExpression"){let{typeAnnotation:t}=e;if(t.type==="TypeAnnotation"&&(t=t.typeAnnotation),t.type==="TSArrayType"&&(t=t.elementType,t.type==="TSArrayType"&&(t=t.elementType)),t.type==="GenericTypeAnnotation"||t.type==="TSTypeReference"){let r=t.type==="GenericTypeAnnotation"?t.typeParameters:t.typeArguments;r?.params.length===1&&(t=r.params[0])}return pr(t)&&st(e.expression,1)}return Dt(e)&&se(e).length>1?!1:be(e)?st(e.left,1)&&st(e.right,1):Xr(e)||st(e)}function Rf(e){return e.length===2?xa(e,0):e.length===3?e[0].type==="Identifier"&&xa(e,1):!1}function xa(e,t){let r=e[t],n=e[t+1];return r.type==="ArrowFunctionExpression"&&ee(r).length===0&&r.body.type==="BlockStatement"&&n.type==="ArrayExpression"&&e.every(o=>!x(o))}function Wf(e){if(!(e.type==="ObjectExpression"&&e.properties.length===1))return!1;let[t]=e.properties;return Ge(t)?!t.computed&&(t.key.type==="Identifier"&&t.key.name==="type"||q(t.key)&&t.key.value==="type")&&q(t.value)&&t.value.value==="module":!1}var Jr=Nf;function Ta(e,t,r){return[r("object"),p(m([y,Di(e,t,r)]))]}function Di(e,t,r){return["::",r("callee")]}var Jf=e=>M(e)&&se(e).length>0;function Gf(e){let{node:t,ancestors:r}=e;for(let n of r){if(!(N(n)&&n.object===t||n.type==="TSNonNullExpression"&&n.expression===t))return n.type==="NewExpression"&&n.callee===t;t=n}return!1}function ga(e,t,r){let n=r("object"),o=yi(e,t,r),{node:i}=e,s=e.findAncestor(c=>!(N(c)||c.type==="TSNonNullExpression")),u=e.findAncestor(c=>!We(c)),a=s.type==="BindExpression"||s.type==="AssignmentExpression"&&s.left.type!=="Identifier"||Gf(e)||i.computed||i.object.type==="Identifier"&&i.property.type==="Identifier"&&!N(u)||(u.type==="AssignmentExpression"||u.type==="VariableDeclarator")&&(Jf(Pe(i.object))||n.label?.memberChain);return Et(n.label,[n,xe,a?o:p(m([y,o]))])}function yi(e,t,r){let n=r("property"),{node:o}=e,i=$(e);return o.computed?!o.property||Ee(o.property)?[i,"[",n,"]"]:p([i,"[",m([y,n]),y,"]"]):[i,".",n]}function Uf(e,t,r){let n=(e.parent.type==="ChainExpression"?e.grandparent:e.parent).type==="ExpressionStatement",o=[];function i(_){let{originalText:Te}=t,we=Rt(Te,S(_));return Te.charAt(we)===")"?we!==!1&&Jt(Te,we+1):me(_,t)}function s(){let{node:_}=e;if(M(_)&&(Nt(_.callee)||M(_.calLine truncated
`)&&!o&&!x(n.attributes[0]))return p(["<",r("name"),r("typeArguments")," ",...e.map(r,"attributes"),n.selfClosing?" />":">"]);let i=n.attributes?.some(u=>q(u.value)&&u.value.value.includes(`
`)),s=t.singleAttributePerLine&&n.attributes.length>1?d:T;return p(["<",r("name"),r("typeArguments"),m(e.map(({isFirst:u,previous:a})=>[u?s:me(a,t)?[d,d]:s,r()],"attributes")),...zD(n,t,o)],{shouldBreak:i})}function zD(e,t,r){return e.selfClosing?[T,"/>"]:ZD(e,t,r)?[">"]:[y,">"]}function ZD(e,t,r){let n=e.attributes.length>0&&x(w(0,e.attributes,-1),g.Trailing);return e.attributes.length===0&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}function ey(e,t,r){let{node:n}=e,o=["</"],i=r("name");return x(n.name,g.Leading|g.Line)?o.push(m([d,i]),d):x(n.name,g.Leading|g.Block)?o.push(" ",i):o.push(i),o.push(">"),o}function ty(e,t){let{node:r}=e,n=x(r),o=x(r,g.Line),i=r.type==="JSXOpeningFragment";return[i?"<":"</",m([o?d:n&&!i?" ":"",W(e,t)]),o?d:"",">"]}function ry(e,t,r){let n=Q(e,qD(e,t,r),t);return XD(e,n,t)}function ny(e,t){let{node:r}=e,n=x(r,g.Line);return[W(e,t,{indent:n}),n?d:""]}function oy(e,t,r){let{node:n}=e;return["{",e.call(({node:o})=>{let i=["...",r()];return x(o)?[m([y,Q(e,i,t)]),y]:i},n.type==="JSXSpreadAttribute"?"argument":"expression"),"}"]}function Jp(e,t,r){let{node:n}=e;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return KD(e,t,r);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return L(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return L(".",[r("object"),r("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return oy(e,t,r);case"JSXExpressionContainer":return $D(e,t,r);case"JSXFragment":case"JSXElement":return ry(e,t,r);case"JSXOpeningElement":return QD(e,t,r);case"JSXClosingElement":return ey(e,t,r);case"JSXOpeningFragment":case"JSXClosingFragment":return ty(e,t);case"JSXEmptyExpression":return ny(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new it(n,"JSX")}}function iy(e){if(e.children.length===0)return!0;if(e.children.length>1)return!1;let t=e.children[0];return t.type==="JSXText"&&!Ht(t)}function sy(e){return e.type==="JSXExpressionContainer"&&q(e.expression)&&e.expression.value===" "&&!x(e.expression)}function Gp(e,t,r){let{node:n}=e,o=n.parameters.length>1?Ie(t):"",i=p([m([y,L([", ",y],e.map(r,"parameters"))]),o,y]);return[e.key==="body"&&e.parent.type==="ClassBody"&&n.static?"static ":"",n.readonly?"readonly ":"","[",n.parameters?i:"","]",G(e,r),ke(e,t)]}function hi(e,t,r){let{node:n}=e;return[n.postfix?"":r,G(e,t),n.postfix?r:""]}function Up(e,t,r){let{node:n}=e,o=[],i=n.kind&&n.kind!=="method"?`${n.kind} `:"";o.push(Ut(n),i,ve(e,t,r),$(e));let s=Ke(e,t,r,!1,!0),u=G(e,r,"returnType"),a=Bt(n,u);return o.push(a?p(s):s),n.returnType&&o.push(p(u)),[p(o),ke(e,t)]}function qp(e,t,r){let{node:n}=e;return[ne(e),n.kind==="global"?"":`${n.kind} `,r("id"),n.body?[" ",p(r("body"))]:R(t)]}function Yp(e,t,r){let{node:n}=e,o=!(Y(n.expression)||ie(n.expression)),i=p(["<",m([y,r("typeAnnotation")]),y,">"]),s=[O("("),m([y,r("expression")]),y,O(")")];return o?mt([[i,r("expression")],[i,p(s,{shouldBreak:!0})],[i,r("expression")]]):p([i,r("expression")])}function Hp(e,t,r,n){let{node:o}=e;if(o.type.startsWith("TS")){if(Fn(o))return o.type.slice(2,-7).toLowerCase();switch(o.type){case"TSThisType":return"this";case"TSTypeAssertion":return Yp(e,t,r);case"TSDeclareFunction":return fr(e,t,r);case"TSExportAssignment":return["export = ",r("expression"),R(t)];case"TSModuleBlock":return Hn(e,t,r);case"TSInterfaceBody":case"TSTypeLiteral":return Vt(e,t,r);case"TSTypeAliasDeclaration":return lo(e,t,r);case"TSQualifiedName":return[r("left"),".",r("right")];case"TSAbstractMethodDefinition":case"TSDeclareMethod":return Xn(e,t,r);case"TSAbstractAccessorProperty":case"TSAbstractPropertyDefinition":return Vn(e,t,r);case"TSInterfaceHeritage":case"TSClassImplements":case"TSInstantiationExpression":return[r("expression"),r("typeArguments")];case"TSTemplateLiteralType":return On(e,t,r);case"TSNamedTupleMember":return co(e,t,r);case"TSRestType":return po(e,t,r);case"TSOptionalType":return[r("typeAnnotation"),"?"];case"TSInterfaceDeclaration":return Ar(e,t,r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return Kt(e,t,r,"params");case"TSTypeParameter":return mo(e,t,r);case"TSAsExpression":case"TSSatisfiesExpression":return ro(e,t,r);case"TSArrayType":return to(r);case"TSPropertySignature":return[o.readonly?"readonly ":"",ve(e,t,r),$(e),G(e,r),ke(e,t)];case"TSParameterProperty":return[Ut(o),o.static?"static ":"",o.override?"override ":"",o.readonly?"readonly ":"",r("parameter")];case"TSTypeQuery":return Do(e,r);case"TSIndexSignature":return Gp(e,t,r);case"TSTypePredicate":return fo(e,r);case"TSNonNullExpression":return[r("expression"),"!"];case"TSImportType":return[Xt(e,t,r),o.qualifier?[".",r("qualifier")]:"",Kt(e,t,r,"typeArguments")];case"TSLiteralType":return r("literal");case"TSIndexedAccessType":return so(e,t,r);case"TSTypeOperator":return[o.operator," ",r("typeAnnotation")];case"TSMappedType":return wp(e,t,r);case"TSMethodSignature":return Up(e,t,r);case"TSNamespaceExpoLine truncated
@@ -0,0 +1,74 @@
/**
* @fileoverview Types for object-schema package.
*/
/**
* Built-in validation strategies.
*/
export type BuiltInValidationStrategy = "array" | "boolean" | "number" | "object" | "object?" | "string" | "string!";
/**
* Built-in merge strategies.
*/
export type BuiltInMergeStrategy = "assign" | "overwrite" | "replace";
/**
* Custom merge strategy.
*/
export type CustomMergeStrategy = (target: any, source: any) => any;
/**
* Custom validation strategy.
*/
export type CustomValidationStrategy = (value: any) => void;
interface BasePropertyDefinition {
/**
* Indicates if the property is required.
*/
required?: boolean;
/**
* The other properties that must be present when this property is used.
*/
requires?: string[];
}
/**
* Property definition that specifies explicit merge and validation strategies.
* This form cannot include a `schema`.
*/
export interface PropertyDefinitionWithStrategies extends BasePropertyDefinition {
/**
* The schema for the object value of this property.
*/
schema?: never;
/**
* The strategy to merge the property.
*/
merge: BuiltInMergeStrategy | CustomMergeStrategy;
/**
* The strategy to validate the property.
*/
validate: BuiltInValidationStrategy | CustomValidationStrategy;
}
/**
* Property definition that uses a nested `schema`.
* When `schema` is present, merge and validation strategies are optional.
*/
export interface PropertyDefinitionWithSchema extends BasePropertyDefinition {
/**
* The schema for the object value of this property.
*/
schema: ObjectDefinition;
/**
* The strategy to merge the property.
*/
merge?: BuiltInMergeStrategy | CustomMergeStrategy;
/**
* The strategy to validate the property.
*/
validate?: BuiltInValidationStrategy | CustomValidationStrategy;
}
/**
* Property definition.
*/
export type PropertyDefinition = PropertyDefinitionWithStrategies | PropertyDefinitionWithSchema;
/**
* Object definition.
*/
export type ObjectDefinition = Record<string, PropertyDefinition>;
export {};
@@ -0,0 +1 @@
{"version":3,"file":"transform.mjs","sources":["../../../../src/projection/styles/transform.ts"],"sourcesContent":["import type { Delta, Point } from \"motion-utils\"\nimport type { ResolvedValues } from \"../../node/types\"\n\nexport function buildProjectionTransform(\n delta: Delta,\n treeScale: Point,\n latestTransform?: ResolvedValues\n): string {\n let transform = \"\"\n\n /**\n * The translations we use to calculate are always relative to the viewport coordinate space.\n * But when we apply scales, we also scale the coordinate space of an element and its children.\n * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need\n * to move an element 100 pixels, we actually need to move it 200 in within that scaled space.\n */\n const xTranslate = delta.x.translate / treeScale.x\n const yTranslate = delta.y.translate / treeScale.y\n const zTranslate = latestTransform?.z || 0\n if (xTranslate || yTranslate || zTranslate) {\n transform = `translate3d(${xTranslate}px, ${yTranslate}px, ${zTranslate}px) `\n }\n\n /**\n * Apply scale correction for the tree transform.\n * This will apply scale to the screen-orientated axes.\n */\n if (treeScale.x !== 1 || treeScale.y !== 1) {\n transform += `scale(${1 / treeScale.x}, ${1 / treeScale.y}) `\n }\n\n if (latestTransform) {\n const { transformPerspective, rotate, rotateX, rotateY, skewX, skewY } =\n latestTransform\n if (transformPerspective)\n transform = `perspective(${transformPerspective}px) ${transform}`\n if (rotate) transform += `rotate(${rotate}deg) `\n if (rotateX) transform += `rotateX(${rotateX}deg) `\n if (rotateY) transform += `rotateY(${rotateY}deg) `\n if (skewX) transform += `skewX(${skewX}deg) `\n if (skewY) transform += `skewY(${skewY}deg) `\n }\n\n /**\n * Apply scale to match the size of the element to the size we want it.\n * This will apply scale to the element-orientated axes.\n */\n const elementScaleX = delta.x.scale * treeScale.x\n const elementScaleY = delta.y.scale * treeScale.y\n if (elementScaleX !== 1 || elementScaleY !== 1) {\n transform += `scale(${elementScaleX}, ${elementScaleY})`\n }\n\n return transform || \"none\"\n}\n"],"names":[],"mappings":"SAGgB,wBAAwB,CACpC,KAAY,EACZ,SAAgB,EAChB,eAAgC,EAAA;IAEhC,IAAI,SAAS,GAAG,EAAE;AAElB;;;;;AAKG;IACH,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;IAClD,MAAM,UAAU,GAAG,KAAK,CAAC,CAAC,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC;AAClD,IAAA,MAAM,UAAU,GAAG,eAAe,EAAE,CAAC,IAAI,CAAC;AAC1C,IAAA,IAAI,UAAU,IAAI,UAAU,IAAI,UAAU,EAAE;QACxC,SAAS,GAAG,eAAe,UAAU,CAAA,IAAA,EAAO,UAAU,CAAA,IAAA,EAAO,UAAU,MAAM;IACjF;AAEA;;;AAGG;AACH,IAAA,IAAI,SAAS,CAAC,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,CAAC,KAAK,CAAC,EAAE;AACxC,QAAA,SAAS,IAAI,CAAA,MAAA,EAAS,CAAC,GAAG,SAAS,CAAC,CAAC,CAAA,EAAA,EA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function
* @author Ilya Volodin
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const callMethods = new Set(["apply", "bind", "call"]);
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "Disallow `new` operators with the `Function` object",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-new-func",
},
schema: [],
messages: {
noFunctionConstructor: "The Function constructor is eval.",
},
},
create(context) {
const sourceCode = context.sourceCode;
return {
"Program:exit"(node) {
const globalScope = sourceCode.getScope(node);
const variable = globalScope.set.get("Function");
if (variable && variable.defs.length === 0) {
variable.references.forEach(ref => {
const idNode = ref.identifier;
const { parent } = idNode;
let evalNode;
if (parent) {
if (
idNode === parent.callee &&
(parent.type === "NewExpression" ||
parent.type === "CallExpression")
) {
evalNode = parent;
} else if (
parent.type === "MemberExpression" &&
idNode === parent.object &&
callMethods.has(
astUtils.getStaticPropertyName(parent),
)
) {
const maybeCallee =
parent.parent.type === "ChainExpression"
? parent.parent
: parent;
if (
maybeCallee.parent.type ===
"CallExpression" &&
maybeCallee.parent.callee === maybeCallee
) {
evalNode = maybeCallee.parent;
}
}
}
if (evalNode) {
context.report({
node: evalNode,
messageId: "noFunctionConstructor",
});
}
});
}
},
};
},
};
@@ -0,0 +1 @@
module.exports={C:{"48":0.01136,"115":0.01515,"120":0.45065,"121":0.92403,"123":0.00379,"124":0.01515,"125":0.00379,"129":0.00379,"130":0.00379,"131":0.00379,"133":0.00379,"134":0.02651,"136":0.00379,"140":0.01515,"144":0.00379,"147":0.00379,"148":0.00379,"150":0.01136,"151":0.00379,"152":0.20071,"153":0.01894,"154":0.07574,"155":0.18935,"156":0.31432,"157":0.00379,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 122 126 127 128 132 135 137 138 139 141 142 143 145 146 149 158 159 160 3.5 3.6"},D:{"41":0.01894,"56":0.00379,"65":0.00379,"91":0.00379,"98":0.00379,"101":0.00757,"103":0.18556,"104":0.16284,"105":0.16284,"106":0.16663,"107":0.16663,"108":0.16663,"109":0.40142,"110":0.16284,"111":0.17042,"112":0.15905,"113":0.00379,"114":0.01136,"115":0.00379,"116":0.33704,"117":0.16663,"118":0.60213,"119":0.91267,"120":1.09066,"121":0.00379,"122":0.01515,"123":0.01515,"124":0.16663,"125":0.00379,"126":0.00379,"127":0.00379,"128":0.02272,"130":0.00757,"131":0.33326,"132":0.00379,"133":0.39006,"134":0.07953,"135":0.12497,"136":0.07574,"137":0.0871,"138":0.20071,"139":0.0871,"140":0.09468,"141":0.0871,"142":0.26888,"143":0.06817,"144":0.06817,"145":0.09089,"146":0.05681,"147":0.09089,"148":0.08331,"149":0.19314,"150":0.25373,"151":1.58675,"152":6.78252,"153":7.57779,"154":1.56024,"155":0.03408,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 42 43 44 45 46 47 48 49 50 51 52 53 54 55 57 58 59 60 61 62 63 64 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 83 84 85 86 87 88 89 90 92 93 94 95 96 97 99 100 102 129 156 157"},F:{"28":0.00379,"56":0.00379,"95":0.00379,"101":0.0303,"105":0.00379,"106":0.01136,"107":0.00757,"122":0.00379,"133":0.00757,"134":0.14012,"135":0.71574,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 96 97 98 99 100 102 103 104 108 109 110 111 112 113 114 115 116 117 118 119 120 121 123 124 125 126 127 131 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.00379,"109":0.01136,"114":0.00379,"119":0.45065,"120":0.43929,"122":0.01515,"123":0.00379,"124":0.00379,"131":0.00379,"132":0.00379,"135":0.00379,"138":0.00757,"139":0.00379,"140":0.00379,"141":0.00379,"142":0.00757,"143":0.00757,"144":0.00379,"145":0.00379,"146":0.00757,"147":0.01136,"148":0.01515,"149":0.04923,"150":0.07574,"151":0.18178,"152":1.30273,"153":1.72309,"154":0.42036,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 121 125 126 127 128 129 130 133 134 136 137"},E:{"27":0.18178,_:"4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 13.1 15.1 15.2-15.3 15.5 16.0 16.2 17.0 17.2 27.1 TP","14.1":0.00379,"15.4":0.00757,"15.6":0.02651,"16.1":0.00379,"16.3":0.00379,"16.4":0.00379,"16.5":0.09468,"16.6":0.02272,"17.1":0.02272,"17.3":0.00379,"17.4":0.01136,"17.5":0.02272,"17.6":0.03787,"18.0":0.01136,"18.1":0.00757,"18.2":0.00379,"18.3":0.01136,"18.4":0.00379,"18.5-18.7":0.01894,"26.0":0.00757,"26.1":0.00757,"26.2":0.03408,"26.3":0.04166,"26.4":0.06059,"26.5":0.2613,"26.6":1.1058,"27.2":0.00379},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00278,"5.0-5.1":0.00278,"6.0-6.1":0,"7.0-7.1":0.00556,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.02778,"11.0-11.2":0.00278,"11.3-11.4":0.00556,"12.0-12.1":0,"12.2-12.5":0.07222,"13.0-13.1":0,"13.2":0.01389,"13.3":0,"13.4-13.7":0.00278,"14.0-14.4":0.01111,"14.5-14.8":0.01667,"15.0-15.1":0.01667,"15.2-15.3":0.01111,"15.4":0.01389,"15.5":0.01667,"15.6-15.8":0.36112,"16.0":0.02778,"16.1":0.05,"16.2":0.02778,"16.3":0.06111,"16.4":0.01389,"16.5":0.02222,"16.6-16.7":0.50279,"17.0":0.01944,"17.1":0.02778,"17.2":0.02778,"17.3":0.04167,"17.4":0.05833,"17.5":0.11389,"17.6-17.7":0.29445,"18.0":0.06111,"18.1":0.12222,"18.2":0.16667,"18.3":0.28889,"18.4":0.18056,"18.5-18.7":3.73063,"26.0":0.18056,"26.1":0.18334,"26.2":0.47779,"26.3":0.51668,"26.4":0.37779,"26.5":2.53061,"26.6":15.6142,"27.0":1.19725,"27.1":0,"27.2":0.03056},P:{"21":0.00928,"22":0.00928,"23":0.00928,"24":0.00928,"25":0.01856,"26":0.01856,"27":0.03712,"28":0.05569,"29":0.1485,"30":1.93048,_:"4 20 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 14.0 15.0 16.0 17.0 18.0 19.0","13.0":0.00928},I:{"0":0.03725,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},K:{"0":1.03757,_:"10 11 12 11.1 11.5 12.1"},A:{"11":0.00757,_:"6 7 8 9 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},L:{"0":30.89962},R:{_:"0"},M:{"0":0.10562},Q:{_:"14.9"Line truncated
@@ -0,0 +1 @@
{"version":3,"file":"mail-open.js","sources":["../../../src/icons/mail-open.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MailOpen\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjEuMiA4LjRjLjUuMzguOC45Ny44IDEuNnYxMGEyIDIgMCAwIDEtMiAySDRhMiAyIDAgMCAxLTItMlYxMGEyIDIgMCAwIDEgLjgtMS42bDgtNmEyIDIgMCAwIDEgMi40IDBsOCA2WiIgLz4KICA8cGF0aCBkPSJtMjIgMTAtOC45NyA1LjdhMS45NCAxLjk0IDAgMCAxLTIuMDYgMEwyIDEwIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/mail-open\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst MailOpen = createLucideIcon('MailOpen', [\n [\n 'path',\n {\n d: 'M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z',\n key: '1jhwl8',\n },\n ],\n ['path', { d: 'm22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10', key: '1qfld7' }],\n]);\n\nexport default MailOpen;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,C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AAE,eAAe,CAAC,SAAS,CAAC,GACpC,cAAc;IAEjB,gBAAgB,CAAC,SAAS,SAAS,iBAAiB,GAAG,SAAS,EAAE,UAAU,SAAS,SAAS,GAAG,iBAAiB,GAAG,SAAS,EAC1H,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,EAAE,SAAS,CAAC;QACvB,YAAY,CAAC,EAAE,UAAU,CAAC;QAC1B,WAAW,CAAC,EAAE,eAAe,CAAC;QAC9B,SAAS,CAAC,EAAE,iBAAiB,CAAC;QAC9B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACnC,EACD,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,GACpC,cAAc;CAsCpB"}
@@ -0,0 +1,61 @@
import type { ConstructorOverloadParameters, NumOverloads, OverloadsInfoUnion } from './overloads';
import type { IsNever, IsAny, IsUnknown, ReadonlyKeys, RequiredKeys, OptionalKeys, MutuallyExtends, UnionToTuple } from './utils';
/**
* Represents a deeply branded type.
*
* Recursively walk a type and replace it with a branded type related to the
* original. This is useful for equality-checking stricter than
* `A extends B ? B extends A ? true : false : false`, because it detects the
* difference between a few edge-case types that vanilla TypeScript
* doesn't by default:
* - `any` vs `unknown`
* - `{ readonly a: string }` vs `{ a: string }`
* - `{ a?: string }` vs `{ a: string | undefined }`
*
* __Note__: not very performant for complex types - this should only be used
* when you know you need it. If doing an equality check, it's almost always
* better to use {@linkcode StrictEqualUsingTSInternalIdenticalToOperator}.
*/
export type DeepBrand<T> = IsNever<T> extends true ? {
type: 'never';
} : IsAny<T> extends true ? {
type: 'any';
} : IsUnknown<T> extends true ? {
type: 'unknown';
} : T extends string | number | boolean | symbol | bigint | null | undefined | void ? {
type: 'primitive';
value: T;
} : T extends new (...args: any[]) => any ? {
type: 'constructor';
params: ConstructorOverloadParameters<T>;
instance: DeepBrand<InstanceType<Extract<T, new (...args: any) => any>>>;
} : T extends (...args: infer P) => infer R ? NumOverloads<T> extends 1 ? {
type: 'function';
params: DeepBrand<P>;
return: DeepBrand<R>;
this: DeepBrand<ThisParameterType<T>>;
props: DeepBrand<Omit<T, keyof Function>>;
} : UnionToTuple<OverloadsInfoUnion<T>> extends infer OverloadsTuple ? {
type: 'overloads';
overloads: {
[K in keyof OverloadsTuple]: DeepBrand<OverloadsTuple[K]>;
};
} : never : T extends any[] ? {
type: 'array';
items: {
[K in keyof T]: T[K];
};
} : {
type: 'object';
properties: {
[K in keyof T]: DeepBrand<T[K]>;
};
readonly: ReadonlyKeys<T>;
required: RequiredKeys<T>;
optional: OptionalKeys<T>;
constructorParams: DeepBrand<ConstructorOverloadParameters<T>>;
};
/**
* Checks if two types are strictly equal using branding.
*/
export type StrictEqualUsingBranding<Left, Right> = MutuallyExtends<DeepBrand<Left>, DeepBrand<Right>>;
@@ -0,0 +1,720 @@
'use strict'
const { MockNotMatchedError } = require('./mock-errors')
const {
kDispatches,
kMockAgent,
kOriginalDispatch,
kOrigin,
kGetNetConnect,
kTotalDispatchCount
} = require('./mock-symbols')
const { serializePathWithQuery, parseHeaders } = require('../core/util')
const { STATUS_CODES } = require('node:http')
const {
types: {
isPromise
}
} = require('node:util')
const { InvalidArgumentError } = require('../core/errors')
const requestAborted = Symbol('request aborted')
function matchValue (match, value) {
if (typeof match === 'string') {
return match === value
}
if (match instanceof RegExp) {
return match.test(value)
}
if (typeof match === 'function') {
return match(value) === true
}
return false
}
function lowerCaseEntries (headers) {
return Object.fromEntries(
Object.entries(headers).map(([headerName, headerValue]) => {
return [headerName.toLocaleLowerCase(), headerValue]
})
)
}
/**
* @param {import('../../index').Headers|string[]|Record<string, string>} headers
* @param {string} key
*/
function getHeaderByName (headers, key) {
if (Array.isArray(headers)) {
for (let i = 0; i < headers.length; i += 2) {
if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) {
return headers[i + 1]
}
}
return undefined
} else if (typeof headers.get === 'function') {
return headers.get(key)
} else {
return lowerCaseEntries(headers)[key.toLocaleLowerCase()]
}
}
/** @param {string[]} headers */
function buildHeadersFromArray (headers) { // fetch HeadersList
const clone = headers.slice()
const entries = []
for (let index = 0; index < clone.length; index += 2) {
entries.push([clone[index], clone[index + 1]])
}
return Object.fromEntries(entries)
}
function matchHeaders (mockDispatch, headers) {
if (typeof mockDispatch.headers === 'function') {
if (Array.isArray(headers)) { // fetch HeadersList
headers = buildHeadersFromArray(headers)
}
return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {})
}
if (typeof mockDispatch.headers === 'undefined') {
return true
}
if (typeof headers !== 'object' || typeof mockDispatch.headers !== 'object') {
return false
}
for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) {
const headerValue = getHeaderByName(headers, matchHeaderName)
if (!matchValue(matchHeaderValue, headerValue)) {
return false
}
}
return true
}
function normalizeSearchParams (query) {
if (typeof query !== 'string') {
return query
}
const originalQp = new URLSearchParams(query)
const normalizedQp = new URLSearchParams()
for (let [key, value] of originalQp.entries()) {
key = key.replace('[]', '')
const valueRepresentsString = /^(['"]).*\1$/.test(value)
if (valueRepresentsString) {
normalizedQp.append(key, value)
continue
}
if (value.includes(',')) {
const values = value.split(',')
for (const v of values) {
normalizedQp.append(key, v)
}
continue
}
normalizedQp.append(key, value)
}
return normalizedQp
}
function safeUrl (path) {
if (typeof path !== 'string') {
return path
}
const pathSegments = path.split('?', 3)
if (pathSegments.length !== 2) {
return path
}
const qp = new URLSearchParams(pathSegments.pop())
qp.sort()
return [...pathSegments, qp.toString()].join('?')
}
function matchKey (mockDispatch, { path, method, body, headers }) {
const pathMatch = matchValue(mockDispatch.path, path)
const methodMatch = matchValue(mockDispatch.method, method)
const bodyMatch = typeof mockDispatch.body !== 'undefined' ? matchValue(mockDispatch.body, body) : true
const headersMatch = matchHeaders(mockDispatch, headers)
return pathMatch && methodMatch && bodyMatch && headersMatch
}
function getResponseData (data) {
if (Buffer.isBuffer(data)) {
return data
} else if (data instanceof Uint8Array) {
return data
} else if (data instanceof ArrayBuffer) {
return data
} else if (ArrayBuffer.isView(data)) {
// A DataView, or any non-Uint8Array typed array, is a byte container
// rather than a plain object. Buffer.from() cannot read one directly, so
// expose the bytes it covers instead of letting it reach JSON.stringify.
return new Uint8Array(data.buffer, data.byteOffset, data.byteLength)
} else if (typeof data === 'object') {
return JSON.stringify(data)
} else if (data) {
return data.toString()
} else {
return ''
}
}
function getMockDispatch (mockDispatches, key) {
const basePath = key.query ? serializePathWithQuery(key.path, key.query) : key.path
const resolvedPath = typeof basePath === 'string' ? safeUrl(basePath) : basePath
const resolvedPathWithoutTrailingSlash = removeTrailingSlash(resolvedPath)
// Match path
let matchedMockDispatches = mockDispatches
.filter(({ consumed }) => !consumed)
.filter(({ path, ignoreTrailingSlash }) => {
return ignoreTrailingSlash
? matchValue(removeTrailingSlash(safeUrl(path)), resolvedPathWithoutTrailingSlash)
: matchValue(safeUrl(path), resolvedPath)
})
if (matchedMockDispatches.length === 0) {
throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`)
}
// Match method
matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method))
if (matchedMockDispatches.length === 0) {
throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`)
}
// Match body
matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== 'undefined' ? matchValue(body, key.body) : true)
if (matchedMockDispatches.length === 0) {
throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`)
}
// Match headers
matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers))
if (matchedMockDispatches.length === 0) {
const headers = typeof key.headers === 'object' ? JSON.stringify(key.headers) : key.headers
throw new MockNotMatchedError(`Mock dispatch not matched for headers '${headers}' on path '${resolvedPath}'`)
}
return matchedMockDispatches[0]
}
function addMockDispatch (mockDispatches, key, data, opts) {
const baseData = { timesInvoked: 0, times: 1, persist: false, consumed: false, ...opts }
const replyData = typeof data === 'function' ? { callback: data } : { ...data }
const newMockDispatch = { ...baseData, ...key, pending: true, data: { error: null, ...replyData } }
mockDispatches.push(newMockDispatch)
// Track total number of intercepts ever registered for better error messages
mockDispatches[kTotalDispatchCount] = (mockDispatches[kTotalDispatchCount] || 0) + 1
return newMockDispatch
}
function deleteMockDispatch (mockDispatches, key) {
const index = mockDispatches.findIndex(dispatch => {
if (!dispatch.consumed) {
return false
}
return matchKey(dispatch, key)
})
if (index !== -1) {
mockDispatches.splice(index, 1)
}
}
/**
* @param {string|RegExp|Function} path Path, or path matcher, to remove trailing slash from
*/
function removeTrailingSlash (path) {
// Registered path matchers may be a RegExp or a function, which have no
// trailing slash to strip; hand those back for matchValue to apply.
if (typeof path !== 'string') {
return path
}
while (path.endsWith('/')) {
path = path.slice(0, -1)
}
if (path.length === 0) {
path = '/'
}
return path
}
function buildKey (opts) {
const { path, method, body, headers, query } = opts
return {
path,
method,
body,
headers,
query
}
}
function generateKeyValues (data) {
const keys = Object.keys(data)
const result = []
for (let i = 0; i < keys.length; ++i) {
const key = keys[i]
const value = data[key]
const name = Buffer.from(`${key}`)
if (Array.isArray(value)) {
for (let j = 0; j < value.length; ++j) {
result.push(name, Buffer.from(`${value[j]}`))
}
} else {
result.push(name, Buffer.from(`${value}`))
}
}
return result
}
/**
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
* @param {number} statusCode
*/
function getStatusText (statusCode) {
return STATUS_CODES[statusCode] || 'unknown'
}
async function getResponse (body) {
const buffers = []
for await (const data of body) {
buffers.push(data)
}
return Buffer.concat(buffers).toString('utf8')
}
/**
* Mock dispatch function used to simulate undici dispatches
*/
function mockDispatch (opts, handler) {
// Get mock dispatch from built key
const key = buildKey(opts)
const mockDispatch = getMockDispatch(this[kDispatches], key)
const mockDispatches = this[kDispatches]
mockDispatch.timesInvoked++
const { timesInvoked, times } = mockDispatch
// If it's used up and not persistent, mark as consumed
mockDispatch.consumed = !mockDispatch.persist && timesInvoked >= times
mockDispatch.pending = timesInvoked < times
const hasBodyHooks = typeof handler.onBodySent === 'function' ||
typeof handler.onRequestSent === 'function'
// Here's where we resolve a callback if a callback is present for the dispatch data.
if (mockDispatch.data.callback && (!hasBodyHooks || opts.body == null)) {
const { callback, ...responseDefaults } = mockDispatch.data
const callbackResult = callback(opts)
// An asynchronous reply options callback resolves to the reply data, so
// the dispatch can only continue once the returned promise settles.
// A rejection cannot be thrown synchronously from the dispatch at that
// point, so it is surfaced as a response error instead.
if (isPromise(callbackResult)) {
callbackResult.then(
(resolvedData) => {
if (resolvedData == null || typeof resolvedData !== 'object') {
handler.onResponseError(null, new InvalidArgumentError('reply options callback must return an object'))
return
}
dispatchMockReply(mockDispatches, mockDispatch, key, opts, handler, { ...responseDefaults, ...resolvedData })
},
(error) => {
handler.onResponseError(null, error)
}
)
return true
}
if (callbackResult == null || typeof callbackResult !== 'object') {
throw new InvalidArgumentError('reply options callback must return an object')
}
return dispatchMockReply(mockDispatches, mockDispatch, key, opts, handler, { ...responseDefaults, ...callbackResult })
}
return dispatchMockReply(mockDispatches, mockDispatch, key, opts, handler)
}
/**
* Replies to a request once the mock dispatch data is fully resolved
*/
function dispatchMockReply (mockDispatches, mockDispatch, key, opts, handler, resolvedResponse) {
// Parse mockDispatch data. When a reply callback has already been resolved
// in mockDispatch() (i.e. no body lifecycle hooks are involved), the resolved
// response is passed in here, leaving mockDispatch.data untouched so the
// callback can be re-invoked for persistent / times() replies.
const { data: responseData, delay } = mockDispatch
const response = resolvedResponse ?? responseData
// If specified, trigger dispatch error
if (response.error !== null) {
deleteMockDispatch(mockDispatches, key)
handler.onResponseError(null, response.error)
return true
}
// Track whether the request has been aborted
let aborted = false
let timer = null
// Create the controller early so abort can use it
const controller = {
paused: false,
rawHeaders: null,
rawTrailers: null,
pause () {
this.paused = true
},
resume () {
this.paused = false
},
abort: (reason) => {
if (aborted) {
return
}
aborted = true
// Clear the pending delayed response if any
if (timer !== null) {
clearTimeout(timer)
timer = null
}
handler.onResponseError?.(controller, reason)
}
}
let replyOpts = opts
const dispatches = mockDispatches
// Call onRequestStart to allow the handler to receive the controller
handler.onRequestStart?.(controller, null)
if (aborted) {
return true
}
const requestBody = dispatchRequestBody(opts.body, handler, controller, () => aborted)
if (isPromise(requestBody)) {
requestBody.then((body) => {
if (body === requestAborted) {
return
}
if (body !== opts.body) {
replyOpts = { ...opts, body }
}
sendReply()
}, (error) => controller.abort(error))
return true
}
if (requestBody === requestAborted) {
return true
}
if (requestBody !== opts.body) {
replyOpts = { ...opts, body: requestBody }
}
sendReply()
function sendReply () {
if (response.callback) {
const { callback, ...responseDefaults } = response
let callbackResult
try {
callbackResult = callback(replyOpts)
} catch (err) {
deleteMockDispatch(mockDispatches, key)
handler.onResponseError(null, err)
return
}
if (isPromise(callbackResult)) {
callbackResult.then(
(resolvedData) => {
if (resolvedData == null || typeof resolvedData !== 'object') {
handler.onResponseError(null, new InvalidArgumentError('reply options callback must return an object'))
return
}
handleReply(dispatches, { ...responseDefaults, ...resolvedData })
},
(err) => {
handler.onResponseError(null, err)
}
)
return
}
if (callbackResult == null || typeof callbackResult !== 'object') {
throw new InvalidArgumentError('reply options callback must return an object')
}
handleReply(dispatches, { ...responseDefaults, ...callbackResult })
return
}
// Handle the request with a delay if necessary
if (typeof delay === 'number' && delay > 0) {
timer = setTimeout(() => {
timer = null
handleReply(dispatches)
}, delay)
} else {
handleReply(dispatches)
}
}
function handleReply (mockDispatches, _response = response) {
// Don't send response if the request was aborted
if (aborted) {
return
}
const { statusCode, data, headers, trailers } = _response
// fetch's HeadersList is a 1D string array
const optsHeaders = Array.isArray(opts.headers)
? buildHeadersFromArray(opts.headers)
: opts.headers
const body = typeof data === 'function'
? data({ ...replyOpts, headers: optsHeaders })
: data
// util.types.isPromise is likely needed for jest.
if (isPromise(body)) {
// If handleReply is asynchronous, throwing an error
// in the callback will reject the promise, rather than
// synchronously throw the error, which breaks some tests.
// Rather, we wait for the callback to resolve if it is a
// promise, and then re-run handleReply with the new body.
return body.then((newData) => handleReply(mockDispatches, { ..._response, data: newData }))
}
// Check again if aborted after async body resolution
if (aborted) {
return
}
const responseData = getResponseData(body)
const responseHeaders = generateKeyValues(headers ?? {})
const responseTrailers = generateKeyValues(trailers ?? {})
// Update the controller with response data
controller.rawHeaders = responseHeaders
controller.rawTrailers = responseTrailers
handler.onResponseStart?.(controller, statusCode, parseHeaders(responseHeaders), getStatusText(statusCode))
handler.onResponseData?.(controller, Buffer.from(responseData))
handler.onResponseEnd?.(controller, parseHeaders(responseTrailers))
deleteMockDispatch(mockDispatches, key)
}
return true
}
function dispatchRequestBody (body, handler, controller, isAborted) {
if (typeof handler.onBodySent !== 'function' && typeof handler.onRequestSent !== 'function') {
return body
}
if (body == null) {
return callOnRequestSent(handler, controller, isAborted) ? body : requestAborted
}
if (body && typeof body[Symbol.asyncIterator] === 'function') {
return dispatchAsyncIterableBody(body, handler, controller, isAborted)
}
if (isIterableBody(body)) {
const chunks = []
for (const chunk of body) {
if (isAborted()) {
return requestAborted
}
chunks.push(chunk)
if (!callOnBodySent(handler, controller, chunk) || isAborted()) {
return requestAborted
}
}
return callOnRequestSent(handler, controller, isAborted) ? chunks : requestAborted
}
if (isAborted()) {
return requestAborted
}
if (!callOnBodySent(handler, controller, body)) {
return requestAborted
}
return callOnRequestSent(handler, controller, isAborted) ? body : requestAborted
}
async function dispatchAsyncIterableBody (body, handler, controller, isAborted) {
const chunks = []
for await (const chunk of body) {
if (isAborted()) {
return requestAborted
}
chunks.push(chunk)
if (!callOnBodySent(handler, controller, chunk) || isAborted()) {
return requestAborted
}
}
if (!callOnRequestSent(handler, controller, isAborted)) {
return requestAborted
}
return {
async * [Symbol.asyncIterator] () {
yield * chunks
}
}
}
function callOnBodySent (handler, controller, chunk) {
try {
handler.onBodySent?.(chunk)
return true
} catch (error) {
controller.abort(error)
return false
}
}
function callOnRequestSent (handler, controller, isAborted) {
try {
handler.onRequestSent?.()
return !isAborted()
} catch (error) {
controller.abort(error)
return false
}
}
function isIterableBody (body) {
return typeof body !== 'string' &&
!Buffer.isBuffer(body) &&
!ArrayBuffer.isView(body) &&
typeof body[Symbol.iterator] === 'function'
}
function buildMockDispatch () {
const agent = this[kMockAgent]
const origin = this[kOrigin]
const originalDispatch = this[kOriginalDispatch]
return function dispatch (opts, handler) {
if (agent.isMockActive) {
try {
mockDispatch.call(this, opts, handler)
} catch (error) {
if (error.code === 'UND_MOCK_ERR_MOCK_NOT_MATCHED') {
const netConnect = agent[kGetNetConnect]()
const totalInterceptsCount = this[kDispatches][kTotalDispatchCount] || this[kDispatches].length
const pendingInterceptsCount = this[kDispatches].filter(({ consumed }) => !consumed).length
const interceptsMessage = `, ${pendingInterceptsCount} interceptor(s) remaining out of ${totalInterceptsCount} defined`
if (netConnect === false) {
throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)${interceptsMessage}`)
}
if (checkNetConnect(netConnect, origin)) {
originalDispatch.call(this, '__mockAgentBodyForDispatch' in opts
? { ...opts, body: opts.__mockAgentBodyForDispatch }
: opts, handler)
} else {
throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)${interceptsMessage}`)
}
} else {
throw error
}
}
} else {
originalDispatch.call(this, opts, handler)
}
}
}
function checkNetConnect (netConnect, origin) {
const url = new URL(origin)
if (netConnect === true) {
return true
} else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) {
return true
}
return false
}
function normalizeOrigin (origin) {
if (typeof origin !== 'string' && !(origin instanceof URL)) {
return origin
}
if (origin instanceof URL) {
return origin.origin
}
return origin.toLowerCase()
}
function buildAndValidateMockOptions (opts) {
const { agent, ...mockOptions } = opts
if ('enableCallHistory' in mockOptions && typeof mockOptions.enableCallHistory !== 'boolean') {
throw new InvalidArgumentError('options.enableCallHistory must to be a boolean')
}
if ('acceptNonStandardSearchParameters' in mockOptions && typeof mockOptions.acceptNonStandardSearchParameters !== 'boolean') {
throw new InvalidArgumentError('options.acceptNonStandardSearchParameters must to be a boolean')
}
if ('ignoreTrailingSlash' in mockOptions && typeof mockOptions.ignoreTrailingSlash !== 'boolean') {
throw new InvalidArgumentError('options.ignoreTrailingSlash must to be a boolean')
}
return mockOptions
}
module.exports = {
getResponseData,
getMockDispatch,
addMockDispatch,
deleteMockDispatch,
buildKey,
generateKeyValues,
matchValue,
getResponse,
getStatusText,
mockDispatch,
buildMockDispatch,
checkNetConnect,
buildAndValidateMockOptions,
getHeaderByName,
buildHeadersFromArray,
normalizeSearchParams,
normalizeOrigin
}
@@ -0,0 +1,12 @@
type GeneratedColumn = number;
type SourcesIndex = number;
type SourceLine = number;
type SourceColumn = number;
type NamesIndex = number;
export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];
export declare const COLUMN = 0;
export declare const SOURCES_INDEX = 1;
export declare const SOURCE_LINE = 2;
export declare const SOURCE_COLUMN = 3;
export declare const NAMES_INDEX = 4;
export {};
@@ -0,0 +1,722 @@
flf2a$ 6 4 16 0 4
Autore: Marco Bodrato <bodrato@genio.sns.it>
Data: 12 Novembre 1994
Stile: stampatello minuscolo e maiuscole varie.
File: stampatello.flf
$$@
$$@
$$@
$ @
$ @
$ @@
/\$@
\/$@
,.$@
`'$@
@
@@
;;$@
$ @
@
@
@
@@
. .$ @
-|-|-$@
-|-|-$@
' `$ @
@
@@
@
,|.$@
`+.$@
`|'$@
@
@@
@
,. , $@
`'/,.$@
' `'$@
@
@@
@
,. $@
>-:,$@
`-'`$@
@
@@
@
,'$@
$ @
@
@
@@
,-$@
/$ @
|$ @
\$ @
`-$@
@@
-.$ @
\$@
|$@
/$@
-'$ @
@@
@
. ,$@
-X-$@
' `$@
@
@@
@
. $@
-|-$@
' $@
@
@@
$ @
$ @
,.$@
|/$@
@
@@
@
@
--$@
@
@
@@
$ @
$ @
,.$@
`'$@
@
@@
@
,$@
/$ @
'$ @
@
@@
,--.$@
| |$@
| |$@
`--'$@
@
@@
, $@
/| $@
' | $@
$-^-$@
@
@@
,--.$@
$ /$@
,-' $@
`---$@
@
@@
,--.$@
$__|$@
$ |$@
`--'$@
@
@@
$ , $@
$/| $@
'-+-$@
$ ` $@
@
@@
,---$@
|__ $@
$ \$@
`--'$@
@
@@
,--.$@
|__ $@
| \$@
`--'$@
@
@@
,--,$@
$ / $@
$/ $@
' $@
@
@@
,--.$@
\__/$@
/ \$@
`--'$@
@
@@
,--.$@
\__|$@
$ |$@
`--'$@
@
@@
,.$@
`'$@
,.$@
`'$@
@
@@
,.$@
`'$@
,.$@
|/$@
@
@@
,$@
/ $@
\ $@
`$@
@
@@
@
--$@
--$@
@
@
@@
. $@
\$@
/$@
' $@
@
@@
,--.$@
/$ @
,.$ @
`'$ @
@
@@
,-.$ @
/,-.\$@
|,-||$@
\`-^/$@
`-'$ @
@@
,.$ @
/ |$$ @
/~~|-.$@
,' `-'$@
@
@@
,-,---.$@
'|___/$@
,| \$@
`-^---'$@
@
@@
,---.$@
| -'$@
| -.$@
`---'$@
@
@@
.-,--.$ @
' | \$@
, | /$@
`-^--'$ @
@
@@
`.---$@
|__$ @
,| $ @
`^---$@
@
@@
`.---$@
|__$ @
,|$ @
`'$ @
@
@@
,---.$ @
| -'$ @
| ,-'$@
`---|$ @
,-.|$ @
`-+'$ @@
,-_/,.$@
' |_|/$@
/| |$ @
`' `'$@
@
@@
,-_/$@
' |$@
.- |$@
`--'$@
@
@@
,-_/$@
' |$@
|$@
|$@
/ |$@
`--'$@@
,-, ,$@
'|/$ @
|\$ @
,' `$@
@
@@
.$ @
|$ @
| $ @
`--'$@
@
@@
,-,-,-. $ @
`,| | | $ @
| ; | .$@
' `-'$@
@
@@
,-,-. $ @
` | | $ @
| |-.$@
,' `-'$@
@
@@
,---.$@
| |$@
| |$@
`---'$@
@
@@
.-,--.$@
'|__/$@
.| $ @
`'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@
. , ,$@
|/|/$ @
' ' $ @
@
@@
@
. ,$@
X $@
' `$@
@
@@
@
. .$@
| |$@
`-|$@
/|$@
`-'$@@
@
,_,$@
/ $@
'"'$@
@
@@
.-$@
)$@
<$ @
)$@
'-$@
@@
|$@
|$@
|$@
|$@
|$@
@@
-,$@
( $@
>$@
( $@
-`$@
@@
,','$@
$ $ @
$ $ @
$$ @
@
@@
o, o$ @
/ \ $ @
/~~|-.$@
,' `-'$@
@
@@
,o-o.$@
| |$@
| |$@
`---'$@
@
@@
. o o$ @
'\ |$ @
| | .$@
`--^-'$@
@
@@
o o$@
,-.$@
,-|$@
`-^$@
@
@@
o o$@
,-.$@
| |$@
`-'$@
@
@@
o o$@
. .$@
| |$@
`-'$@
@
@@
,-.$ @
|_/$ @
,| .\$@
`-' `'$@
@
@@
161
,.$@
`'$@
/\$@
\/$@
@
@@
162
@
,+.$@
|| $@
`+'$@
@
@@
166
|$@
|$@
$$@
|$@
|$@
$$@@
167
@
,-.@
|-.@
`-|@
`-'@
@@
168
~ ~$@
$ $ @
$ @
@
@
@@
169
,-.$ @
/,-.\$@
|| |$@
\`-'/$@
`-'$ @
@@
170
_.@
(_|@
~~~@
$$@
@
@@
171
, ,$@
/ /$ @
\ \$ @
` `$@
@
@@
172
@
---.$@
|$@
@
@
@@
174
,-.$ @
/,-.\$@
|| |$@
\' /$@
`-'$ @
@@
176
,.$@
`'$@
$ @
@
@
@@
178
,.$@
/$@
""$@
$ @
@
@@
179
,.$@
+$@
`'$@
$ @
@
@@
180
,.$@
$ @
$ @
@
@
@@
181
,.$@
$ @
$ @
@
@
@@
@@ -0,0 +1 @@
{"version":3,"file":"honoWebStandardStreamableHttp.js","sourceRoot":"","sources":["../../../../src/examples/server/honoWebStandardStreamableHttp.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,+BAA4B;AAC5B,oCAAiC;AACjC,mDAA0C;AAC1C,0CAA4B;AAC5B,gDAAgD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,CAAC,EAAC,EAAE;IACtB,MAAM,SAAS,GAAG,IAAI,uEAAwC,EAAE,CAAC;IACjE,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAC9C,CAAC,CAAC,CAAC;AAEH,mBAAmB;AACnB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAE9E,OAAO,CAAC,GAAG,CAAC,oCAAoC,IAAI,EAAE,CAAC,CAAC;AACxD,OAAO,CAAC,GAAG,CAAC,kCAAkC,IAAI,SAAS,CAAC,CAAC;AAC7D,OAAO,CAAC,GAAG,CAAC,kCAAkC,IAAI,MAAM,CAAC,CAAC;AAE1D,IAAA,mBAAK,EAAC;IACF,KAAK,EAAE,GAAG,CAAC,KAAK;IAChB,IAAI,EAAE,IAAI;CACb,CAAC,CAAC"}
@@ -0,0 +1,37 @@
this.zxcvbnts = this.zxcvbnts || {};
this.zxcvbnts["language-common"] = (function (exports) {
'use strict';
var tempAdjacencyGraphs = {"azerty":{"0":["ç9",null,null,")°","pP","oO"],"1":["²~",null,null,"é2","aA",null],"2":["&1",null,null,"\"3","zZ","aA"],"3":["é2",null,null,"'4","eE","zZ"],"4":["\"3",null,null,"(5","rR","eE"],"5":["'4",null,null,"-6","tT","rR"],"6":["(5",null,null,"è7","yY","tT"],"7":["-6",null,null,"_8","uU","yY"],"8":["è7",null,null,"ç9","iI","uU"],"9":["_8",null,null,"à0","oO","iI"],"²":[null,null,null,"&1",null,null],"~":[null,null,null,"&1",null,null],"&":["²~",null,null,"é2","aA",null],"é":["&1",null,null,"\"3","zZ","aA"],"\"":["pP",")°","+=","$£","ù%","mM"],"'":["\"3",null,null,"(5","rR","eE"],"(":["'4",null,null,"-6","tT","rR"],"-":["(5",null,null,"è7","yY","tT"],"è":["-6",null,null,"_8","uU","yY"],"_":["è7",null,null,"ç9","iI","uU"],"ç":["_8",null,null,"à0","oO","iI"],"à":["ç9",null,null,")°","pP","oO"],")":["à0",null,null,"+=","^\"","pP"],"°":["à0",null,null,"+=","^\"","pP"],"+":[")°",null,null,null,"$£","^\""],"=":[")°",null,null,null,"$£","^\""],"a":[null,"&1","é2","zZ","qQ",null],"A":[null,"&1","é2","zZ","qQ",null],"z":["aA","é2","\"3","eE","sS","qQ"],"Z":["aA","é2","\"3","eE","sS","qQ"],"e":["zZ","\"3","'4","rR","dD","sS"],"E":["zZ","\"3","'4","rR","dD","sS"],"r":["eE","'4","(5","tT","fF","dD"],"R":["eE","'4","(5","tT","fF","dD"],"t":["rR","(5","-6","yY","gG","fF"],"T":["rR","(5","-6","yY","gG","fF"],"y":["tT","-6","è7","uU","hH","gG"],"Y":["tT","-6","è7","uU","hH","gG"],"u":["yY","è7","_8","iI","jJ","hH"],"U":["yY","è7","_8","iI","jJ","hH"],"i":["uU","_8","ç9","oO","kK","jJ"],"I":["uU","_8","ç9","oO","kK","jJ"],"o":["iI","ç9","à0","pP","lL","kK"],"O":["iI","ç9","à0","pP","lL","kK"],"p":["oO","à0",")°","^\"","mM","lL"],"P":["oO","à0",")°","^\"","mM","lL"],"^":["pP",")°","+=","$£","ù%","mM"],"$":["^\"","+=",null,null,"*µ","ù%"],"£":["^\"","+=",null,null,"*µ","ù%"],"q":[null,"aA","zZ","sS","wW","<>"],"Q":[null,"aA","zZ","sS","wW","<>"],"s":["qQ","zZ","eE","dD","xX","wW"],"S":["qQ","zZ","eE","dD","xX","wW"],"d":["sS","eE","rR","fF","cC","xX"],"D":["sS","eE","rR","fF","cC","xX"],"f":["dD","rR","tT","gG","vV","cC"],"F":["dD","rR","tT","gG","vV","cC"],"g":["fF","tT","yY","hH","bB","vV"],"G":["fF","tT","yY","hH","bB","vV"],"h":["gG","yY","uU","jJ","nN","bB"],"H":["gG","yY","uU","jJ","nN","bB"],"j":["hH","uU","iI","kK",",?","nN"],"J":["hH","uU","iI","kK",",?","nN"],"k":["jJ","iI","oO","lL",";.",",?"],"K":["jJ","iI","oO","lL",";.",",?"],"l":["kK","oO","pP","mM",":/",";."],"L":["kK","oO","pP","mM",":/",";."],"m":["lL","pP","^\"","ù%","!§",":/"],"M":["lL","pP","^\"","ù%","!§",":/"],"ù":["mM","^\"","$£","*µ",null,"!§"],"%":["mM","^\"","$£","*µ",null,"!§"],"*":["ù%","$£",null,null,null,null],"µ":["ù%","$£",null,null,null,null],"<":[null,null,"qQ","wW",null,null],">":[null,null,"qQ","wW",null,null],"w":["<>","qQ","sS","xX",null,null],"W":["<>","qQ","sS","xX",null,null],"x":["wW","sS","dD","cC",null,null],"X":["wW","sS","dD","cC",null,null],"c":["xX","dD","fF","vV",null,null],"C":["xX","dD","fF","vV",null,null],"v":["cC","fF","gG","bB",null,null],"V":["cC","fF","gG","bB",null,null],"b":["vV","gG","hH","nN",null,null],"B":["vV","gG","hH","nN",null,null],"n":["bB","hH","jJ",",?",null,null],"N":["bB","hH","jJ",",?",null,null],",":["nN","jJ","kK",";.",null,null],"?":["nN","jJ","kK",";.",null,null],";":[",?","kK","lL",":/",null,null],".":[",?","kK","lL",":/",null,null],":":[";.","lL","mM","!§",null,null],"/":[";.","lL","mM","!§",null,null],"!":[":/","mM","ù%",null,null,null],"§":[":/","mM","ù%",null,null,null]},"dvorak":{"0":["9(",null,null,"[{","lL","rR"],"1":["`~",null,null,"2@","'\"",null],"2":["1!",null,null,"3#",",<","'\""],"3":["2@",null,null,"4$",".>",",<"],"4":["3#",null,null,"5%","pP",".>"],"5":["4$",null,null,"6^","yY","pP"],"6":["5%",null,null,"7&","fF","yY"],"7":["6^",null,null,"8*","gG","fF"],"8":["7&",null,null,"9(","cC","gG"],"9":["8*",null,null,"0)","rR","cC"],"`":[null,null,null,"1!",null,null],"~":[null,null,null,"1!",null,null],"!":["`~",null,null,"2@","'\"",null],"@":["1!",null,null,"3#",",<","'\""],"#":["2@",null,null,"4$",".>",",<"],"$":["3#",null,null,"5%","pP",".>"],"%":["4$",null,null,"6^","yY","pP"],"^":["5%",null,null,"7&","fF","yY"],"&":["6^",null,null,"8*","gG","fF"],"*":["7&",null,null,"9(","cC","gG"],"(":["8*",null,null,"0)","rR","cC"],")":["9(",null,null,"[{","lL","rR"],"[":["0)",null,null,"]}","/?","lL"],"{":["0)",null,null,"]}","/?","lL"],"]":["[{",null,null,null,"=+","/?"],"}":["[{",null,null,null,"=+","/?"],"'":[null,"1!","2@",",<","aA",null],"\"":[null,"1!","2@",",<","aA",null],",":["'\"","2@","3#",".>","oO","aA"],"<":["'\"","2@","3#",".>","oO","aA"],".":[",<","3#","4$","pP","eE","oO"],">":[",<","3#","4$","pP","eE","oO"],"p":[".>","4$","5%","yY","uU","eE"],"P":[".>","4$","5%","yY","uU","eE"],"y":["pP","5%","6^","fF","iI","uU"],"Y":["pP","5%","6^","fF","iI","uU"],"f":["yY","6^","7&","gG","dD","iI"],"F":["yY","6^","7&","gG","dD","iI"],"g":["fF","7&","8*","cC","hH","dD"],"G":["fF","7&","8*Line truncated
function decompress(encodedString) {
const decompressedArray = encodedString.split(/([A-Z])/g);
const decompressedData = [];
let last = "";
let i;
for (i = 1; i < decompressedArray.length; i += 2) {
last = last.slice(0, decompressedArray[i].charCodeAt(0) - 65) + decompressedArray[i + 1];
decompressedData.push(last);
}
return decompressedData;
}
var diceware = decompress("AabacusCdomenFinalCideEingDlityClazeDeCnormalCrasionGveDeastDidgeDoadDuptlyCsenceFteeGlyDintheDoluteFveDtainEractDurdBccentDlaimEimateDompanyEuntDuracyGteEstomCetoneChinessFgCidCornCquaintEireCreDobatEnymCtingEonEvateHorFeFismHtGtyDressDsCutelyFnessBerationDobicsEsolFpaceBfarCfairDectedGingHonDidavitEliateErmExDlictedEuentDordDrontClameDoatDutterCootCraidCterglowFlifeFmathGostFnoonBgedDlessDncyEdaEtCgregateChastCileEityDngCnosticConizeGingEyCreeableIyFdFingFmentDoundBheadCoyBideDsCmBjarBlabasterDrmCbatrossDumCfalfaCgebraDorithmCiasDbiDenableGteFsDkeDveCkalineGzeCmanacDightyDostCoeDftDhaDneEgsideDofCphabetCrightCthoughDitudeDoCuminumEniCwaysBmarettoDzeEinglyCberDianceEguityGousEtionHusDulanceEshCendableFmentFsEityCiableDcablyDdDgoDnoDssCmoniaGumCnestyDioticCongDuntCperageDleEifierGyEyCuckDletDsableEedFmentFrEingBnacondaDerobicDgramDtomistGyCchorFvyDientCdroidCemiaFcDurismDwCgelfishFicErDledFrFsEingDrilyFnessDuishedElarCimalFteGingHonGorEeEosityCkleCnexDotateEuncerEyingDuallyEityCointerDtherCsweringCtacidErcticDeaterElopeEnnaeDhemEillEologyDibodyEcsEdoteEheroEquelyHsGityErustEtoxicFrustEviralHusDlerDonymDsyCvilCybodyDhowDmoreDoneDplaceDthingEimeDwayEhereBortaBpacheCostleCpealingFrFseGingEndageGixEtiteGzerDlaudGseEeEianceFcantFedEyDointeeDraisalHerEehendEoachFvalGeCricotElDonCtitudeDlyBquaDeductBrbitraryHteCdentlyCeaDnaCguableHyEeCiseCmadilloDbandDchairDedDfulDholeDingDlessDoireEredFyDrestDyComaDseDundEsalCrangeEyDestDivalFeDoganceHtCsonCtBscendFsionFtErtainChamedDenEsDyCideCkewCleepCparagusDectDirateFeFinCtonishEundDrideEologyFnautGomyDuteBtlanticEsComDnableDpCriumDociousEphyCtachEinDemptEndantGeeFtionHveEstDicEreEtudeDractorEibuteCypicalBuctionCdaciousGtyDibleGyEenceEoEtionCgmentedDustCthenticEorDismFticDographEmakerGtedHicEpilotBvailableDlancheDtarCengeFingEueDrageEsionEtCiationForDdCoidBwaitDkenDrdEeChileCkwardCningCokeCryBxisAbabbleFingDiedDoonCckacheEboardGnedEdropEedFrEfieldGreEhandEingElandsGshFessFightGtFogEpackFedalErestFoomEshiftFideFlidFpaceGinFtabHgeEtalkFrackEupEwardGshGterEyardDonDteriaHumCdassDgeDlandEyDnessCffleFingCgelDfulDgageEedEieFnessGgEyDpipeDuetteCkedEryEshopDingClanceGingDconyDmyDsamicCmbooCnanaDishFterDjoDkableEbookEedFrEingEnoteErollDnerEisterDsheeDterCrbecueFdFllFrDcodeDgeEraphDistaEtoneDleyDmaidFnDnDometerDrackGudaEelFtteEicadeFerDstoolDtenderFrerCshDicallyFsElEnEsDketCtboyDchDhDonDsDtalionEeredGingGyEingEleCubleCzookaBlabberDdderEeDhDmeEingDnchingEdnessEkDsphemeIyEtDtancyGtlyDzerEingCeachEkDepDmishDndDssCightedDmpDngEkedGrFingFsDpDssfulDtzDzzardCoatedFingDbDgDomersFingEperDtDuseCubberDffDishDndererEtDrbEredFyEtDshEteryBoasterFfulFingDtCbbedEingEleDcatDsledDtailCdaciousDyCggedEleDusCilCkClsterDtCnanzaDdedEingElessDedEheadElessFikeEyDfireDnetDsaiDusDyCogeymanEiemanDkDndocksDtedEhEieFngElaceFegEsDzyCraxDingDoughDrowerGingCssCtanicalGstFyDchDhDtleFingEomCunceFingFyEdingFlessEtifulCvineCxcarDerDingDlikeDyBreachEthDechesGingEderFingEzeFyDthrenDweryEingCiarDbeDckDdeEgedDgadeEhtDlliantDmDngEkDsketFlyFnessEtleDttleCoadbandFcastFenFlyFnessFsideFwaysDilerFingDkenFrDnchialFoEzeFingDokEmDughtDwbeatEnnoseEseFingCuisingDnchEetteEtDshEselsDteEishlyBubbleFingFyCccaneerDkedFtEleEshotFkinEtoothEwheatCddhismHtEingEyDgetCffaloEedFrEingEoonCggyClbDgeEinessEurDkDldogGzerEfightFrogEhornEionFshEpenEringEseyeEwhipEyCnchDdleDgeeDionDkbedEhouseEmateDnyDtCsboyDhDilyDloadDtDybodyCzzAcabanaDbageEieDdriverDleDooseCcheDkleDtiEusCddieEyDetDillacDmiumCgeChootsCkeClamariFityDciumEulateGusDiberFrateDmDoricGeDzoneCmcorderDeoEraDisoleDperEfireEingEsiteEusCnalEryDcelDdiedEleEyDeDineEsterDnabisEedEingEonFtDolaEnEpenerFyDteenDyonCpableGyEcityDeDillaryEtalFolDpedDricornDsizeEuleDtionFvateGeGityEureCramelEtEvanDbonDdboardEedEiacFganFnalEstockDefullyEgiverElessEssEtakerDgoDingDlessEoadDmakerDnageFtionEivalGoreDolDpenterHryEoolFrtDriedEotFuselEyDtelEloadEonFonEridgeEwheelDveEingDwashCscadeDeDhDingFoDketDsetteDuallyGtyCtacombElogFystGzeEpultEractEtonicDcallEhableFerFingFyDererFingDfightFshDhedralEouseDlikeDnapEipDsupDtailEishlyEleEyDwalkCucasianEusDsalFtionEeEingDterizeEionGusCvalierFryDiarEtyBedarCleryEstialDibacyGteDticCmentCnsusCramicsDemonyDtainlyHtyEifiedGyCsareanDspoolBhafeEfingDinErDliceElengeDmberEomileEpionDnceEgeEnelEtDosDperoneElainEpedEsEterDracterEbroilEcoalEgerFingEiotFtyEmEredEterFingDseEingEteFiseGtyDtroomEterFingFyCeatingDddarDekErEseFyDfDmicalsFstEoDrisherEubDssEtDvronEyDwableEerEingEyCiefDhuahuaDldcareFhoodFishFlessGikeEiElDmpDpDrpingFyDtchatDvalryEeClorideGneCoiceDkeholdEingDmpDoserFingFyDpDsenDwderEtimeCromeCubbyDckDgDmmyEpDnkDrnDteBiderClantroCnchDemaDnamonCrcleFingEularHteFsCtableEdelEtionDizenDricEusDyCvicElBladDimDmbakeEmyEorEpEshellDngEkingDppedGrFingDrifyFnetFtyDshEpEsDtterDuseDvicleDwDyCeanErEtEverDftDnchDrgymanEicalEkDverCickerDentDmateGicDngEicEkingDpDqueCoakDbberDckDneEingDsableEureDthesFingDudDverCubbedFingEhouseDmpEsilyFyDnkyDsteredDtchEterBoachDgulantDstalFerFingFlandGineDtDuthorCbaltDblerDwebCcoaEnutCdCeditorDrceDxistCffeeDounderCgnitionHveDwheelCherenceHtEsiveCiLine truncated
var passwords = decompress("A123456ApasswordA12345678AqwertyA123456789FEB11111B234567AdragonA123123AbaseballAabc123AfootballAmonkeyAletmeinAshadowAmasterA696969AmichaelBustangA666666AqwertyuiopA123321D4567890ApussyAsupermanA1qaz2wsxA7777777AfuckyouAjordanAqazwsxAjenniferA123qweA000000AkillerAtrustno1AhunterBarleyAzxcvbnmAasdfghAbusterAandrewAbatmanAsoccerAtiggerAcharlieArobertAsunshineAthomasAiloveyouAfuckmeArangerAdanielAhockeyAgeorgeAcomputerAmichelleAjessicaAstarwarsAassholeApepperAklasterA112233AzxcvbnAfreedomAprincessAjoshuaAmaggieApassAgingerA11111111B31313AfuckAamandaBshleyAloveAcheeseA159753AnicoleAsummerAmatthewAchelseaAdallasAbitemeAmatrixAwilliamAyankeesA6969AtaylorAcorvetteAaustinBccessAmartinAheatherAthunderAmerlinAsecretAdiamondAhelloAanthonyAhammerAfuckerA1234qwerAsilverAgfhjkmAjustinApatrickArichardAbaileyAinternetAsamanthaAgolferAscooterAtestAorangeAcookieAq1w2e3r4t5AmaverickAjacksonAsparkyAmickeyAphoenixAbigdogAsnoopyAguitarAwhateverAchickenAmorganAandreaAcamaroAmercedesApeanutAferrariAcowboyAfalconAwelcomeAsamsungBexyBteelersAjosephAsmokeyAdakotaAmelissaAarsenalAboomerAeaglesAtigersAmarinaAnascarAboobooAgatewayAporscheAyellowAmonsterAspiderAdiabloAhannahAbulldogAjuniorAlondonApurpleAcompaqAlakersAicemanAqwer1234AhardcoreAcowboysAmoneyAbananaAncc1701AbostonBrandonAtennisAjohnnyAmillerAq1w2e3r4AcoffeeAscoobyA123654AedwardAnikitaAmotherAyamahaAbrandyBarneyAchesterAfuckoffAoliverAcharlesAplayerAknightAforeverAstevenArangersAmidnightAchicagoAbigdaddyAredsoxAvictoriaAbadboyAangelApleaseAfenderAchrisAjasperCmesAslayerArabbitAnatashaArachelAbigdickAmarineAwizardAmarlboroAraidersAprinceAcasperAfishingBlowerAcrystalAjasmineApantiesAiwantuAadidasAwinnerDterAgandalfApassword1AenterAghbdtnA1q2w3e4rAangelaAmikeAgoldenAlaurenAcocacolaAjordan23AwinstonAmadisonAangelsAblowmeApantherAsexsexAbigtitsAspankyAbitchAshannonBophieAjohnsonAasdfasdfAdavidAhornyAthx1138BoyotaBigerAmurphyAdickAcanadaAdanielleA12344321AblowjobA8675309AjonathanAliverpooAmuffinAcooperAapplesAjackieAdennisAblackAqwerty123Apassw0rdAjohnAabcd1234AsandraApokemonA123abcAslipknotAcarlosAqazxswA123456aAscorpionAqwaszxAnathanAbutterAstartrekArainbowAasdfghjklArazzBedskinsAnewyorkAgeminiAcameronAqazwsxedcAfloridaAliverpoolAturtleAnicholasAvikingAboogerAwilsonAsierraAbuttheadAdoctorArocketA159357AvictorAdolphinsAcaptainAbanditAjaguarApackersBookieBeachesA789456AasdfAblueAdolphinAhelpmeAtuckerBhemanBiffanyAmaxwellAjeremyAqwertyuiAshitheadAdebbieAalbertAmaddogAloversAmonicaAalexAunitedAgiantsAnirvanaAmetallicAhotdogArosebudAmountainAbenjaminAwarriorAstupidAelephantAsuckitDcessAbond007AjackassAbonnieAalexisApornAluckyAjasonAscorpioBamsonAq1w2e3Arush2112AazertyAfreddyAdriverAwillieAcalvinA1q2w3e4r5tAsydneyAgatorsAdexterAred123A12345aF6qAbubbaAcreativeAgolfAvoodooAhappyAarthurAtroubleAamericaAnissanAgunnerArebeccaAstellaAgarfieldBordonAjessieAbullshitAparkerAasdfghjkA5150AfuckingAapolloAjackA1qazxsw2A2112AeminemAdecemberAlegendAairborneAbeavisAaugustAbearAappleAbrooklynAgodzillaAskippyAbuddyA4815162342AqwertAkittenAmagicAshelbyAbeaverAphantomAfredAnothingAasdasdAwilliamsAxavierAbravesAdarknessAblink182AtravisAcopperAtomcatAplatinumAqweqweAgirlsA01012011AbigboyAgreenApowerA102030AanimalApoliceA11223344AonlineAvoyagerAlifehackA12qwaszxAfishAsniperA315475AtrinityAwalterAblazerAheavenAloverAsnowballAplayboyAbubblesAlovemeAhootersAcricketAmarvinAwillowAdonkeyAtopgunAnintendoAsaturnAfamilyAnovemberAgabrielAdestinyApakistanBumpkinAdigitalAsergeyAchanceAexplorerAredwingsAprivateAtherockArunnerAtitsA789456123AlasvegasAguinnessAbeatlesAfireAcassieBhristinAqwerty1Aasdf1234AcelticAbroncosAandreyA007007AbabygirlAnelsonAdonaldAscottAeclipseAcartmanAfluffyAlouiseAmichiganAtestingAcarolinaAlittleAsamuelAalexandeAbirdieAsteveAcherryApanteraAsharonAgibsonAvampireAmexicoAdickheadApeterAbuffaloAmontanaAgeniusAbeerAflyersAmaximusAschoolAminecraftAlovelyAstalkerAmetallicaAdoggieAcarterAkristinaBimberlyAspencerDedyAbarbaraAsnickersBabrinaAcarmenAmarcusAbroncoAyankeeAfriendsAparadiseAlol123AdreamsAmagnumAhorsesAcoolBarolineA147258369AlacrosseAou812AgooberAmemberAqwertyuAenigmaAscottyApimpinAbollocksBrianAcockAsurferBammyAgenesisApoohbearAdaveAstarAasd123AqweasdzxcAbabyAracingAfriendAhello1BawaiiAeagle1AbillyAviperAoctoberAvanessaApoopooAeinsteinAboobiesAstanleyA12345qAwalkerAbitchesApaulAdrowssapAstephenAcourtneyAsimpleAalaskaAbadgerAactionAjakeAbillAdeniseAjesterA111222AspitfireAdrummerAforestApatriciaAmaryjaneAchampionAdieselAsvetlanaArockAfridayAkevinAmarkAgregoryApamelaAfrankAhotrodA147258AchevyAandersonAlucky1AdouglasAwestsideAsecurityAgoogleAbadassAshortyAtesterBhumperAhitmanAmozartAgeneralAreddogAboobsAzaq12wsxAmusicA010203AlizardAalexanderAmelanieAa123456AruslanA123456789aAvincentAeagleA1232323qAsweetAteresaAscarfaceA147852Aqwerty12Aa12345AmarshallAoliviaAveronicaApornoAbuddhaAspiritAfrankieAmoney1AstargateAantonioAlibertyAnatalieAmercuryAnarutoAqwe123A12345qwertAsuzukiBemperfiAkingApopcornAspookyAmarleyAsystemAbrittanyAclaudiaAkellyAscotlandAfreeAkittyAcherokeeALine truncated
// This file is auto generated by data-scripts/_helpers/runtime.ts
const dictionary = {
'diceware-common': diceware,
'passwords-common': passwords
};
// reinit the variable because the typescript compile will otherwise just reexport the json file which will break as it's a json file
const adjacencyGraphs = tempAdjacencyGraphs;
exports.adjacencyGraphs = adjacencyGraphs;
exports.dictionary = dictionary;
return exports;
})({});
//# sourceMappingURL=zxcvbn-ts.js.map
@@ -0,0 +1,123 @@
import { V as Vitest, av as ResolvedCoverageOptions, a$ as CoverageMap, ao as ReportContext, T as TestProject } from './chunks/reporters.d.DtoKVV2s.js';
import { TransformResult } from 'vite';
import { a as AfterSuiteRunMeta } from './chunks/traces.d.D2T_R8rx.js';
import '@vitest/runner';
import '@vitest/utils';
import 'node:stream';
import './chunks/config.d.A1h_Y6Jt.js';
import '@vitest/pretty-format';
import '@vitest/snapshot';
import '@vitest/utils/diff';
import './chunks/browser.d.BcoexmFG.js';
import './chunks/worker.d.ZpHpO4yb.js';
import 'vite/module-runner';
import './chunks/environment.d.CrsxCzP1.js';
import './chunks/rpc.d.B_8sPU0w.js';
import '@vitest/expect';
import 'vitest/optional-types.js';
import './chunks/benchmark.d.DAaHLpsq.js';
import '@vitest/runner/utils';
import 'tinybench';
import '@vitest/mocker';
import '@vitest/utils/source-map';
import 'vitest/browser';
import './chunks/coverage.d.BZtK59WP.js';
import '@vitest/snapshot/manager';
import 'node:console';
import 'node:fs';
type Threshold = "lines" | "functions" | "statements" | "branches";
interface ResolvedThreshold {
coverageMap: CoverageMap;
name: string;
thresholds: Partial<Record<Threshold, number | undefined>>;
}
/**
* Holds info about raw coverage results that are stored on file system:
*
* ```json
* "project-a": {
* "web": {
* "tests/math.test.ts": "coverage-1.json",
* "tests/utils.test.ts": "coverage-2.json",
* // ^^^^^^^^^^^^^^^ Raw coverage on file system
* },
* "ssr": { ... },
* "browser": { ... },
* },
* "project-b": ...
* ```
*/
type CoverageFiles = Map<NonNullable<AfterSuiteRunMeta["projectName"]> | symbol, Record<AfterSuiteRunMeta["environment"], {
[TestFilenames: string]: string;
}>>;
declare class BaseCoverageProvider {
ctx: Vitest;
readonly name: "v8" | "istanbul";
version: string;
options: ResolvedCoverageOptions;
globCache: Map<string, boolean>;
autoUpdateMarker: string;
coverageFiles: CoverageFiles;
pendingPromises: Promise<void>[];
coverageFilesDirectory: string;
roots: string[];
changedFiles?: string[];
_initialize(ctx: Vitest): void;
/**
* Check if file matches `coverage.include` but not `coverage.exclude`
*/
isIncluded(_filename: string, root?: string): boolean;
private getUntestedFilesByRoot;
getUntestedFiles(testedFiles: string[]): Promise<string[]>;
createCoverageMap(): CoverageMap;
generateReports(_: CoverageMap, __: boolean | undefined): Promise<void>;
parseConfigModule(_: string): Promise<{
generate: () => {
code: string;
};
}>;
resolveOptions(): ResolvedCoverageOptions;
clean(clean?: boolean): Promise<void>;
private normalizeCoverageFileError;
onAfterSuiteRun({ coverage, environment, projectName, testFiles }: AfterSuiteRunMeta): void;
readCoverageFiles<CoverageType>({ onFileRead, onFinished, onDebug }: {
/** Callback invoked with a single coverage result */
onFileRead: (data: CoverageType) => void;
/** Callback invoked once all results of a project for specific transform mode are read */
onFinished: (project: Vitest["projects"][number], environment: string) => Promise<void>;
onDebug: ((...logs: any[]) => void) & {
enabled: boolean;
};
}): Promise<void>;
cleanAfterRun(): Promise<void>;
onTestRunStart(): Promise<void>;
onTestFailure(): Promise<void>;
reportCoverage(coverageMap: unknown, { allTestsRun }: ReportContext): Promise<void>;
reportThresholds(coverageMap: CoverageMap, allTestsRun: boolean | undefined): Promise<void>;
/**
* Constructs collected coverage and users' threshold options into separate sets
* where each threshold set holds their own coverage maps. Threshold set is either
* for specific files defined by glob pattern or global for all other files.
*/
private resolveThresholds;
/**
* Check collected coverage against configured thresholds. Sets exit code to 1 when thresholds not reached.
*/
private checkThresholds;
/**
* Check if current coverage is above configured thresholds and bump the thresholds if needed
*/
updateThresholds({ thresholds: allThresholds, onUpdate, configurationFile }: {
thresholds: ResolvedThreshold[];
configurationFile: unknown;
onUpdate: () => void;
}): Promise<void>;
mergeReports(coverageMaps: unknown[]): Promise<void>;
hasTerminalReporter(reporters: ResolvedCoverageOptions["reporter"]): boolean;
toSlices<T>(array: T[], size: number): T[][];
transformFile(url: string, project: TestProject, viteEnvironment: string): Promise<TransformResult | null | undefined>;
createUncoveredFileTransformer(ctx: Vitest): (filename: string) => Promise<TransformResult | null | undefined>;
}
export { BaseCoverageProvider };
@@ -0,0 +1 @@
{"version":3,"file":"ellipsis-vertical.js","sources":["../../../src/icons/ellipsis-vertical.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name EllipsisVertical\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxIiAvPgogIDxjaXJjbGUgY3g9IjEyIiBjeT0iNSIgcj0iMSIgLz4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjE5IiByPSIxIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/ellipsis-vertical\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst EllipsisVertical = createLucideIcon('EllipsisVertical', [\n ['circle', { cx: '12', cy: '12', r: '1', key: '41hilf' }],\n ['circle', { cx: '12', cy: '5', r: '1', key: 'gxeob9' }],\n ['circle', { cx: '12', cy: '19', r: '1', key: 'lyex9k' }],\n]);\n\nexport default EllipsisVertical;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAmB,iBAAiB,kBAAoB,CAAA,CAAA,CAAA;AAAA,CAC5D,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACxD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACvD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AAC1D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,46 @@
/**
* @fileoverview Rule to restrict what can be thrown as an exception.
* @author Dieter Oberkofler
*/
"use strict";
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "Disallow throwing literals as exceptions",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-throw-literal",
},
schema: [],
messages: {
object: "Expected an error object to be thrown.",
undef: "Do not throw undefined.",
},
},
create(context) {
return {
ThrowStatement(node) {
if (!astUtils.couldBeError(node.argument)) {
context.report({ node, messageId: "object" });
} else if (node.argument.type === "Identifier") {
if (node.argument.name === "undefined") {
context.report({ node, messageId: "undef" });
}
}
},
};
},
};
@@ -0,0 +1,71 @@
{
"name": "ast-v8-to-istanbul",
"version": "1.0.0",
"description": "AST-aware v8-to-istanbul",
"homepage": "https://github.com/AriPerkkio/ast-v8-to-istanbul",
"bugs": "https://github.com/AriPerkkio/ast-v8-to-istanbul",
"license": "MIT",
"author": "Ari Perkkiö <ari.perkkio@gmail.com>",
"repository": {
"type": "git",
"url": "git+https://github.com/AriPerkkio/ast-v8-to-istanbul.git"
},
"files": [
"dist"
],
"type": "module",
"types": "./dist/index.d.mts",
"exports": "./dist/index.mjs",
"dependencies": {
"@jridgewell/trace-mapping": "^0.3.31",
"estree-walker": "^3.0.3",
"js-tokens": "^10.0.0"
},
"devDependencies": {
"@babel/parser": "^7.29.0",
"@babel/types": "^7.29.0",
"@sveltejs/vite-plugin-svelte": "^6.2.4",
"@types/estree": "^1.0.8",
"@types/istanbul-lib-coverage": "^2.0.6",
"@types/istanbul-lib-instrument": "^1.7.8",
"@types/istanbul-lib-report": "^3.0.3",
"@types/istanbul-lib-source-maps": "^4.0.4",
"@types/istanbul-reports": "^3.0.4",
"@types/node": "^25.3.0",
"@vitejs/plugin-vue": "^6.0.4",
"@vitest/coverage-istanbul": "^4.0.18",
"@vitest/coverage-v8": "^4.0.18",
"acorn": "^8.16.0",
"gh-pages": "^6.3.0",
"istanbul-lib-coverage": "^3.2.2",
"istanbul-lib-instrument": "^6.0.3",
"istanbul-lib-report": "^3.0.1",
"istanbul-lib-source-maps": "^5.0.6",
"istanbul-reports": "^3.2.0",
"magic-string": "^0.30.21",
"oxc-parser": "^0.114.0",
"oxfmt": "^0.34.0",
"oxlint": "^1.49.0",
"oxlint-tsgolint": "^0.14.2",
"publint": "^0.3.17",
"rollup": "^4.59.0",
"tinyrainbow": "^3.0.3",
"tsdown": "^0.20.3",
"typescript": "^5.9.3",
"vite": "^7.3.1",
"vitest": "^4.0.18",
"vue": "^3.5.28",
"yaml": "^2.8.2"
},
"scripts": {
"dev": "tsdown --watch --sourcemap",
"build": "tsdown",
"deploy": "touch coverage/.nojekyll && gh-pages --dist coverage --dotfiles",
"test": "vitest",
"test:dev": "vitest --project 'vite/parseAstAsync'",
"lint": "oxlint --type-aware && oxfmt --check && publint",
"typecheck": "tsc --noEmit",
"debug": "open fixture-coverage/index.html istanbul-coverage/index.html",
"verify": "pnpm build; pnpm lint; pnpm typecheck; pnpm run test --run; pnpm bench"
}
}
@@ -0,0 +1,2 @@
import * as ts from 'typescript';
export declare function typeDeclaredInPackageDeclarationFile(packageName: string, declarations: ts.Node[], declarationFiles: ts.SourceFile[], program: ts.Program): boolean;
@@ -0,0 +1,59 @@
export interface URIComponents {
scheme?: string;
userinfo?: string;
host?: string;
port?: number | string;
path?: string;
query?: string;
fragment?: string;
reference?: string;
error?: string;
}
export interface URIOptions {
scheme?: string;
reference?: string;
tolerant?: boolean;
absolutePath?: boolean;
iri?: boolean;
unicodeSupport?: boolean;
domainHost?: boolean;
}
export interface URISchemeHandler<Components extends URIComponents = URIComponents, Options extends URIOptions = URIOptions, ParentComponents extends URIComponents = URIComponents> {
scheme: string;
parse(components: ParentComponents, options: Options): Components;
serialize(components: Components, options: Options): ParentComponents;
unicodeSupport?: boolean;
domainHost?: boolean;
absolutePath?: boolean;
}
export interface URIRegExps {
NOT_SCHEME: RegExp;
NOT_USERINFO: RegExp;
NOT_HOST: RegExp;
NOT_PATH: RegExp;
NOT_PATH_NOSCHEME: RegExp;
NOT_QUERY: RegExp;
NOT_FRAGMENT: RegExp;
ESCAPE: RegExp;
UNRESERVED: RegExp;
OTHER_CHARS: RegExp;
PCT_ENCODED: RegExp;
IPV4ADDRESS: RegExp;
IPV6ADDRESS: RegExp;
}
export declare const SCHEMES: {
[scheme: string]: URISchemeHandler;
};
export declare function pctEncChar(chr: string): string;
export declare function pctDecChars(str: string): string;
export declare function parse(uriString: string, options?: URIOptions): URIComponents;
export declare function removeDotSegments(input: string): string;
export declare function serialize(components: URIComponents, options?: URIOptions): string;
export declare function resolveComponents(base: URIComponents, relative: URIComponents, options?: URIOptions, skipNormalization?: boolean): URIComponents;
export declare function resolve(baseURI: string, relativeURI: string, options?: URIOptions): string;
export declare function normalize(uri: string, options?: URIOptions): string;
export declare function normalize(uri: URIComponents, options?: URIOptions): URIComponents;
export declare function equal(uriA: string, uriB: string, options?: URIOptions): boolean;
export declare function equal(uriA: URIComponents, uriB: URIComponents, options?: URIOptions): boolean;
export declare function escapeComponent(str: string, options?: URIOptions): string;
export declare function unescapeComponent(str: string, options?: URIOptions): string;
@@ -0,0 +1,50 @@
import { getColorEnabledAsync } from "../../utils/color.js";
//#region src/middleware/logger/index.ts
const humanize = (times) => {
const [delimiter, separator] = [",", "."];
return times.map((v) => v.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1" + delimiter)).join(separator);
};
const time = (start) => {
const delta = Date.now() - start;
return humanize([delta < 1e3 ? delta + "ms" : Math.round(delta / 1e3) + "s"]);
};
const colorStatus = async (status) => {
if (await getColorEnabledAsync()) switch (status / 100 | 0) {
case 5: return `\x1b[31m${status}\x1b[0m`;
case 4: return `\x1b[33m${status}\x1b[0m`;
case 3: return `\x1b[36m${status}\x1b[0m`;
case 2: return `\x1b[32m${status}\x1b[0m`;
}
return `${status}`;
};
async function log(fn, prefix, method, path, status = 0, elapsed) {
fn(prefix === "<--" ? `${prefix} ${method} ${path}` : `${prefix} ${method} ${path} ${await colorStatus(status)} ${elapsed}`);
}
/**
* Logger Middleware for Hono.
*
* @see {@link https://hono.dev/docs/middleware/builtin/logger}
*
* @param {PrintFunc} [fn=console.log] - Optional function for customized logging behavior.
* @returns {MiddlewareHandler} The middleware handler function.
*
* @example
* ```ts
* const app = new Hono()
*
* app.use(logger())
* app.get('/', (c) => c.text('Hello Hono!'))
* ```
*/
const logger = (fn = console.log) => {
return async function logger(c, next) {
const { method, url } = c.req;
const path = url.slice(url.indexOf("/", 8));
await log(fn, "<--", method, path);
const start = Date.now();
await next();
await log(fn, "-->", method, path, c.res.status, time(start));
};
};
//#endregion
export { logger };
@@ -0,0 +1,67 @@
/**
* @fileoverview Rule to disallow use of new operator with the `require` function
* @author Wil Moore III
* @deprecated in ESLint v7.0.0
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
deprecated: {
message: "Node.js rules were moved out of ESLint core.",
url: "https://eslint.org/docs/latest/use/migrating-to-7.0.0#deprecate-node-rules",
deprecatedSince: "7.0.0",
availableUntil: "11.0.0",
replacedBy: [
{
message:
"eslint-plugin-n now maintains deprecated Node.js-related rules.",
plugin: {
name: "eslint-plugin-n",
url: "https://github.com/eslint-community/eslint-plugin-n",
},
rule: {
name: "no-new-require",
url: "https://github.com/eslint-community/eslint-plugin-n/tree/master/docs/rules/no-new-require.md",
},
},
],
},
type: "suggestion",
docs: {
description: "Disallow `new` operators with calls to `require`",
recommended: false,
url: "https://eslint.org/docs/latest/rules/no-new-require",
},
schema: [],
messages: {
noNewRequire: "Unexpected use of new with require.",
},
},
create(context) {
return {
NewExpression(node) {
if (
node.callee.type === "Identifier" &&
node.callee.name === "require"
) {
context.report({
node,
messageId: "noNewRequire",
});
}
},
};
},
};
@@ -0,0 +1,324 @@
/*
@license
Rollup.js v4.60.4
Thu, 14 May 2026 17:52:21 GMT - commit d311a84b0bb4d4a6f50d19ffd2c29cca28660c88
https://github.com/rollup/rollup
Released under the MIT License.
*/
'use strict';
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const rollup = require('./rollup.js');
const path = require('node:path');
const process = require('node:process');
const index = require('./index.js');
const node_os = require('node:os');
require('./parseAst.js');
require('../native.js');
require('path');
require('node:perf_hooks');
require('node:fs/promises');
require('fs');
require('util');
require('stream');
require('os');
require('./fsevents-importer.js');
require('events');
class FileWatcher {
constructor(task, chokidarOptions) {
this.transformWatchers = new Map();
this.chokidarOptions = chokidarOptions;
this.task = task;
this.watcher = this.createWatcher(null);
}
close() {
this.watcher.close();
for (const watcher of this.transformWatchers.values()) {
watcher.close();
}
}
unwatch(id) {
this.watcher.unwatch(id);
const transformWatcher = this.transformWatchers.get(id);
if (transformWatcher) {
this.transformWatchers.delete(id);
transformWatcher.close();
}
}
watch(id, isTransformDependency) {
if (isTransformDependency) {
const watcher = this.transformWatchers.get(id) ?? this.createWatcher(id);
watcher.add(id);
this.transformWatchers.set(id, watcher);
}
else {
this.watcher.add(id);
}
}
createWatcher(transformWatcherId) {
const task = this.task;
const isLinux = node_os.platform() === 'linux';
const isFreeBSD = node_os.platform() === 'freebsd';
const isTransformDependency = transformWatcherId !== null;
const handleChange = (id, event) => {
const changedId = transformWatcherId || id;
if (isLinux || isFreeBSD) {
// unwatching and watching fixes an issue with chokidar where on certain systems,
// a file that was unlinked and immediately recreated would create a change event
// but then no longer any further events
watcher.unwatch(changedId);
watcher.add(changedId);
}
task.invalidate(changedId, { event, isTransformDependency });
};
const watcher = index.chokidar
.watch([], this.chokidarOptions)
.on('add', id => handleChange(id, 'create'))
.on('change', id => handleChange(id, 'update'))
.on('unlink', id => handleChange(id, 'delete'));
return watcher;
}
}
const eventsRewrites = {
create: {
create: 'buggy',
delete: null, //delete file from map
update: 'create'
},
delete: {
create: 'update',
delete: 'buggy',
update: 'buggy'
},
update: {
create: 'buggy',
delete: 'delete',
update: 'update'
}
};
class Watcher {
constructor(optionsList, emitter) {
this.buildDelay = 0;
this.buildTimeout = null;
this.closed = false;
this.invalidatedIds = new Map();
this.rerun = false;
this.running = true;
this.emitter = emitter;
emitter.close = this.close.bind(this);
this.tasks = optionsList.map(options => new Task(this, options));
for (const { watch } of optionsList) {
if (watch && typeof watch.buildDelay === 'number') {
this.buildDelay = Math.max(this.buildDelay, watch.buildDelay);
}
}
process.nextTick(() => this.run());
}
async close() {
if (this.closed)
return;
this.closed = true;
if (this.buildTimeout)
clearTimeout(this.buildTimeout);
for (const task of this.tasks) {
task.close();
}
await this.emitter.emit('close');
this.emitter.removeAllListeners();
}
invalidate(file) {
if (file) {
const previousEvent = this.invalidatedIds.get(file.id);
const event = previousEvent ? eventsRewrites[previousEvent][file.event] : file.event;
if (event === 'buggy') {
//TODO: throws or warn? Currently just ignore, uses new event
this.invalidatedIds.set(file.id, file.event);
}
else if (event === null) {
this.invalidatedIds.delete(file.id);
}
else {
this.invalidatedIds.set(file.id, event);
}
}
if (this.running) {
this.rerun = true;
return;
}
if (this.buildTimeout)
clearTimeout(this.buildTimeout);
this.buildTimeout = setTimeout(async () => {
this.buildTimeout = null;
try {
await Promise.all([...this.invalidatedIds].map(([id, event]) => this.emitter.emit('change', id, { event })));
this.invalidatedIds.clear();
await this.emitter.emit('restart');
this.emitter.removeListenersForCurrentRun();
this.run();
}
catch (error) {
this.invalidatedIds.clear();
await this.emitter.emit('event', {
code: 'ERROR',
error,
result: null
});
await this.emitter.emit('event', {
code: 'END'
});
}
}, this.buildDelay);
}
async run() {
this.running = true;
await this.emitter.emit('event', {
code: 'START'
});
for (const task of this.tasks) {
await task.run();
}
this.running = false;
await this.emitter.emit('event', {
code: 'END'
});
if (this.rerun) {
this.rerun = false;
this.invalidate();
}
}
}
class Task {
constructor(watcher, options) {
this.cache = { modules: [] };
this.watchFiles = [];
this.closed = false;
this.invalidated = true;
this.watched = new Set();
this.watcher = watcher;
this.options = options;
this.skipWrite = Boolean(options.watch && options.watch.skipWrite);
this.outputs = this.options.output;
this.outputFiles = this.outputs.map(output => {
if (output.file || output.dir)
return path.resolve(output.file || output.dir);
return undefined;
});
this.watchOptions = this.options.watch || {};
this.filter = rollup.createFilter(this.watchOptions.include, this.watchOptions.exclude);
this.fileWatcher = new FileWatcher(this, {
...this.watchOptions.chokidar,
disableGlobbing: true,
ignoreInitial: true
});
}
close() {
this.closed = true;
this.fileWatcher.close();
}
invalidate(id, details) {
this.invalidated = true;
if (details.isTransformDependency) {
for (const module of this.cache.modules) {
if (!module.transformDependencies.includes(id))
continue;
// effective invalidation
module.originalCode = null;
}
}
this.watcher.invalidate({ event: details.event, id });
this.watchOptions.onInvalidate?.(id);
}
async run() {
if (!this.invalidated)
return;
this.invalidated = false;
const options = {
...this.options,
cache: this.cache
};
const start = Date.now();
await this.watcher.emitter.emit('event', {
code: 'BUNDLE_START',
input: this.options.input,
output: this.outputFiles
});
let result = null;
try {
result = await rollup.rollupInternal(options, this.watcher.emitter);
if (this.closed) {
return;
}
this.updateWatchedFiles(result);
if (!this.skipWrite) {
await Promise.all(this.outputs.map(output => result.write(output)));
if (this.closed) {
return;
}
this.updateWatchedFiles(result);
}
await this.watcher.emitter.emit('event', {
code: 'BUNDLE_END',
duration: Date.now() - start,
input: this.options.input,
output: this.outputFiles,
result
});
}
catch (error) {
if (!this.closed) {
if (Array.isArray(error.watchFiles)) {
for (const id of error.watchFiles) {
this.watchFile(id);
}
}
if (error.id) {
this.cache.modules = this.cache.modules.filter(module => module.id !== error.id);
}
}
await this.watcher.emitter.emit('event', {
code: 'ERROR',
error,
result
});
}
}
updateWatchedFiles(result) {
const previouslyWatched = this.watched;
this.watched = new Set();
this.watchFiles = result.watchFiles;
this.cache = result.cache;
for (const id of this.watchFiles) {
this.watchFile(id);
}
for (const module of this.cache.modules) {
for (const depId of module.transformDependencies) {
this.watchFile(depId, true);
}
}
for (const id of previouslyWatched) {
if (!this.watched.has(id)) {
this.fileWatcher.unwatch(id);
}
}
}
watchFile(id, isTransformDependency = false) {
if (!this.filter(id))
return;
this.watched.add(id);
if (this.outputFiles.includes(id)) {
throw new Error('Cannot import the generated bundle');
}
// this is necessary to ensure that any 'renamed' files
// continue to be watched following an error
this.fileWatcher.watch(id, isTransformDependency);
}
}
exports.Task = Task;
exports.Watcher = Watcher;
//# sourceMappingURL=watch.js.map
@@ -0,0 +1 @@
{"version":3,"file":"database-backup.js","sources":["../../../src/icons/database-backup.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name DatabaseBackup\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8ZWxsaXBzZSBjeD0iMTIiIGN5PSI1IiByeD0iOSIgcnk9IjMiIC8+CiAgPHBhdGggZD0iTTMgMTJhOSAzIDAgMCAwIDUgMi42OSIgLz4KICA8cGF0aCBkPSJNMjEgOS4zVjUiIC8+CiAgPHBhdGggZD0iTTMgNXYxNGE5IDMgMCAwIDAgNi40NyAyLjg4IiAvPgogIDxwYXRoIGQ9Ik0xMiAxMnY0aDQiIC8+CiAgPHBhdGggZD0iTTEzIDIwYTUgNSAwIDAgMCA5LTMgNC41IDQuNSAwIDAgMC00LjUtNC41Yy0xLjMzIDAtMi41NC41NC0zLjQxIDEuNDFMMTIgMTYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/database-backup\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst DatabaseBackup = createLucideIcon('DatabaseBackup', [\n ['ellipse', { cx: '12', cy: '5', rx: '9', ry: '3', key: 'msslwz' }],\n ['path', { d: 'M3 12a9 3 0 0 0 5 2.69', key: '1ui2ym' }],\n ['path', { d: 'M21 9.3V5', key: '6k6cib' }],\n ['path', { d: 'M3 5v14a9 3 0 0 0 6.47 2.88', key: 'i62tjy' }],\n ['path', { d: 'M12 12v4h4', key: '1bxaet' }],\n [\n 'path',\n {\n d: 'M13 20a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L12 16',\n key: '1f4ei9',\n },\n ],\n]);\n\nexport default DatabaseBackup;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,iBAAiB,gBAAkB,CAAA,CAAA,CAAA;AAAA,CACxD,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAClE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA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@@ -0,0 +1,16 @@
var si=Object.defineProperty;var qt=(a,e)=>{for(var t in e)si(a,t,{get:e[t],enumerable:!0})};var ei={};qt(ei,{parsers:()=>Aa});var De={};qt(De,{__babel_estree:()=>ma,__js_expression:()=>fa,__ts_expression:()=>da,__vue_event_binding:()=>pa,__vue_expression:()=>fa,__vue_ts_event_binding:()=>ua,__vue_ts_expression:()=>da,babel:()=>pa,"babel-flow":()=>Zs,"babel-ts":()=>ua});var X=(a,e)=>(t,s,...i)=>t|1&&s==null?void 0:(e.call(s)??s[a]).apply(s,i);var ii=String.prototype.replaceAll??function(a,e){return a.global?this.replace(a,e):this.split(a).join(e)},ri=X("replaceAll",function(){if(typeof this=="string")return ii}),U=ri;var ai=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),lt=ai;var L=class{constructor(e,t,s){this.line=void 0,this.column=void 0,s!==void 0&&(this.index=void 0),this.line=e,this.column=t,s!==void 0&&(this.index=s)}},st=class{start;end;filename;identifierName;constructor(e,t){this.start=e,this.end=t}};function O(a,e){let{line:t,column:s,index:i}=a;return new L(t,s+e,i+e)}var Fe="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",ni={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:Fe},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:Fe}},Be={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},wt=a=>a.type==="UpdateExpression"?Be.UpdateExpression[`${a.prefix}`]:Be[a.type],oi={AccessorIsGenerator:({kind:a})=>`A ${a}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:a})=>`Missing initializer in ${a} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:a})=>`\`${a}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:a,exportName:e})=>`A string literal cannot be used as an exported binding withoutLine truncated
- Did you mean \`export { '${a}' as '${e}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:a})=>`'${a==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:a})=>`Unsyntactic ${a==="BreakStatement"?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportBindingIsString:({importName:a})=>`A string literal cannot be used as an imported binding.
- Did you mean \`import { "${a}" as foo }\`?`,ImportCallArity:({phase:a})=>`\`import${a?`.${a}`:""}()\` requires exactly one or two arguments.`,ImportCallNotNewExpression:({phase:a})=>`Cannot use new with import${a?`.${a}`:""}().`,ImportCallSpreadArgument:({phase:a})=>`\`...\` is not allowed in \`import${a?`.${a}`:""}()\`.`,IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDigit:({radix:a})=>`Expected number in radix ${a}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:a})=>`Escape sequence in keyword ${a}.`,InvalidIdentifier:({identifierName:a})=>`Invalid identifier ${a}.`,InvalidLhs:({ancestor:a})=>`Invalid left-hand side in ${wt(a)}.`,InvalidLhsBinding:({ancestor:a})=>`Binding invalid left-hand side in ${wt(a)}.`,InvalidLhsOptionalChaining:({ancestor:a})=>`Invalid optional chaining in the left-hand side of ${wt(a)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:a})=>`Unexpected character '${a}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:a})=>`Private name #${a} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:a})=>`Label '${a}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:a})=>`This experimental syntax requires enabling the parser plugin: ${a.map(e=>JSON.stringify(e)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:a})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${a.map(e=>JSON.stringify(e)).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:a})=>`Duplicate key "${a}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:a})=>`An export name cannot include a lone surrogate, found '\\u${a.toString(16)}'.`,ModuleExportUndefined:({localName:a})=>`Export '${a}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:a})=>`Private names are only allowed in property accesses (\`obj.#${a}\`) or in \`in\` expressions (\`#${a} in obj\`).`,PrivateNameRedeclaration:({identifierName:a})=>`Duplicate private name #${a}.`,RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperCallNotNewExpression:"Cannot use new with super(...).",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class eLine truncated
`:`\r
`):i=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,i}jsxReadString(t){let s="",i=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(l.UnterminatedString,this.state.startLoc);let r=this.input.charCodeAt(this.state.pos);if(r===t)break;r===38?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadEntity(),i=this.state.pos):tt(r)?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}s+=this.input.slice(i,this.state.pos++),this.finishToken(130,s)}jsxReadEntity(){let t=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let s=10;this.codePointAtPos(this.state.pos)===120&&(s=16,++this.state.pos);let i=this.readInt(s,void 0,!1,"bail");if(i!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(i)}else{let s=0,i=!1;for(;s++<10&&this.state.pos<this.length&&!(i=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(i){let r=this.input.slice(t,this.state.pos),n=void 0;if(++this.state.pos,n)return n}}return this.state.pos=t,"&"}jsxReadWord(){let t,s=this.state.pos;do t=this.input.charCodeAt(++this.state.pos);while(W(t)||t===45);this.finishToken(136,this.input.slice(s,this.state.pos))}jsxParseIdentifier(){let t=this.startNode();return this.match(136)?t.name=this.state.value:Ee(this.state.type)?t.name=z(this.state.type):this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")}jsxParseNamespacedName(){let t=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(10))return s;let i=this.startNodeAt(t);return i.namespace=s,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){let t=this.state.startLoc,s=this.jsxParseNamespacedName();if(s.type==="JSXNamespacedName")return s;for(;this.eat(12);){let i=this.startNodeAt(t);i.object=s,i.property=this.jsxParseIdentifier(),s=this.finishNode(i,"JSXMemberExpression")}return s}jsxParseAttributeValue(){let t;switch(this.state.type){case 2:return t=this.startNode(),this.setContext(w.brace),this.next(),t=this.jsxParseExpressionContainer(t,w.j_oTag),t.expression.type==="JSXEmptyExpression"&&this.raise(_.AttributeIsEmpty,t),t;case 138:case 130:return this.parseExprAtom();default:throw this.raise(_.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let t=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(t){return this.next(),t.expression=this.parseExpression(),this.setContext(w.j_expr),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(t,"JSXSpreadChild")}jsxParseExpressionContainer(t,s){if(this.match(4))t.expression=this.jsxParseEmptyExpression();else{let i=this.parseExpression();i.type==="SequenceExpression"&&!i.extra?.parenthesized&&this.raise(_.UnexpectedSequenceExpression,i.expressions[1]),t.expression=i}return this.setContext(s),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(t,"JSXExpressionContainer")}jsxParseAttribute(){if(this.match(2)){let s=this.startNode();return this.setContext(w.brace),this.next(),this.expect(17),s.argument=this.parseMaybeAssignAllowIn(),this.setContext(w.j_oTag),this.state.canStartJSXElement=!0,this.expect(4),this.finishNode(s,"JSXSpreadAttribute")}let t=this.startNode();return t.name=this.jsxParseNamespacedName(),t.value=this.eat(25)?this.jsxParseAttributeValue():null,this.finishNode(t,"JSXAttribute")}jsxParseOpeningElementAt(t){if(this.eat(139)){let i=this.startNodeAt(t);return this.finishNode(i,"JSXOpeningFragment")}let s=this.startNodeAt(t);return s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s)}jsxParseOpeningElementAfterName(t){let s=[];for(;!this.match(52)&&!this.match(139);)s.push(this.jsxParseAttribute());return t.attributes=s,t.selfClosing=this.eat(52),this.expect(139),this.finishNode(t,"JSXOpeningElement")}jsxParseClosingElementAt(t){if(this.eat(139)){let i=this.startNodeAt(t);return this.finishNode(i,"JSXClosingFragment")}let s=this.startNodeAt(t);return s.name=this.jsxParseElementName(),this.expect(139),this.finishNode(s,"JSXClosingElement")}jsxParseElementAt(t){let s=this.startNodeAt(t),i=[],r=this.jsxParseOpeningElementAt(t),n=null;if(!r.selfClosing){t:for(;;)switch(this.state.type){case 138:if(t=this.state.startLoc,this.next(),this.eat(52)){this.setLoc(t),n=this.jsxParseClosingElementAt(t);break t}i.push(this.jsxParseElementAt(t));break;case 137:i.push(this.parseLiteral(this.state.value,"JSXText"));break;case 2:{let o=this.startNode();this.setContext(w.brace),this.next(),this.match(17)?i.push(this.jsxParseSpreadChild(o)):i.push(this.jsxParseExpressionContainer(o,w.j_expr));break}default:this.unexpected()}q(r)&&!q(n)&&n!==null?this.raise(_.MissingClosingTagFragment,n):!q(r)&&q(n)?this.raise(_.MissingClosingTagElement,n,{openingTagName:Z(r.name)}):!q(r)&&!q(n)&&Z(n.name)!==Z(r.name)&&this.raise(_.MissingClosingTagElement,n,{openingTagName:Z(r.name)})}if(q(r)?(s.openingFrLine truncated
`,++t,x===13&&e.charCodeAt(t)===10&&++t,++i,f=s=t):r.unterminated(n,o,h):++t}return{pos:t,str:c,firstInvalidLoc:p,lineStart:s,curLine:i}}function Qi(a,e,t,s){return a==="template"?e===96||e===36&&t.charCodeAt(s+1)===123:e===(a==="double"?34:39)}function Zi(a,e,t,s,i,r){let n=!i;e++;let o=c=>({pos:e,ch:c,lineStart:t,curLine:s}),h=a.charCodeAt(e++);switch(h){case 110:return o(`
`);case 114:return o("\r");case 120:{let c;return{code:c,pos:e}=re(a,e,t,s,2,!1,n,r),o(c===null?null:String.fromCharCode(c))}case 117:{let c;return{code:c,pos:e}=os(a,e,t,s,n,r),o(c===null?null:String.fromCodePoint(c))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:a.charCodeAt(e)===10&&++e;case 10:t=e,++s;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);r.strictNumericEscape(e-1,t,s);default:if(h>=48&&h<=55){let c=e-1,f=/^[0-7]+/.exec(a.slice(c,e+2))[0],d=parseInt(f,8);d>255&&(f=f.slice(0,-1),d=parseInt(f,8)),e+=f.length-1;let x=a.charCodeAt(e);if(f!=="0"||x===56||x===57){if(i)return o(null);r.strictNumericEscape(c,t,s)}return o(String.fromCharCode(d))}return o(String.fromCharCode(h))}}function re(a,e,t,s,i,r,n,o){let h=e,c;return{n:c,pos:e}=ns(a,e,t,s,16,i,r,!1,o,!n),c===null&&(n?o.invalidEscapeSequence(h,t,s):e=h-1),{code:c,pos:e}}function ns(a,e,t,s,i,r,n,o,h,c){let p=e,f=i===16?qe.hex:qe.decBinOct,d=i===16?Ct.hex:i===10?Ct.dec:i===8?Ct.oct:Ct.bin,x=!1,T=0;for(let D=0,v=r??1/0;D<v;++D){let E=a.charCodeAt(e),I;if(E===95&&o!=="bail"){let At=a.charCodeAt(e-1),ct=a.charCodeAt(e+1);if(o){if(Number.isNaN(ct)||!d(ct)||f.has(At)||f.has(ct)){if(c)return{n:null,pos:e};h.unexpectedNumericSeparator(e,t,s)}}else{if(c)return{n:null,pos:e};h.numericSeparatorInEscapeSequence(e,t,s)}++e;continue}if(E>=97?I=E-97+10:E>=65?I=E-65+10:Yi(E)?I=E-48:I=1/0,I>=i){if(I<=9&&c)return{n:null,pos:e};if(I<=9&&h.invalidDigit(e,t,s,i))I=0;else if(n)I=0,x=!0;else break}++e,T=T*i+I}return e===p||r!=null&&e-p!==r||x?{n:null,pos:e}:{n:T,pos:e}}function os(a,e,t,s,i,r){let n=a.charCodeAt(e),o;if(n===123){if(++e,{code:o,pos:e}=re(a,e,t,s,a.indexOf("}",e)-e,!0,i,r),++e,o!==null&&o>1114111)if(i)r.invalidCodePoint(e,t,s);else return{code:null,pos:e}}else({code:o,pos:e}=re(a,e,t,s,4,!1,i,r));return{code:o,pos:e}}function ut(a,e,t){return new L(t,a-e,a)}var tr=new Set([103,109,115,105,121,117,100,118]),ae=class{constructor(e){let t=e.startIndex||0;this.type=e.type,this.value=e.value,this.start=t+e.start,this.end=t+e.end,this.loc=new st(e.startLoc,e.endLoc)}},Et,ne=class extends se{isLookahead;tokens=[];constructor(e,t){super(),this.state=new ie,this.state.init(e),this.input=t,this.length=t.length,this.comments=[],this.isLookahead=!1,(!Et||Et.length<(this.length+1)*2)&&(Et=new Uint32Array((this.length+1)*2)),this.locData=Et}setLoc(e){let t=this.offsetToSourcePos(e.index);this.locData[t*2]=e.line,this.locData[t*2+1]=e.column}getLoc(e){let t=this.offsetToSourcePos(e);return new L(this.locData[t*2],this.locData[t*2+1],e)}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&512&&this.pushToken(new ae(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return this.match(e)?(this.next(),!0):!1}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){let e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return zt.lastIndex=e,zt.test(this.input)?zt.lastIndex:e}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(e){return this.input.charCodeAt(this.nextTokenStartSince(e))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return Ht.lastIndex=e,Ht.test(this.input)?Ht.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if((t&64512)===55296&&++e<this.input.length){let s=this.input.charCodeAt(e);(s&64512)===56320&&(t=65536+((t&1023)<<10)+(s&1023))}return t}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach(([t,s])=>this.raise(t,s)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(135);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());let s=this.state.pos,i=this.input.indexOf(e,s+2);if(i===-1)throw this.raise(l.UnterminatedComment,this.state.curPosition());for(this.state.pos=i+e.length,St.lastIndex=s+2;St.test(this.input)&&St.lastIndex<=i;)++this.state.curLine,this.state.lineStart=St.lastIndex;if(this.isLookahead)return;let r={type:"CommentBlock",value:this.input.slice(s+2,i),start:tLine truncated
`),cooked:r===null?null:r.slice(1,c)},o.tail=h,this.next();let f=this.finishNode(o,"TemplateElement");return this.resetEndLocation(f,O(this.state.lastTokEndLoc,c)),f}parseTemplate(e){let t=this.startNode(),s=this.parseTemplateElement(e),i=[s],r=[];for(;!s.tail;)r.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),i.push(s=this.parseTemplateElement(e));return t.expressions=r,t.quasis=i,this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,s){let i=!1,r=!0,n=this.startNode();for(n.properties=[],this.next();!this.match(e);){if(r)r=!1;else if(this.expect(8),this.match(e)){this.addTrailingCommaExtraToNode(n);break}let h;t?h=this.parseBindingProperty():(h=this.parsePropertyDefinition(s),i=this.checkProto(h,i,s)),n.properties.push(h)}this.next();let o=t?"ObjectPattern":"ObjectExpression";return this.finishNode(n,o)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&e.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(51))}parsePropertyDefinition(e){let t=[];if(this.match(22))for(this.hasPlugin("decorators")&&this.raise(l.UnsupportedPropertyDecorator,this.state.startLoc);this.match(22);)t.push(this.parseDecorator());let s=this.startNode(),i=!1,r=!1,n;if(this.match(17))return t.length&&this.unexpected(),this.parseSpread();t.length&&(s.decorators=t),s.method=!1,e&&(n=this.state.startLoc);let o=this.eat(51);this.parsePropertyNamePrefixOperator(s);let h=this.state.containsEsc;if(this.parsePropertyName(s,e),!o&&!h&&this.maybeAsyncOrAccessorProp(s)){let{key:c}=s,p=c.name;p==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(c),o=this.eat(51),this.parsePropertyName(s)),(p==="get"||p==="set")&&(r=!0,this.resetPreviousNodeTrailingComments(c),s.kind=p,this.match(51)&&(o=!0,this.raise(l.AccessorIsGenerator,this.state.curPosition(),{kind:p}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,n,o,i,!1,r,e)}getGetterSetterExpectedParamCount(e){return e.kind==="get"?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){let t=this.getGetterSetterExpectedParamCount(e),s=this.getObjectOrClassMethodParams(e);s.length!==t&&this.raise(e.kind==="get"?l.BadGetterArity:l.BadSetterArity,e),e.kind==="set"&&s[s.length-1]?.type==="RestElement"&&this.raise(l.BadSetterRestParameter,e)}parseObjectMethod(e,t,s,i,r){if(r){let n=this.parseMethod(e,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(n),n}if(s||t||this.match(6))return i&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,s,!1,!1,"ObjectMethod")}parseObjectProperty(e,t,s,i){if(e.shorthand=!1,this.eat(10))return e.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(4,i),this.finishObjectProperty(e);if(!e.computed&&e.key.type==="Identifier"){if(this.checkReservedWord(e.key.name,e.key.start,!0,!1),s)e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key));else if(this.match(25)){let r=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=r):this.raise(l.InvalidCoverInitializedName,r),e.value=this.parseMaybeDefault(t,this.cloneIdentifier(e.key))}else e.value=this.cloneIdentifier(e.key);return e.shorthand=!0,this.finishObjectProperty(e)}}finishObjectProperty(e){return this.finishNode(e,"ObjectProperty")}parseObjPropValue(e,t,s,i,r,n,o){let h=this.parseObjectMethod(e,s,i,r,n)||this.parseObjectProperty(e,t,r,o);return h||this.unexpected(),h}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(1);else{let{type:s,value:i}=this.state,r;if(B(s))r=this.parseIdentifier(!0);else switch(s){case 131:r=this.parseNumericLiteral(i);break;case 130:r=this.parseStringLiteral(i);break;case 132:r=this.parseBigIntLiteral(i);break;case 134:{let n=this.state.startLoc;t!=null?t.privateKeyLoc===null&&(t.privateKeyLoc=n):this.raise(l.UnexpectedPrivateField,n),r=this.parsePrivateName();break}default:this.unexpected()}e.key=r,s!==134&&(e.computed=!1)}}initFunction(e,t){e.id=null,e.generator=!1,e.async=t}parseMethod(e,t,s,i,r,n,o=!1){this.initFunction(e,s),e.generator=t,this.scope.enter(530|(o?576:0)|(r?32:0)),this.prodParam.enter(Nt(s,e.generator)),this.parseFunctionParams(e,i);let h=this.parseFunctionBodyAndFinish(e,n,!0);return this.prodParam.exit(),this.scope.exit(),h}parseArrayLike(e,t){let s=this.startNode();return this.next(),s.elements=this.parseExprList(e,!0,t,s),this.finishNode(s,"ArrayExpression")}parseArrowExpression(e,t,s,i){this.scope.enter(518);let r=Nt(s,!1);return this.match(2)||(r|=this.prodParam.currentFlags()&24),this.prodParam.enter(r),this.initFunction(e,s),t&&this.setArrowFunctionParameters(e,t,i),this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.finishNode(e,"ArrowFunctionExpressLine truncated
`||a==="\r"||a==="\u2028"||a==="\u2029";function Ar(a,e,t){if(e===!1)return!1;let s=!!t?.backwards,i=a.charAt(e);if(s){if(a.charAt(e-1)==="\r"&&i===`
`)return e-2;if(ys(i))return e-1}else{if(i==="\r"&&a.charAt(e+1)===`
`)return e+2;if(ys(i))return e+1}return e}var xs=Ar;function Sr(a,e){return e===!1?!1:a.charAt(e)==="/"&&a.charAt(e+1)==="/"?ds(a,e):e}var Ps=Sr;function Cr(a,e){let t=null,s=e;for(;s!==t;)t=s,s=fs(a,s),s=ms(a,s),s=Ps(a,s),s=xs(a,s);return s}var gs=Cr;function Ts(a){let e=[];for(let t of a)try{return t()}catch(s){e.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:e})}function Er(a){if(!a.startsWith("#!"))return"";let e=a.indexOf(`
`);return e===-1?a:a.slice(0,e)}var Ft=Er;var wr=Array.prototype.findLast??function(a){for(let e=this.length-1;e>=0;e--){let t=this[e];if(a(t,e,this))return t}},Ir=X("findLast",function(){if(Array.isArray(this))return wr}),bs=Ir;var Bt=Symbol.for("comments");function Nr(a){return this[a<0?this.length+a:a]}var kr=X("at",function(){if(Array.isArray(this)||typeof this=="string")return Nr}),As=kr;function J(a){let e=new Set(a);return t=>e.has(t?.type)}function rt(a){return a.range?.[1]??a.end}function N(a){let e=a.range?.[0]??a.start,t=(a.declaration?.decorators??a.decorators)?.[0];return t?Math.min(N(t),e):e}var vr=5,Lr=8,Dr=8,Ss=a=>e=>e.label?k(e.label):N(e)+a,Mr=a=>a.__contentEnd??rt(a),Cs=["ExpressionStatement","Directive","ImportDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportAllDeclaration","ReturnStatement","ThrowStatement","DoWhileStatement"],Or=new Map([["BreakStatement",Ss(vr)],["ContinueStatement",Ss(Lr)],["DebuggerStatement",a=>N(a)+Dr],["VariableDeclaration",a=>k(As(0,a.declarations,-1))],...Cs.map(a=>[a,Mr])]),Ie=J(Cs);function k(a){let{type:e}=a;return e==="IfStatement"?k(a.alternate??a.consequent):e==="ForInStatement"||e==="ForOfStatement"||e==="ForStatement"||e==="LabeledStatement"||e==="WithStatement"||e==="WhileStatement"?k(a.body):Or.get(e)?.(a)??rt(a)}var at=J(["Block","CommentBlock","MultiLine"]),Es=J(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]);function nt(a,e,t){if(!a.has(e)){let s=t(e);a.set(e,s)}return a.get(e)}var Fr=new WeakMap;function ws(a){return nt(Fr,a,e=>at(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/.test(e.value))}function Br(a){return U(0,a,/[^\n]/g," ")}var Is=Br;function Rr(a,e){for(let t of e){let s=N(t),i=k(t);a=a.slice(0,s)+Is(a.slice(s,i))+a.slice(i)}return a}var Ur=new WeakMap;function Ns(a){let e=a[Bt];return nt(Ur,e,t=>Rr(a.originalText,t))}function _r(a){if(!at(a))return[];if(!a.value.includes(`
`))return[];let e=[];for(let t of`*${a.value}*`.split(`
`)){if(t=t.trimStart(),!t.startsWith("*"))return[];e.push(t)}return e}var ks=new WeakMap;function jr(a){return nt(ks,a,_r)}function vs(a){ks.delete(a)}function Ne(a){return jr(a).length>0}function Ls(a){if(a.length<2)return;let e;for(let t=a.length-1;t>=0;t--){let s=a[t];if(e&&k(s)===N(e)&&Ne(s)&&Ne(e)&&(a.splice(t+1,1),s.value+="*//*"+e.value,s.range=[N(s),k(e)],vs(s)),!Es(s)&&!at(s))throw new TypeError(`Unknown comment type: "${s.type}".`);e=s}}function Vr(a){return a!==null&&typeof a=="object"}var Ds=Vr;var gt=null;function Tt(a){if(gt!==null&&typeof gt.property){let e=gt;return gt=Tt.prototype=null,e}return gt=Tt.prototype=a??Object.create(null),new Tt}var qr=10;for(let a=0;a<=qr;a++)Tt();function ke(a){return Tt(a)}function $r(a,e="type"){ke(a);function t(s){let i=s[e],r=a[i];if(!Array.isArray(r))throw Object.assign(new Error(`Missing visitor keys for '${i}'.`),{node:s});return r}return t}var Ms=$r;var u=[["elements"],["left","right"],["value"],["directives","body"],["label"],["callee","typeArguments","arguments"],["test","consequent","alternate"],["body","test"],["expression"],["left","right","body"],["id","typeParameters","params","predicate","returnType","body"],["object","property"],["properties"],["decorators","key","typeParameters","params","returnType","body"],["decorators","key","value"],["argument"],["expressions"],["id","init"],["body"],["decorators","id","typeParameters","superClass","superTypeArguments","mixins","implements","body"],["declaration","specifiers","source","attributes"],["local"],["exported"],["decorators","variance","key","typeAnnotation","value"],["id"],["key","value"],["elementType"],["id","typeParameters"],["id","typeParameters","extends","body"],["id","body"],["typeAnnotation"],["id","typeParameters","right"],["name","typeAnnotation"],["types"],["qualification","id"],["elementTypes"],["expression","typeAnnotation"],["params"],["members"],["objectType","indexType"],["decorators","key","typeAnnotation","value"],["id","typeParameters","params","returnType","body"],["key","typeParameters","params","returnType"],["typeParameters","params","returnType"],["parameterName","typeAnnotation"],["checkType","extendsType","trueType","falseType"],["typeParameter"],["literal"],["expression","typeArguments"],["decorators","key","typeAnnotation"],["argument","cases"],["pattern","body","guard"],["properties","rest"],["node"]],Os={ArrayExpression:u[0],AssignmentExpression:u[1],BinaryExpression:u[1],InterpreterDirective:[],Directive:u[2],DirectiveLiteral:[],BlockStatement:u[3],BreakStatement:u[4],CallExpression:u[5],CatchClause:["param","body"],ConditionalExpression:u[6],ContinueStatement:u[4],DebuggerStatement:[],DoWhileStatement:u[7],EmptyStatement:[],ExpressionStatement:u[8],File:["program"],ForInStatement:u[9],ForStatement:["init","test","update","body"],FunctionDeclaration:u[10],FunctionExpression:u[10],Identifier:["typeAnnotation","decorators"],IfStatement:u[6],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:u[1],MemberExpression:u[11],NewExpression:u[5],Program:u[3],ObjectExpression:u[12],ObjectMethod:u[13],ObjectProperty:u[14],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:u[15],SequenceExpression:u[16],ParenthesizedExpression:u[8],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:u[15],TryStatement:["block","handler","finalizer"],UnaryExpression:u[15],UpdateExpression:u[15],VariableDeclaration:["declarations"],VariableDeclarator:u[17],WhileStatement:u[7],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:u[18],ClassExpression:u[19],ClassDeclaration:u[19],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:u[20],ExportSpecifier:["local","exported"],ForOfStatement:u[9],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:u[21],ImportNamespaceSpecifier:u[21],ImportSpecifier:["imported","local"],MetaProperty:["meta","property"],ClassMethod:u[13],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:u[15],Super:[],TaggedTemplateExpression:["tag","typeArguments","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:u[15],AwaitExpression:u[15],ImportExpression:["source","options"],BigIntLiteral:[],ExportNamespaceSpecifier:u[22],OptionalMemberExpression:u[11],OptionalCallExpression:u[5],ClassProperty:u[23],ClassPrivateProperty:u[23],ClassPrivateMethod:u[13],PrivateName:u[24],StaticBlock:u[18],ImportAttribute:u[25],AnyTypeAnnotation:[],ArrayTypeAnnotation:u[26],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:u[27],DeclareClass:["id","typePaLine truncated
$1 $2
`);a=a.replace(js,"").trimEnd();let s=Object.create(null),i=U(0,a,Vs,"").replace(js,"").trimEnd(),r;for(;r=Vs.exec(a);){let n=U(0,r[2],Qr,"");if(typeof s[r[1]]=="string"||Array.isArray(s[r[1]])){let o=s[r[1]];s[r[1]]=[...ea,...Array.isArray(o)?o:[o],n]}else s[r[1]]=n}return{comments:i,pragmas:s}}var zs=["noformat","noprettier"],Hs=["format","prettier"];function Ks(a){let e=Ft(a);e&&(a=a.slice(e.length+1));let t=qs(a),{pragmas:s,comments:i}=$s(t);return{shebang:e,text:a,pragmas:s,comments:i}}function Ws(a){let{pragmas:e}=Ks(a);return Hs.some(t=>lt(e,t))}function Js(a){let{pragmas:e}=Ks(a);return zs.some(t=>lt(e,t))}function sa(a){return a=typeof a=="function"?{parse:a}:a,{astFormat:"estree",hasPragma:Ws,hasIgnorePragma:Js,locStart:N,locEnd:k,...a}}var G=sa;var jt="module",Le="commonjs";function Gs(a){if(typeof a=="string"){if(a=a.toLowerCase(),/\.(?:mjs|mts)$/i.test(a))return jt;if(/\.(?:cjs|cts)$/i.test(a))return Le}}function ia(a){let{type:e="JsExpressionRoot",expression:t,comments:s=t?.comments??[],text:i,rootMarker:r}=a,n={type:e,comments:s,range:[0,i.length],rootMarker:r};return t&&(delete t.comments,n.node=t),n}var Vt=ia;var ot=a=>G(ha(a)),ra={sourceType:jt,allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,attachComment:!1,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions",["partialApplication",{version:"2018-07"}],"decorators","moduleBlocks","asyncDoExpressions","destructuringPrivate","decoratorAutoAccessors","sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}],["discardBinding",{syntaxType:"void"}]],tokens:!1,ranges:!1},Xs="v8intrinsic",Ys=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"fsharp"}]],j=(a,e=ra)=>({...e,plugins:[...e.plugins,...a]}),aa=/@(?:no)?flow\b/;function na(a,e){if(e?.endsWith(".js.flow"))return!0;let t=Ft(a);t&&(a=a.slice(t.length));let s=gs(a,0);return s!==!1&&(a=a.slice(0,s)),aa.test(a)}function oa(a,e,t){let s=a(e,t),i=s.errors.find(r=>!la.has(r.reasonCode));if(i)throw i;return s}function ha({isExpression:a=!1,optionsCombinations:e}){return(t,s={})=>{let{filepath:i}=s;if(typeof i!="string"&&(i=void 0),(s.parser==="babel"||s.parser==="__babel_estree")&&na(t,i))return s.parser="babel-flow",Zs.parse(t,s);let r=e,n=s.__babelSourceType??Gs(i);n&&n!==jt&&(r=r.map(p=>({...p,sourceType:n,...n===Le?{allowReturnOutsideFunction:void 0,allowNewTargetOutsideFunction:void 0}:void 0})));let o=/%[A-Z]/.test(t);t.includes("|>")?r=(o?[...Ys,Xs]:Ys).flatMap(f=>r.map(d=>j([f],d))):o&&(r=r.map(p=>j([Xs],p)));let h=a?Mt:Dt,c;try{c=Ts(r.map(p=>()=>oa(h,t,p)))}catch({errors:[p]}){throw _t(p)}return a&&(c=Vt({expression:c,text:t,rootMarker:s.rootMarker})),Us(c,{text:t})}}var ca=["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","ForInOfLoopInitializer","ParamDupe","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","PatternIsOptional","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport","DeclarationMissingInitializer","DecoratorAbstractMethod"],la=new Set(ca),Qs=[j(["jsx"])],pa=ot({optionsCombinations:Qs}),ua=ot({optionsCombinations:[j(["jsx","typescript"]),j(["typescript"])]}),fa=ot({isExpression:!0,optionsCombinations:[j(["jsx"])]}),da=ot({isExpression:!0,optionsCombinations:[j(["typescript"])]}),Zs=ot({optionsCombinations:[j(["jsx",["flow",{all:!0}],"flowComments"])]}),ma=ot({optionsCombinations:Qs.map(a=>j(["estree"],a))});var Oe={};qt(Oe,{json:()=>Pa,"json-stringify":()=>ba,json5:()=>ga,jsonc:()=>Ta});function ya(a){return Array.isArray(a)&&a.length>0}var Me=ya;var ti={tokens:!1,ranges:!1,attachComment:!1,createParenthesizedExpressions:!0};function xa(a){let e=Dt(a,ti),{program:t}=e;if(t.body.length===0&&t.directives.length===0&&!t.interpreter)return{comments:e.comments}}function bt(a,e={}){let{allowComments:t=!0,allowEmpty:s=!1}=e,i,r;try{i=Mt(a,ti),r=i.comments}catch(n){if(s&&n.code==="BABEL_PARSER_SYNTAX_ERROR"&&n.reasonCode==="ParseExpressionEmptyInput")try{({comments:r}=xa(a))}catch{}if(!r)throw _t(n)}if(!t&&Me(r))throw H(r[0],"Comment");return(!s||i)&&ht(i),i=Vt({type:"JsonRoot",expression:i,comments:r,text:a}),i}function H(a,e){let[t,s]=[a.loc.start,a.loc.end].map(({line:i,column:r})=>({line:i,column:r+1}));return Ut(`${e} is not allowed in JSON.`,{loc:{start:t,end:s}})}function ht(a){switch(a.type){case"ArrayExpression":for(let e of a.elements)e!==null&&ht(e);return;case"ObjectExpression":for(let e of a.properties)ht(e);return;case"ObjectProperty":if(a.computed)throw H(a.key,"Computed key");if(a.shorthand)throw H(a.key,"Shorthand property");a.key.type!=="Identifier"&&Line truncated
@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const PaintBucket = createLucideIcon("PaintBucket", [
[
"path",
{ d: "m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z", key: "irua1i" }
],
["path", { d: "m5 2 5 5", key: "1lls2c" }],
["path", { d: "M2 13h15", key: "1hkzvu" }],
["path", { d: "M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z", key: "xk76lq" }]
]);
export { PaintBucket as default };
//# sourceMappingURL=paint-bucket.js.map
@@ -0,0 +1,627 @@
export default `flf2a$ 6 5 13 15 13
HHscript by Shimrod (Herman Hiddema), based on his own .sig
Figlet release 2.0 -- August 5, 1993
Explanation of first line:
flf2 - "magic number" for file identification
a - should always be \`a', for now
$ - the "hardblank" -- prints as a blank, but can't be smushed
6 - height of a character
5 - height of a character, not including descenders
15 - max line length (excluding comment lines) + a fudge factor
15 - default smushmode for this font (like "-m 15" on command line)
13 - number of comment lines
$$@
$$@
$$@
$$@
$$@
$$@@
.$@
|$@
|$@
$@
o$@
$@@
p q$@
$@
$@
$@
$@
$@@
| | $@
-+-+-$@
| | $@
-+-+-$@
| | $@
$@@
,+. $@
( | \`$@
\`+. $@
. | )$@
\`+' $@
$@@
_ ,$@
(_)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,CAAC,CAAA;IACxF,CAAC;IAED,WAAW;QACT,MAAM,EAAC,IAAI,EAAE,QAAQ,EAAC,GAAG,IAAI,CAAC,IAAI,CAAA;QAClC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,GAAG,OAAO,IAAI,IAAI,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;IAC/F,CAAC;IAoBD,QAAQ,CACN,YAAgC,EAAE,4BAA4B;IAC9D,6EAA6E;IAC7E,IAAiB,CAAC,kBAAkB;;QAEpC,IAAI,CAAkC,CAAA;QACtC,IAAI,OAAO,YAAY,IAAI,QAAQ,EAAE,CAAC;YACpC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAI,YAAY,CAAC,CAAA;YACnC,IAAI,CAAC,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,8BAA8B,YAAY,GAAG,CAAC,CAAA;QACxE,CAAC;aAAM,CAAC;YACN,CAAC,GAALine truncated
@@ -0,0 +1,123 @@
import * as _radix_ui_react_context from '@radix-ui/react-context';
import * as React from 'react';
import { Primitive } from '@radix-ui/react-primitive';
type Direction = 'ltr' | 'rtl';
type Sizes = {
content: number;
viewport: number;
scrollbar: {
size: number;
paddingStart: number;
paddingEnd: number;
};
};
declare const createScrollAreaScope: _radix_ui_react_context.CreateScope;
type ScrollAreaContextValue = {
type: 'auto' | 'always' | 'scroll' | 'hover';
dir: Direction;
scrollHideDelay: number;
scrollArea: ScrollAreaElement | null;
viewport: ScrollAreaViewportElement | null;
onViewportChange(viewport: ScrollAreaViewportElement | null): void;
content: HTMLDivElement | null;
onContentChange(content: HTMLDivElement): void;
scrollbarX: ScrollAreaScrollbarElement | null;
onScrollbarXChange(scrollbar: ScrollAreaScrollbarElement | null): void;
scrollbarXEnabled: boolean;
onScrollbarXEnabledChange(rendered: boolean): void;
scrollbarY: ScrollAreaScrollbarElement | null;
onScrollbarYChange(scrollbar: ScrollAreaScrollbarElement | null): void;
scrollbarYEnabled: boolean;
onScrollbarYEnabledChange(rendered: boolean): void;
onCornerWidthChange(width: number): void;
onCornerHeightChange(height: number): void;
};
type ScrollAreaElement = React.ComponentRef<typeof Primitive.div>;
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
interface ScrollAreaProps extends PrimitiveDivProps {
type?: ScrollAreaContextValue['type'];
dir?: ScrollAreaContextValue['dir'];
scrollHideDelay?: number;
}
declare const ScrollArea: React.ForwardRefExoticComponent<ScrollAreaProps & React.RefAttributes<HTMLDivElement>>;
type ScrollAreaViewportElement = React.ComponentRef<typeof Primitive.div>;
interface ScrollAreaViewportProps extends PrimitiveDivProps {
nonce?: string;
}
declare const ScrollAreaViewport: React.ForwardRefExoticComponent<ScrollAreaViewportProps & React.RefAttributes<HTMLDivElement>>;
type ScrollAreaScrollbarElement = ScrollAreaScrollbarVisibleElement;
interface ScrollAreaScrollbarProps extends ScrollAreaScrollbarVisibleProps {
forceMount?: true;
}
declare const ScrollAreaScrollbar: React.ForwardRefExoticComponent<ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>>;
type ScrollAreaScrollbarVisibleElement = ScrollAreaScrollbarAxisElement;
interface ScrollAreaScrollbarVisibleProps extends Omit<ScrollAreaScrollbarAxisProps, keyof ScrollAreaScrollbarAxisPrivateProps> {
orientation?: 'horizontal' | 'vertical';
}
type ScrollAreaScrollbarAxisPrivateProps = {
hasThumb: boolean;
sizes: Sizes;
onSizesChange(sizes: Sizes): void;
onThumbChange(thumb: ScrollAreaThumbElement | null): void;
onThumbPointerDown(pointerPos: number): void;
onThumbPointerUp(): void;
onThumbPositionChange(): void;
onWheelScroll(scrollPos: number): void;
onDragScroll(pointerPos: number): void;
};
type ScrollAreaScrollbarAxisElement = ScrollAreaScrollbarImplElement;
interface ScrollAreaScrollbarAxisProps extends Omit<ScrollAreaScrollbarImplProps, keyof ScrollAreaScrollbarImplPrivateProps>, ScrollAreaScrollbarAxisPrivateProps {
}
type ScrollbarContext = {
hasThumb: boolean;
scrollbar: ScrollAreaScrollbarElement | null;
onThumbChange(thumb: ScrollAreaThumbElement | null): void;
onThumbPointerUp(): void;
onThumbPointerDown(pointerPos: {
x: number;
y: number;
}): void;
onThumbPositionChange(): void;
};
type ScrollAreaScrollbarImplElement = React.ComponentRef<typeof Primitive.div>;
type ScrollAreaScrollbarImplPrivateProps = {
sizes: Sizes;
hasThumb: boolean;
onThumbChange: ScrollbarContext['onThumbChange'];
onThumbPointerUp: ScrollbarContext['onThumbPointerUp'];
onThumbPointerDown: ScrollbarContext['onThumbPointerDown'];
onThumbPositionChange: ScrollbarContext['onThumbPositionChange'];
onWheelScroll(event: WheelEvent, maxScrollPos: number): void;
onDragScroll(pointerPos: {
x: number;
y: number;
}): void;
onResize(): void;
};
interface ScrollAreaScrollbarImplProps extends Omit<PrimitiveDivProps, keyof ScrollAreaScrollbarImplPrivateProps>, ScrollAreaScrollbarImplPrivateProps {
}
type ScrollAreaThumbElement = ScrollAreaThumbImplElement;
interface ScrollAreaThumbProps extends ScrollAreaThumbImplProps {
/**
* Used to force mounting when more control is needed. Useful when
* controlling animation with React animation libraries.
*/
forceMount?: true;
}
declare const ScrollAreaThumb: React.ForwardRefExoticComponent<ScrollAreaThumbProps & React.RefAttributes<HTMLDivElement>>;
type ScrollAreaThumbImplElement = React.ComponentRef<typeof Primitive.div>;
interface ScrollAreaThumbImplProps extends PrimitiveDivProps {
}
interface ScrollAreaCornerProps extends ScrollAreaCornerImplProps {
}
declare const ScrollAreaCorner: React.ForwardRefExoticComponent<ScrollAreaCornerProps & React.RefAttributes<HTMLDivElement>>;
interface ScrollAreaCornerImplProps extends PrimitiveDivProps {
}
declare const Root: React.ForwardRefExoticComponent<ScrollAreaProps & React.RefAttributes<HTMLDivElement>>;
declare const Viewport: React.ForwardRefExoticComponent<ScrollAreaViewportProps & React.RefAttributes<HTMLDivElement>>;
declare const Scrollbar: React.ForwardRefExoticComponent<ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>>;
declare const Thumb: React.ForwardRefExoticComponent<ScrollAreaThumbProps & React.RefAttributes<HTMLDivElement>>;
declare const Corner: React.ForwardRefExoticComponent<ScrollAreaCornerProps & React.RefAttributes<HTMLDivElement>>;
export { Corner, Root, ScrollArea, ScrollAreaCorner, type ScrollAreaCornerProps, type ScrollAreaProps, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaThumb, type ScrollAreaThumbProps, ScrollAreaViewport, type ScrollAreaViewportProps, Scrollbar, Thumb, Viewport, createScrollAreaScope };
@@ -0,0 +1,3 @@
/** Stable identifier used for the root route in a route tree. */
export const rootRouteId = '__root__'
export type RootRouteId = typeof rootRouteId
@@ -0,0 +1,67 @@
{
"name": "@jridgewell/trace-mapping",
"version": "0.3.31",
"description": "Trace the original position through a source map",
"keywords": [
"source",
"map"
],
"main": "dist/trace-mapping.umd.js",
"module": "dist/trace-mapping.mjs",
"types": "types/trace-mapping.d.cts",
"files": [
"dist",
"src",
"types"
],
"exports": {
".": [
{
"import": {
"types": "./types/trace-mapping.d.mts",
"default": "./dist/trace-mapping.mjs"
},
"default": {
"types": "./types/trace-mapping.d.cts",
"default": "./dist/trace-mapping.umd.js"
}
},
"./dist/trace-mapping.umd.js"
],
"./package.json": "./package.json"
},
"scripts": {
"benchmark": "run-s build:code benchmark:*",
"benchmark:install": "cd benchmark && npm install",
"benchmark:only": "node --expose-gc benchmark/index.mjs",
"build": "run-s -n build:code build:types",
"build:code": "node ../../esbuild.mjs trace-mapping.ts",
"build:types": "run-s build:types:force build:types:emit build:types:mts",
"build:types:force": "rimraf tsconfig.build.tsbuildinfo",
"build:types:emit": "tsc --project tsconfig.build.json",
"build:types:mts": "node ../../mts-types.mjs",
"clean": "run-s -n clean:code clean:types",
"clean:code": "tsc --build --clean tsconfig.build.json",
"clean:types": "rimraf dist types",
"test": "run-s -n test:types test:only test:format",
"test:format": "prettier --check '{src,test}/**/*.ts'",
"test:only": "mocha",
"test:types": "eslint '{src,test}/**/*.ts'",
"lint": "run-s -n lint:types lint:format",
"lint:format": "npm run test:format -- --write",
"lint:types": "npm run test:types -- --fix",
"prepublishOnly": "npm run-s -n build test"
},
"homepage": "https://github.com/jridgewell/sourcemaps/tree/main/packages/trace-mapping",
"repository": {
"type": "git",
"url": "git+https://github.com/jridgewell/sourcemaps.git",
"directory": "packages/trace-mapping"
},
"author": "Justin Ridgewell <justin@ridgewell.name>",
"license": "MIT",
"dependencies": {
"@jridgewell/resolve-uri": "^3.1.0",
"@jridgewell/sourcemap-codec": "^1.4.14"
}
}
@@ -0,0 +1 @@
{"version":3,"file":"format.js","sourceRoot":"","sources":["../../../lib/vocabularies/format/format.ts"],"names":[],"mappings":";;AASA,mDAAoF;AAapF,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,CAAC,EAAC,UAAU,EAAC,EAAE,EAAE,CAAC,IAAA,aAAG,EAAA,sBAAsB,UAAU,GAAG;IACjE,MAAM,EAAE,CAAC,EAAC,UAAU,EAAC,EAAE,EAAE,CAAC,IAAA,WAAC,EAAA,YAAY,UAAU,GAAG;CACrD,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,QAAQ;IACjB,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC1B,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAE,IAAI;IACX,KAAK;IACL,IAAI,CAAC,GAAe,EAAE,QAAiB;QACrC,MAAM,EAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QACtD,MAAM,EAAC,IAAI,EAAE,aAAa,EAAE,SAAS,EAAE,IAAI,EAAC,GAAG,EAAE,CAAA;QACjD,IAAI,CAAC,IAAI,CAAC,eAAe;YAAE,OAAM;QAEjC,IAAI,KAAK;YAAE,mBAAmB,EAAE,CAAA;;YAC3B,cAAc,EAAE,CAAA;QAErB,SAAS,mBAAmB;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AND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.esnext_object = void 0;
const base_config_1 = require("./base-config");
exports.esnext_object = {
libs: [],
variables: [['ObjectConstructor', base_config_1.TYPE]],
};
@@ -0,0 +1,70 @@
/**
* dd-base-impl.ts 12.6.0
* Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license
*/
/**
* Abstract base class for all drag & drop implementations.
* Provides common functionality for event handling, enable/disable state,
* and lifecycle management used by draggable, droppable, and resizable implementations.
*/
export class DDBaseImplement {
constructor() {
/** @internal */
this._eventRegister = {};
}
/**
* Returns the current disabled state.
* Note: Use enable()/disable() methods to change state as other operations need to happen.
*/
get disabled() { return this._disabled; }
/**
* Register an event callback for the specified event.
*
* @param event - Event name to listen for
* @param callback - Function to call when event occurs
*/
on(event, callback) {
this._eventRegister[event] = callback;
}
/**
* Unregister an event callback for the specified event.
*
* @param event - Event name to stop listening for
*/
off(event) {
delete this._eventRegister[event];
}
/**
* Enable this drag & drop implementation.
* Subclasses should override to perform additional setup.
*/
enable() {
this._disabled = false;
}
/**
* Disable this drag & drop implementation.
* Subclasses should override to perform additional cleanup.
*/
disable() {
this._disabled = true;
}
/**
* Destroy this drag & drop implementation and clean up resources.
* Removes all event handlers and clears internal state.
*/
destroy() {
delete this._eventRegister;
}
/**
* Trigger a registered event callback if one exists and the implementation is enabled.
*
* @param eventName - Name of the event to trigger
* @param event - DOM event object to pass to the callback
* @returns Result from the callback function, if any
*/
triggerEvent(eventName, event) {
if (!this.disabled && this._eventRegister && this._eventRegister[eventName])
return this._eventRegister[eventName](event);
}
}
//# sourceMappingURL=dd-base-impl.js.map
@@ -0,0 +1,272 @@
'use strict'
const { iteratorMixin } = require('./util')
const { kEnumerableProperty } = require('../../core/util')
const { webidl } = require('../webidl')
const nodeUtil = require('node:util')
const { runtimeFeatures } = require('../../util/runtime-features.js')
const random = runtimeFeatures.has('crypto')
? require('node:crypto').randomInt
: (max) => Math.floor(Math.random() * max)
let getFormDataState, setFormDataState, getFormDataBoundary
// https://xhr.spec.whatwg.org/#formdata
class FormData {
#state = []
#boundary = null
constructor (form = undefined) {
webidl.util.markAsUncloneable(this)
if (form !== undefined) {
throw webidl.errors.conversionFailed({
prefix: 'FormData constructor',
argument: 'Argument 1',
types: ['undefined']
})
}
}
append (name, value, filename = undefined) {
webidl.brandCheck(this, webidl.is.FormData)
const prefix = 'FormData.append'
webidl.argumentLengthCheck(arguments, 2, prefix)
name = webidl.converters.USVString(name)
if (arguments.length === 3 || webidl.is.Blob(value)) {
value = webidl.converters.Blob(value, prefix, 'value')
if (filename !== undefined) {
filename = webidl.converters.USVString(filename)
}
} else {
value = webidl.converters.USVString(value)
}
// 1. Let value be value if given; otherwise blobValue.
// 2. Let entry be the result of creating an entry with
// name, value, and filename if given.
const entry = makeEntry(name, value, filename)
// 3. Append entry to this’s entry list.
this.#state.push(entry)
}
delete (name) {
webidl.brandCheck(this, webidl.is.FormData)
const prefix = 'FormData.delete'
webidl.argumentLengthCheck(arguments, 1, prefix)
name = webidl.converters.USVString(name)
// The delete(name) method steps are to remove all entries whose name
// is name from this’s entry list.
this.#state = this.#state.filter(entry => entry.name !== name)
}
get (name) {
webidl.brandCheck(this, webidl.is.FormData)
const prefix = 'FormData.get'
webidl.argumentLengthCheck(arguments, 1, prefix)
name = webidl.converters.USVString(name)
// 1. If there is no entry whose name is name in this’s entry list,
// then return null.
const idx = this.#state.findIndex((entry) => entry.name === name)
if (idx === -1) {
return null
}
// 2. Return the value of the first entry whose name is name from
// this’s entry list.
return this.#state[idx].value
}
getAll (name) {
webidl.brandCheck(this, webidl.is.FormData)
const prefix = 'FormData.getAll'
webidl.argumentLengthCheck(arguments, 1, prefix)
name = webidl.converters.USVString(name)
// 1. If there is no entry whose name is name in this’s entry list,
// then return the empty list.
// 2. Return the values of all entries whose name is name, in order,
// from this’s entry list.
return this.#state
.filter((entry) => entry.name === name)
.map((entry) => entry.value)
}
has (name) {
webidl.brandCheck(this, webidl.is.FormData)
const prefix = 'FormData.has'
webidl.argumentLengthCheck(arguments, 1, prefix)
name = webidl.converters.USVString(name)
// The has(name) method steps are to return true if there is an entry
// whose name is name in this’s entry list; otherwise false.
return this.#state.findIndex((entry) => entry.name === name) !== -1
}
set (name, value, filename = undefined) {
webidl.brandCheck(this, webidl.is.FormData)
const prefix = 'FormData.set'
webidl.argumentLengthCheck(arguments, 2, prefix)
name = webidl.converters.USVString(name)
if (arguments.length === 3 || webidl.is.Blob(value)) {
value = webidl.converters.Blob(value, prefix, 'value')
if (filename !== undefined) {
filename = webidl.converters.USVString(filename)
}
} else {
value = webidl.converters.USVString(value)
}
// The set(name, value) and set(name, blobValue, filename) method steps
// are:
// 1. Let value be value if given; otherwise blobValue.
// 2. Let entry be the result of creating an entry with name, value, and
// filename if given.
const entry = makeEntry(name, value, filename)
// 3. If there are entries in this’s entry list whose name is name, then
// replace the first such entry with entry and remove the others.
const idx = this.#state.findIndex((entry) => entry.name === name)
if (idx !== -1) {
this.#state = [
...this.#state.slice(0, idx),
entry,
...this.#state.slice(idx + 1).filter((entry) => entry.name !== name)
]
} else {
// 4. Otherwise, append entry to this’s entry list.
this.#state.push(entry)
}
}
[nodeUtil.inspect.custom] (depth, options) {
const state = this.#state.reduce((a, b) => {
if (a[b.name]) {
if (Array.isArray(a[b.name])) {
a[b.name].push(b.value)
} else {
a[b.name] = [a[b.name], b.value]
}
} else {
a[b.name] = b.value
}
return a
}, { __proto__: null })
options.depth ??= depth
options.colors ??= true
const output = nodeUtil.formatWithOptions(options, state)
// remove [Object null prototype]
return `FormData ${output.slice(output.indexOf(']') + 2)}`
}
static {
/** @param {FormData} formData */
getFormDataState = (formData) => formData.#state
/**
* @param {FormData} formData
* @param {any[]} newState
*/
setFormDataState = (formData, newState) => {
formData.#state = newState
}
/**
* @param {FormData} formData
* @returns {string | null}
*/
getFormDataBoundary = (formData) => {
// eslint-disable-next-line no-return-assign
return formData.#boundary ??= `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}`
}
webidl.is.FormData = (arg) => {
return arg != null && typeof arg === 'object' && #state in arg
}
}
}
iteratorMixin('FormData', FormData, getFormDataState, 'name', 'value', webidl.is.FormData)
Object.defineProperties(FormData.prototype, {
append: kEnumerableProperty,
delete: kEnumerableProperty,
get: kEnumerableProperty,
getAll: kEnumerableProperty,
has: kEnumerableProperty,
set: kEnumerableProperty,
[Symbol.toStringTag]: {
value: 'FormData',
configurable: true
}
})
/**
* @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#create-an-entry
* @param {string} name
* @param {string|Blob} value
* @param {?string} filename
* @returns
*/
function makeEntry (name, value, filename) {
// 1. Set name to the result of converting name into a scalar value string.
// Note: This operation was done by the webidl converter USVString.
// 2. If value is a string, then set value to the result of converting
// value into a scalar value string.
if (typeof value === 'string') {
// Note: This operation was done by the webidl converter USVString.
} else {
// 3. Otherwise:
// 1. If value is not a File object, then set value to a new File object,
// representing the same bytes, whose name attribute value is "blob"
if (!webidl.is.File(value)) {
value = new File([value], 'blob', { type: value.type })
}
// 2. If filename is given, then set value to a new File object,
// representing the same bytes, whose name attribute is filename.
if (filename !== undefined) {
/** @type {FilePropertyBag} */
const options = {
type: value.type,
lastModified: value.lastModified
}
value = new File([value], filename, options)
}
}
// 4. Return an entry whose name is name and whose value is value.
return { name, value }
}
module.exports = { FormData, makeEntry, setFormDataState, getFormDataBoundary }
@@ -0,0 +1,15 @@
import { HonoBase as Hono$1 } from "../hono-base.js";
import { PatternRouter } from "../router/pattern-router/router.js";
//#region src/preset/tiny.ts
/**
* @module
* The preset that uses `PatternRouter`.
*/
var Hono = class extends Hono$1 {
constructor(options = {}) {
super(options);
this.router = new PatternRouter();
}
};
//#endregion
export { Hono };